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
I've been using VAST for my research, and I have run into a few issues with Numpy compatibility. For example, I ran the $\text{V}^2$ example script from the command line and got the following error:
python vsquared.py -c DR7_config.ini
AttributeError: module 'numpy' has no attribute 'product'
I was using numpy 2.1.3 which explains why I got this error, since np.product was deprecated in numpy 1.25.0. In an attempt to fix this issue, I changed every np.product into np.prod and reran the example scripts. This change fixed the error in $\text{V}^2$, but when I ran the VoidFinder example script, I got a new error:
python SDSS_VoidFinder_dr7.py
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
If I downgrade numpy to 1.25.0, I don't get this error anymore, and both example scripts run fine. I'm not sure what exactly is causing this new error, but it seems to be related to the version of numpy used. Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
I think this is incumbent on us to upgrade the vsquared modules to use the newer Numpy API, though 1.25.0 isn't that old yet
As for the binary incompatibility thing, thats usually an artifact related to improper numpy installations (sometimes caused by doing things like upgrading or downgrading). Often can be better to use a virtualenv and then wipe the whole virtualenv completely and reinstall, if that helps
Thanks for the tip! I'm using a mamba/conda environment and I tried both reinstalling numpy and wiping the whole environment and starting from scratch, but neither fixed the issue. I suspect that I inadvertently messed something up when I changed np.product to np.prod. After reinstalling VAST in a new mamba environment with numpy=1.24.0, everything seems to work fine!
Hi,
I've been using VAST for my research, and I have run into a few issues with Numpy compatibility. For example, I ran the$\text{V}^2$ example script from the command line and got the following error:
I was using numpy 2.1.3 which explains why I got this error, since$\text{V}^2$ , but when I ran the VoidFinder example script, I got a new error:
np.product
was deprecated in numpy 1.25.0. In an attempt to fix this issue, I changed everynp.product
intonp.prod
and reran the example scripts. This change fixed the error inIf I downgrade numpy to 1.25.0, I don't get this error anymore, and both example scripts run fine. I'm not sure what exactly is causing this new error, but it seems to be related to the version of numpy used. Any help would be appreciated!
The text was updated successfully, but these errors were encountered: