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
The following code fails with numpy 1.12.0 (this is the only version we have tested).
>>> arr = np.array([], dtype=object)
>>> copy.deepcopy(arr)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 2821, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-16-e314fe8a32a6>", line 1, in <module>
copy.deepcopy(arr)
File "/usr/lib/python3.4/copy.py", line 166, in deepcopy
y = copier(memo)
ValueError: Iteration of zero-sized operands is not enabled
Note that this code already works if the dtype was not object but, e.g., int or str.