zlatko-minev / pyEPR

Powerful, automated analysis and design of quantum microwave chips & devices [Energy-Participation Ratio and more]
https://pyepr-docs.readthedocs.io
Other
160 stars 219 forks source link

Replace usage of np.float with float (#147) #150

Closed jagandecapri closed 1 year ago

jagandecapri commented 1 year ago

Fixes issue #147

The epr_numerical_diagonalization function uses np.float which has been deprecated in Numpy.

Refer https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

The continued usage of np.float yields the following error in the epr_numerical_diaganolization function when later versions (tested on v1.24.2) of Numpy is used.

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. 
To avoid this error in existing code, use `float` by itself. 
Doing this will not modify any behavior and is safe. 
If you specifically wanted the numpy scalar type, use `np.float64` here.
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations.

This PR replaces np.float with float to solve this error.

zlatko-minev commented 1 year ago

Thanks!