odl
odl copied to clipboard
Failing unit tests for product spaces
Running odl/test/space/pspace_test.py
results in several failures, all of them due to this error:
from odl.space import ProductSpace
if isinstance(space, ProductSpace):
> return np.array([noise_array(si) for si in space])
E ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
../../util/testutils.py:326: ValueError
Evidently this is an instance where the old behaviour relied on NumPy implicitly building ragged arrays (as arrays-of-arrays, i.e. dtype=object), which newer versions do not do anymore (cf. also https://github.com/odlgroup/odl/pull/1633).