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
d3fbd4f9
Commit
d3fbd4f9
authored
Sep 19, 2018
by
Klaus Wölfel
Committed by
Eteri
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restricted: allow numpy reffunctions and more pandas indexing
parent
d06b9f23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
product/Wendelin/__init__.py
product/Wendelin/__init__.py
+6
-1
No files found.
product/Wendelin/__init__.py
View file @
d3fbd4f9
...
@@ -34,6 +34,7 @@ from AccessControl import allow_module, allow_type, allow_class
...
@@ -34,6 +34,7 @@ from AccessControl import allow_module, allow_type, allow_class
# we neeed to allow access to numpy's internal types
# we neeed to allow access to numpy's internal types
import
numpy
as
np
import
numpy
as
np
allow_module
(
'numpy'
)
allow_module
(
'numpy'
)
allow_module
(
'numpy.lib.recfunctions'
)
for
dtype
in
(
'int8'
,
'int16'
,
'int32'
,
'int64'
,
\
for
dtype
in
(
'int8'
,
'int16'
,
'int32'
,
'int64'
,
\
'uint8'
,
'uint16'
,
'uint32'
,
'uint64'
,
\
'uint8'
,
'uint16'
,
'uint32'
,
'uint64'
,
\
'float16'
,
'float32'
,
'float64'
,
\
'float16'
,
'float32'
,
'float64'
,
\
...
@@ -75,10 +76,14 @@ allow_class(pd.core.groupby.DataFrameGroupBy)
...
@@ -75,10 +76,14 @@ allow_class(pd.core.groupby.DataFrameGroupBy)
# Modify 'safetype' dict in full_write_guard function
# Modify 'safetype' dict in full_write_guard function
# of RestrictedPython (closure) directly To allow
# of RestrictedPython (closure) directly To allow
# write access to ndarray, ZBigArray and RAMArray objects
# write access to ndarray,
DataFrame,
ZBigArray and RAMArray objects
from
RestrictedPython.Guards
import
full_write_guard
from
RestrictedPython.Guards
import
full_write_guard
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
ndarray
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
ndarray
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
core
.
records
.
recarray
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
core
.
records
.
recarray
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
core
.
records
.
record
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
pd
.
DataFrame
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
pd
.
tseries
.
index
.
DatetimeIndex
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
pd
.
core
.
indexing
.
_iLocIndexer
]
=
True
from
wendelin.bigarray.array_zodb
import
ZBigArray
from
wendelin.bigarray.array_zodb
import
ZBigArray
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
ZBigArray
]
=
True
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
ZBigArray
]
=
True
allow_type
(
ZBigArray
)
allow_type
(
ZBigArray
)
...
...
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