When running through the Tutorial videos, I ran into an issue in a call to the FFT_NUMPY node (FFT_NUMPY_GPI.py) which caused a crash. The relevant part of the error message was
File "/Users/XXXXX/miniforge3/envs/gpi_env/lib/python3.7/site-packages/gpi_core/math/GPI/FFT_NUMPY_GPI.py", line 248, in compute
np.ones(zpad_after), 0.0, (-i-1))
File "<__array_function__ internals>", line 6, in insert
File "/Users/XXXXX/miniforge3/envs/gpi_env/lib/python3.7/site-packages/numpy/lib/function_base.py", line 4744, in insert
old_mask[indices] = False
IndexError: arrays used as indices must be of integer (or boolean) type
reveals the problem is that the second argument of np.insert is supposed to be the index/indices of the insertion. These indices have to be an int or boolean, but np.ones defaults to creating an array of floats.
I know the code used to work, so this may be a more general problem due to a change in behavior in a recent update of numpy (I am using version 1.21.5). I couldn't find anything obvious in the release notes since 1.16.0 to indicate a change in numpy causing this problem, but the fact it worked before and now doesn't suggests this approach to np.insert argument construction may need to be checked elsewhere in the GPI codebase.
When running through the Tutorial videos, I ran into an issue in a call to the FFT_NUMPY node (
FFT_NUMPY_GPI.py
) which caused a crash. The relevant part of the error message wasExamination of lines 247-248 of
FFT_NUMPY_GPI.py
:reveals the problem is that the second argument of
np.insert
is supposed to be the index/indices of the insertion. These indices have to be an int or boolean, butnp.ones
defaults to creating an array of floats.I know the code used to work, so this may be a more general problem due to a change in behavior in a recent update of numpy (I am using version 1.21.5). I couldn't find anything obvious in the release notes since 1.16.0 to indicate a change in numpy causing this problem, but the fact it worked before and now doesn't suggests this approach to
np.insert
argument construction may need to be checked elsewhere in the GPI codebase.