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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
wendelin
Commits
b82cbfee
Commit
b82cbfee
authored
Feb 20, 2020
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendelin: add setArrayDtypeNames so that names can be changed from sandbox
parent
218c94e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
...TemplateItem/portal_components/document.erp5.DataArray.py
+9
-3
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.xml
...emplateItem/portal_components/document.erp5.DataArray.xml
+3
-4
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
View file @
b82cbfee
...
...
@@ -129,6 +129,13 @@ class DataArray(BigFile):
"""
return
self
.
getArray
().
dtype
.
names
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'setArrayDtypeNames'
)
def
setArrayDtypeNames
(
self
,
names
):
"""
Set numpy array dtype names
"""
self
.
getArray
().
dtype
.
names
=
names
security
.
declareProtected
(
Permissions
.
View
,
'index_html'
)
def
index_html
(
self
,
REQUEST
,
RESPONSE
,
format
=
_MARKER
,
inline
=
_MARKER
,
**
kw
):
"""
...
...
@@ -160,7 +167,6 @@ class DataArray(BigFile):
index
.
get
(
'step'
)))
elif
start_date
is
not
None
and
stop_date
is
not
None
:
import
numpy
as
np
import
pandas
as
pd
start_date_vector
=
self
.
getArray
()[:][
'start_date'
]
stop_date_vector
=
self
.
getArray
()[:][
'stop_date'
]
valid_start_idx
=
np
.
where
(
start_date_vector
>=
np
.
datetime64
(
start_date
))[
0
]
...
...
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.xml
View file @
b82cbfee
...
...
@@ -46,10 +46,9 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:133, 42: Redefining built-in \'format\' (redefined-builtin)
</string>
<string>
W:183, 4: Redefining built-in \'range\' (redefined-builtin)
</string>
<string>
W:210, 10: No exception type(s) specified (bare-except)
</string>
<string>
W:163, 8: Unused variable \'pd\' (unused-variable)
</string>
<string>
W:140, 42: Redefining built-in \'format\' (redefined-builtin)
</string>
<string>
W:189, 4: Redefining built-in \'range\' (redefined-builtin)
</string>
<string>
W:216, 10: No exception type(s) specified (bare-except)
</string>
</tuple>
</value>
</item>
...
...
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