You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To see this problem, select a single point in a dataset and collect over several frames to produce, e.g., Bz(x=0,t).
pgkyl 'pkpm_alf_wave_p1-field_[0-9]*.gkyl' interp -b ms -p 1 sel --comp 5 --z0 0. collect fft -p pl
File "/home/tenbarge/postgkyl/postgkyl/commands/fft.py", line 36, in fft
diag.fft(dat, kwargs['psd'], kwargs['iso'], overwrite=True)
File "/home/tenbarge/postgkyl/postgkyl/diagnostics/fft.py", line 22, in fft
grid = np.delete(grid, idx)
File "<array_function internals>", line 200, in delete
File "/home/tenbarge/miniconda3/lib/python3.8/site-packages/numpy/lib/function_base.py", line 5126, in delete
arr = asarray(arr)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
The text was updated successfully, but these errors were encountered:
This problem arises because numpy no longer accepts ragged arrays. Older versions work, they just give the below warning.
/home/tenbarge/miniconda3/lib/python3.8/site-packages/numpy/lib/function_base.py:5030: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
arr = asarray(arr)
To see this problem, select a single point in a dataset and collect over several frames to produce, e.g., Bz(x=0,t).
pgkyl 'pkpm_alf_wave_p1-field_[0-9]*.gkyl' interp -b ms -p 1 sel --comp 5 --z0 0. collect fft -p pl
File "/home/tenbarge/postgkyl/postgkyl/commands/fft.py", line 36, in fft
diag.fft(dat, kwargs['psd'], kwargs['iso'], overwrite=True)
File "/home/tenbarge/postgkyl/postgkyl/diagnostics/fft.py", line 22, in fft
grid = np.delete(grid, idx)
File "<array_function internals>", line 200, in delete
File "/home/tenbarge/miniconda3/lib/python3.8/site-packages/numpy/lib/function_base.py", line 5126, in delete
arr = asarray(arr)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
The text was updated successfully, but these errors were encountered: