Commit 41f3d9e4 authored by Klaus Wölfel's avatar Klaus Wölfel

Allow np.dtype and wc RAMArray

parent cc205344
......@@ -50,6 +50,8 @@ for dtype in ('int8', 'int16', 'int32', 'int64', \
allow_type(type(rz[0]))
allow_type(type(rz))
allow_type(np.dtype)
sz = np.array([('2017-07-12T12:30:20',)], dtype=[('date', 'M8[s]')])
allow_type(type(sz[0]['date']))
......@@ -73,11 +75,14 @@ allow_class(pd.core.groupby.DataFrameGroupBy)
# Modify 'safetype' dict in full_write_guard function
# of RestrictedPython (closure) directly To allow
# write access to ndarray and ZBigArray objects
# write access to ndarray, ZBigArray and RAMArray objects
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.core.records.recarray] = True
from wendelin.bigarray.array_zodb import ZBigArray
full_write_guard.func_closure[1].cell_contents.__self__[ZBigArray] = True
allow_type(ZBigArray)
from wendelin.bigarray.array_ram import RAMArray
full_write_guard.func_closure[1].cell_contents.__self__[RAMArray] = True
allow_type(RAMArray)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment