Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Data Type #55

Open
fxweidinger opened this issue Jul 13, 2023 · 10 comments
Open

Deprecated Data Type #55

fxweidinger opened this issue Jul 13, 2023 · 10 comments

Comments

@fxweidinger
Copy link

I just did a clean install via pip and ran into the following issue when trying to analyze images:

Pre-pocessing image pair: 1 Evaluating image pair: 1 Validated first pass result of image pair: 1. PIV evaluation thread stopped. module 'numpy' has no attribute 'int'.

np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

From what I gather, this should be fixed with the latest release, but the issue still occurs for me.

numpy==1.24.3
openpivgui==0.4.14

@mplough
Copy link

mplough commented Aug 27, 2023

If you have numpy>=1.24 installed, you'll see this issue because the np.int deprecation expired in numpy 1.24.0.

Use of np.int happens in OpenPIV, not in the GUI. The issue was fixed in OpenPIV/openpiv-python@97fe900 and is available in the latest version of OpenPIV, 0.25.0.

However, openpivgui 0.4.14 pins OpenPiv==0.23.8. The issue will continue to occur with new installs until the GUI either pins an earlier version of numpy or until it updates to the latest version of OpenPIV.

@alexlib
Copy link
Member

alexlib commented Sep 1, 2023

@eguvep - could we update the GUI to use the latest OpenPIV?

@newedb
Copy link

newedb commented Mar 21, 2024

new to python, openpiv and the GUI. I have to say this numpy version really gave me a headache. I am wondering if someone already figured out a workaround, which I can adopt to quickly get back to my data, instead of spending hours learning everything from ground up. Thanks a lot.

@alexlib
Copy link
Member

alexlib commented Mar 21, 2024

new to python, openpiv and the GUI. I have to say this numpy version really gave me a headache. I am wondering if someone already figured out a workaround, which I can adopt to quickly get back to my data, instead of spending hours learning everything from ground up. Thanks a lot.

please explain what is the problem now. it's not installable? which platform? what is the installation path you take?

@newedb
Copy link

newedb commented Mar 21, 2024

please explain what is the problem now. it's not installable? which platform? what is the installation path you take?

I am sorry, new to gitbub too. It is exactly the same issue in the original post, the deprecation of np.int.
I installed the latest version of python, openpiv and pienpivgui in a Windows 11 environment.
Thanks a lot.

@alexlib
Copy link
Member

alexlib commented Mar 21, 2024

you can use google user groups openpiv-users to upload your screenshots/error messages, etc. so we could get to the problem.
I'm not using Windows 11 yet, so it's a matter of testing it.

@newedb
Copy link

newedb commented Mar 21, 2024

you can use google user groups openpiv-users to upload your screenshots/error messages, etc. so we could get to the problem. I'm not using Windows 11 yet, so it's a matter of testing it.

Thanks a lot. Heading there.

@marius26
Copy link

Did you guys manage to fix the issue? I changed all np.int32 to just int and I'm still getting the error.. I can't process any image.. Is there a workaround?

@fxweidinger
Copy link
Author

fxweidinger commented Apr 16, 2024

Did you guys manage to fix the issue? I changed all np.int32 to just int and I'm still getting the error.. I can't process any image.. Is there a workaround?

No idea if you are still looking for input.
I think you're misinterpreting what was said. The use of np.int in the pinned OpenPIV version is the culprit. There is no need however to replace np.int32
I managed to fix it back in the day by manually cloning openpiv fixing the use of np.int, installing from my local sources and then installing the gui.

Obviously that's a bit of a hacky solution...
Simply pinning 0.25.0 (or newer) however will cause new errors due to various changes in that version of OpenPIV.

I could look into this, but I am unsure what the roadmap for this gui is. (If there is one? Maybe @alexlib can shed some light on this?)

@alexlib
Copy link
Member

alexlib commented Apr 16, 2024

Hi,

We created a workaround - #57 (comment)

The problem is that the newer numpy does not work with the older openpiv, but the newer openpiv version that works with newer numpy - does not work with "older" openpiv_tk_gui

Could we please work together to create an updated openpiv_tk_gui that works with the openpiv at > 0.25 version?

Thanks
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants