Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
wendelin
Commits
d054a9bf
Commit
d054a9bf
authored
Jul 01, 2016
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix due to
nexedi/erp5@b0209091
parent
8a9ba2e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bt5/erp5_wendelin/ExtensionTemplateItem/portal_components/extension.erp5.Wendelin.py
...TemplateItem/portal_components/extension.erp5.Wendelin.py
+5
-5
No files found.
bt5/erp5_wendelin/ExtensionTemplateItem/portal_components/extension.erp5.Wendelin.py
View file @
d054a9bf
...
...
@@ -5,7 +5,7 @@
from
wendelin.bigarray.array_zodb
import
ZBigArray
import
numpy
as
np
def
DataStream_copyCSVToDataArray
(
self
,
chunk_list
,
start
,
end
,
\
def
DataStream_copyCSVToDataArray
(
data_stream
,
chunk_list
,
start
,
end
,
\
data_array_reference
=
None
):
"""
Receive CSV data and transform it to a numpy array of floats.
...
...
@@ -18,7 +18,7 @@ def DataStream_copyCSVToDataArray(self, chunk_list, start, end, \
start
=
start
-
offset_mismatch
end
=
end
-
offset_mismatch
#
self
.log(chunk_text)
#
data_stream
.log(chunk_text)
# remove offset line which is to be processed next call
chunk_text
=
chunk_text
[:
len
(
chunk_text
)
-
offset_mismatch
-
1
]
...
...
@@ -31,11 +31,11 @@ def DataStream_copyCSVToDataArray(self, chunk_list, start, end, \
size_list
.
extend
([
x
for
x
in
line_item_list
])
# save this value as a numpy array (for testing, only create ZBigArray for one variable)
#
self
.log(size_list)
#
data_stream
.log(size_list)
size_list
=
[
float
(
x
)
for
x
in
size_list
]
ndarray
=
np
.
array
(
size_list
)
data_array
=
self
.
portal_catalog
.
getResultValue
(
\
data_array
=
data_stream
.
portal_catalog
.
getResultValue
(
\
portal_type
=
'Data Array'
,
\
reference
=
data_array_reference
,
\
validation_state
=
'validated'
)
...
...
@@ -46,7 +46,7 @@ def DataStream_copyCSVToDataArray(self, chunk_list, start, end, \
data_array
.
setArray
(
zarray
)
zarray
=
data_array
.
getArray
()
#
self
.log('Zarray shape=%s, To append shape=%s, %s' %(zarray.shape, ndarray.shape, ndarray.itemsize))
#
data_stream
.log('Zarray shape=%s, To append shape=%s, %s' %(zarray.shape, ndarray.shape, ndarray.itemsize))
# resize so we can add new array data
old_shape
=
zarray
.
shape
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment