We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running with Numpy 2.0.0 breaks things. See fipy.log.
Test failures like this:
Traceback (most recent call last): File "/nix/store/ffy6s77zhixlwvzprz5j0zj4ma8n8h2q-python3-3.11.8/lib/python3.11/doctest.py", line 1355, in __run exec(compile(example.source, filename, "single", ... File "/nix/store/4xbcd56id9azry5srn5fwh83qlin9lgb-python3-3.11.8-env/lib/python3.11/site-packages/fipy/variables/meshVariable.py", line 99, in __init__ dtype = numerix.obj2sctype(value) ^^^^^^^^^^^^^^^^^^ AttributeError: module 'fipy.tools.numerix' has no attribute 'obj2sctype'
Versions are as follows:
python 3.11.8 (main, Feb 6 2024, 21:21:21) [GCC 12.3.0] fipy 3.4.4 numpy 2.0.0 pysparse not installed scipy 1.13.1 matplotlib 3.9.0
The text was updated successfully, but these errors were encountered:
numpy.obj2sctype was deprecated in numpy 2.0.0. It looks like its original usage of converting to numpy's internal data types was deprecated in numpy 1.20.0.
numpy.obj2sctype
Unfortunately, the proposed replacement, np.dtype(obj).type, cannot be used as FiPy used numpy.obj2sctype, e.g., with numpy 1.24.3:
np.dtype(obj).type
>>> np.obj2sctype(np.array([1.0, 2.0])) numpy.float64
but, with numpy 1.24.3 or 2.0.0,
>>> np.dtype(np.array([1.0, 2.0])).type Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: Cannot construct a dtype from an array
>>> np.array([1.0, 2.0]).dtype dtype('float64')
works with either, but I'm not sure if that covers all the cases where we used it.
Sorry, something went wrong.
I think I've fixed these issues in #1050
Successfully merging a pull request may close this issue.
Running with Numpy 2.0.0 breaks things. See fipy.log.
Test failures like this:
Versions are as follows:
python 3.11.8 (main, Feb 6 2024, 21:21:21) [GCC 12.3.0]
fipy 3.4.4
numpy 2.0.0
pysparse not installed
scipy 1.13.1
matplotlib 3.9.0
The text was updated successfully, but these errors were encountered: