mirror of
https://github.com/echemdata/galvani.git
synced 2025-12-14 01:15:34 +00:00
Fix deprecated numpy aliases which were removed in numpy version 2.0.0.
This commit is contained in:
@@ -56,7 +56,7 @@ def fieldname_to_dtype(fieldname):
|
|||||||
"|Permittivity|",
|
"|Permittivity|",
|
||||||
"Tan(Delta)",
|
"Tan(Delta)",
|
||||||
):
|
):
|
||||||
return (fieldname, np.float_)
|
return (fieldname, np.float64)
|
||||||
elif fieldname in (
|
elif fieldname in (
|
||||||
"Q charge/discharge/mA.h",
|
"Q charge/discharge/mA.h",
|
||||||
"step time/s",
|
"step time/s",
|
||||||
@@ -66,15 +66,15 @@ def fieldname_to_dtype(fieldname):
|
|||||||
"Efficiency/%",
|
"Efficiency/%",
|
||||||
"Capacity/mA.h",
|
"Capacity/mA.h",
|
||||||
):
|
):
|
||||||
return (fieldname, np.float_)
|
return (fieldname, np.float64)
|
||||||
elif fieldname in ("cycle number", "I Range", "Ns", "half cycle", "z cycle"):
|
elif fieldname in ("cycle number", "I Range", "Ns", "half cycle", "z cycle"):
|
||||||
return (fieldname, np.int_)
|
return (fieldname, np.int_)
|
||||||
elif fieldname in ("dq/mA.h", "dQ/mA.h"):
|
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"):
|
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>"):
|
elif fieldname in ("Ewe/V", "<Ewe>/V", "Ecell/V", "<Ewe/V>"):
|
||||||
return ("Ewe/V", np.float_)
|
return ("Ewe/V", np.float64)
|
||||||
elif fieldname.endswith(
|
elif fieldname.endswith(
|
||||||
(
|
(
|
||||||
"/s",
|
"/s",
|
||||||
@@ -103,7 +103,7 @@ def fieldname_to_dtype(fieldname):
|
|||||||
"/%",
|
"/%",
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
return (fieldname, np.float_)
|
return (fieldname, np.float64)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid column header: %s" % fieldname)
|
raise ValueError("Invalid column header: %s" % fieldname)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user