DaloroAT / first_breaks_picking

First break picking in seismic gather
Apache License 2.0
106 stars 38 forks source link

Issue for saving data in the current version of numpy (1.24.1) #6

Closed AmirMardan closed 1 year ago

AmirMardan commented 1 year ago

For saving the data, I get this error.

np.save(args.data_dir / f'model_{k}.npy', model_and_picking)
  File "<__array_function__ internals>", line 200, in save
  File "env/lib/python3.9/site-packages/numpy/lib/npyio.py", line 521, in save
    arr = np.asanyarray(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.

To avoid this problem, the output of model_generator.get_random_model() should be converted to ndarray with dtype="object"

DaloroAT commented 1 year ago

Hey @AmirMardan

I decided to update the project's codebase. I want to update the code and add the ability for a quick and understandable launch. But it won't be a quick process. Thank you for your suggestion, but during refactoring, I will modify the code according actual version of the libraries.

DaloroAT commented 1 year ago

Hello @AmirMardan ! I've finally updated the repo, added tutorials and model weights, and released new features.

You can find updates on two URLs: https://github.com/DaloroAT/first_breaks_picking https://pypi.org/project/first-breaks-picking/