Commit 7a6ed7c7 authored by Levin Zimmermann's avatar Levin Zimmermann

wendelin: Remove numpy duplication

With nexedi/erp5@a254bf50 many numpy
features were allowed in erp5 upstream, there is no need for the
duplication in wendelin.
parent e4b13d9d
...@@ -26,25 +26,7 @@ ...@@ -26,25 +26,7 @@
""" """
from AccessControl import allow_module, allow_type, allow_class from AccessControl import allow_module, allow_type, allow_class
# we neeed to allow access to numpy's internal types
import numpy as np 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) allow_type(np.dtype)
......
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