The data encoder / decoder is failing for 2D non-float numpy arrays.
How to reproduce
Run this
import numpy as np
from pace_neutrons import Matlab
m = Matlab()
bragg_peaks = np.array([[4,0,0], [2,0,0], [1,1,0], [4,4,0], [1,0,1]]).T
m.svd(bragg_peaks)
which will fail with a ValueError: initializer must be a rectangular nested sequence in line 47 of DataTypes.py.
If the values in the array are doubles (e.g. bragg_peaks = np.array([[4.,0.,0.], [2.,0.,0.], [1.,1.,0.], [4.,4.,0.], [1.,0.,1.]]).T) then the script will work.
Issue
The data encoder / decoder is failing for 2D non-float numpy arrays.
How to reproduce
Run this
which will fail with a
ValueError: initializer must be a rectangular nested sequence
in line 47 ofDataTypes.py
.If the values in the array are doubles (e.g.
bragg_peaks = np.array([[4.,0.,0.], [2.,0.,0.], [1.,1.,0.], [4.,4.,0.], [1.,0.,1.]]).T
) then the script will work.System details (version, OS)
v0.2.0 on IDAaaS (SL7)