[Bug]: Conversion to scalars for arrays with ndim>0
: NumPy 1.25 deprecation (Python 3.9–3.11)
#3052
Labels
bug
Something isn't working
PyBaMM Version
23.5
Python Version
3.11
Describe the bug
From NumPy 1.25 Release Notes – Deprecations
Only ndim-0 arrays are treated as scalars. NumPy used to treat all arrays of size 1 (e.g.,
np.array([3.14])
) as scalars. In the future, this will be limited to arrays of ndim 0 (e.g.,np.array(3.14)
). The following expressions will report a deprecation warning:in numpy/numpy#10404 and numpy/numpy#10615
We convert arrays to scalars with
float()
in six locations, which bring up warnings as shown below:Steps to Reproduce
Run the test suite
Relevant log output
The text was updated successfully, but these errors were encountered: