Open eleftherioszisis opened 2 hours ago
If you do nrrd.SPACE_DIRECTIONS_TYPE = 'double vector list'
, it should work.
For your code to work as it is, you have to do [None, None], ...
so that it's converted to NaN
when massaging into a Numpy array. This is a np.asarray
issue from what I recall.
See below snippet for what will work (I think).
header = { 'space directions': [[None, None], np.array([10., 0.], dtype=np.float32), np. array([ 0., 20.], dtype=np.float32)],
'encoding': 'gzip'}
With the changes in #157 the following repro that was working before:
throws with the v1.1.1 release:
Given that this is similar to how the vector list header is described in https://pynrrd.readthedocs.io/en/stable/background/datatypes.html#double-vector-list , this shouldn't fail. Isn't that right?