You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using NengoOCL with Numpy >= 1.20, the following error can occur:
Traceback (most recent call last):
File "run_spaun.py", line 748, in <module>
sim = nengo_ocl.Simulator(model, dt=cfg.sim_dt, context=ctx,
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/nengo_ocl/simulator.py", line 363, in __init__
plans.extend(self._plan_op_group(op_type, op_list))
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/nengo_ocl/simulator.py", line 742, in _plan_op_group
return getattr(self, "_plan_" + op_type.__name__)(ops)
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/nengo_ocl/simulator.py", line 867, in _plan_Copy
if any(dupl(i) for i in xinds) or any(dupl(i) for i in yinds):
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/nengo_ocl/simulator.py", line 867, in <genexpr>
if any(dupl(i) for i in xinds) or any(dupl(i) for i in yinds):
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/nengo_ocl/simulator.py", line 864, in <lambda>
and not (isinstance(s, np.ndarray) and s.dtype == np.bool)
File "/home/xchoo/miniconda3/envs/spaun/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Changing np.bool to bool seems to rectify this issue with no (apparent) side-effects.
The text was updated successfully, but these errors were encountered:
When using NengoOCL with Numpy >= 1.20, the following error can occur:
Changing
np.bool
tobool
seems to rectify this issue with no (apparent) side-effects.The text was updated successfully, but these errors were encountered: