xpsi-group / neost

Other
2 stars 0 forks source link

Fix numpy ragged arrays issue in the Cython TOV solvers #26

Open svisak opened 3 months ago

svisak commented 3 months ago

It seems ragged numpy arrays are created in the solveTOVr() and solveTOVh() functions in neost/tovsolvers/TOV{r,h}.pyx. This raises a deprecation warning message when pytest is run, but curiously no errors even though numpy > 1.23.5 is used. Also, no warnings seem to be issued during normal use. Still, this should be fixed.

The ragged arrays are probably created with something like np.array([x1, [x2]]) where x1 and x2 are floats. Obviously, this should be np.array([x1, x2]). I haven't verified that this is the case though.