mckib2 / pygrappa

Python implementations of GRAPPA-like algorithms.
https://pygrappa.readthedocs.io/en/latest/
MIT License
64 stars 13 forks source link

ndarray is not C-contiguous error, when using grog and switching the coil axis #100

Closed schadol closed 1 year ago

schadol commented 1 year ago

Hi Nicholas, thank you for this amazing python implementation! I tried to use the grog and got an error, when changing the location of the coil axis. This is because using np.moveaxis to move the coils to the back makes the ndarray not C-contiguous. A fix would be to apply np.ascontiguousarray() after the np.moveaxis()-operation.

Best regards, Olli

mckib2 commented 1 year ago

Hi @schadol, apologies for getting back to you so late. I'm taking a look now to see if I can reproduce. Happy to apply your suggestion of I can

mckib2 commented 1 year ago

Took a slightly different route and modified the Cython routine to handle both C and Fortran ordered arrays. I'll get a release out with this fix this evening

mckib2 commented 1 year ago

New wheels and source dist have been uploaded to PyPI!