Skip to content

Commit

Permalink
Replace usage of np.float with float (#147) (#150)
Browse files Browse the repository at this point in the history
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 of Numpy is used.

"AttributeError: module 'numpy' has no attribute 'float'."

This commit replace np.float with float to solve this error.
  • Loading branch information
jagandecapri committed Apr 17, 2023
1 parent 017ea78 commit e3bbf53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyEPR/calcs/back_box_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def epr_numerical_diagonalization(freqs, Ljs, ϕzpf,
assert(all(Ljs < 1E-3)
), "Please input the inductances in Henries. \N{nauseated face}"

Hs = black_box_hamiltonian(freqs * 1E9, Ljs.astype(np.float), fluxQ*ϕzpf,
Hs = black_box_hamiltonian(freqs * 1E9, Ljs.astype(float), fluxQ*ϕzpf,
cos_trunc, fock_trunc, individual=use_1st_order,
non_linear_potential = non_linear_potential)
f_ND, χ_ND, _, _ = make_dispersive(
Expand Down

0 comments on commit e3bbf53

Please sign in to comment.