Skip to content

Commit

Permalink
Fix deprecated numpy aliases which were removed in numpy version 2.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
d-cogswell committed Jul 30, 2024
1 parent 7d26499 commit 260ad72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions galvani/BioLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def fieldname_to_dtype(fieldname):
"|Permittivity|",
"Tan(Delta)",
):
return (fieldname, np.float_)
return (fieldname, np.float64)
elif fieldname in (
"Q charge/discharge/mA.h",
"step time/s",
Expand All @@ -66,15 +66,15 @@ def fieldname_to_dtype(fieldname):
"Efficiency/%",
"Capacity/mA.h",
):
return (fieldname, np.float_)
return (fieldname, np.float64)
elif fieldname in ("cycle number", "I Range", "Ns", "half cycle", "z cycle"):
return (fieldname, np.int_)
elif fieldname in ("dq/mA.h", "dQ/mA.h"):
return ("dQ/mA.h", np.float_)
return ("dQ/mA.h", np.float64)
elif fieldname in ("I/mA", "<I>/mA"):
return ("I/mA", np.float_)
return ("I/mA", np.float64)
elif fieldname in ("Ewe/V", "<Ewe>/V", "Ecell/V", "<Ewe/V>"):
return ("Ewe/V", np.float_)
return ("Ewe/V", np.float64)
elif fieldname.endswith(
(
"/s",
Expand Down Expand Up @@ -103,7 +103,7 @@ def fieldname_to_dtype(fieldname):
"/%",
)
):
return (fieldname, np.float_)
return (fieldname, np.float64)
else:
raise ValueError("Invalid column header: %s" % fieldname)

Expand Down

0 comments on commit 260ad72

Please sign in to comment.