tomviz icon indicating copy to clipboard operation
tomviz copied to clipboard

Recon_DFT.py is relying on a bug in numpy

Open cjh1 opened this issue 6 years ago • 1 comments

Currently with numpy 1.16.4 the following line cause the input array to be converted from fortran ordering to c ordering. This bug seems to be fixed in 1.17.0, the order is now preserved, which is the expected behavior. However, this then leaves use with a mix of fortran an c ordered arrays and pyfftw fails with the following message:

Traceback (most recent call last):
  File "Reconstruct (Direct Fourier)", line 83, in transform_scalars
  File "pyfftw/pyfftw.pyx", line 1641, in pyfftw.pyfftw.FFTW.update_arrays
  File "pyfftw/pyfftw.pyx", line 1715, in pyfftw.pyfftw.FFTW.update_arrays
ValueError: Invalid input striding: The strides should be identical for the new input array as for the old.

cjh1 avatar Jul 30 '19 16:07 cjh1

I think our binary packages are on 1.16 as 1.17 wasn't ready in time for release. Can we add a check based on the numpy version to workaround this? Definitely good to be aware of, and it looks like quite a few improvements in this release. I don't think we will update our packaging of numpy for a while.

cryos avatar Jul 30 '19 17:07 cryos