Commit 3f887532 authored by Levin Zimmermann's avatar Levin Zimmermann

wendelin: Remove numpy duplication

With nexedi/erp5@a254bf50 numpy
was allowed in erp5 upstream Restricted.py. There is no need for any
duplication in wendelin.

Tested at: https://erp5js.nexedi.net/#/test_result_module/20230223-AE5B8F75
parent e4b13d9d
Pipeline #26785 failed with stage
in 0 seconds
......@@ -26,28 +26,10 @@
"""
from AccessControl import allow_module, allow_type, allow_class
# we neeed to allow access to numpy's internal types
import numpy as np
allow_module('numpy')
allow_module('numpy.lib.recfunctions')
for dtype in ('int8', 'int16', 'int32', 'int64', \
'uint8', 'uint16', 'uint32', 'uint64', \
'float16', 'float32', 'float64', \
'complex64', 'complex128'):
z = np.array([0,], dtype = dtype)
allow_type(type(z[0]))
allow_type(type(z))
sz = np.array([(0,)], dtype = [('f0', dtype)])
allow_type(type(sz[0]))
allow_type(type(sz))
rz = np.rec.array(np.array([(0,)], dtype = [('f0', dtype)]))
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']))
......
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