From 260ad72a6ef0c972b702a22b2ced91116ed89e1a Mon Sep 17 00:00:00 2001 From: Dan Cogswell Date: Tue, 30 Jul 2024 10:55:48 -0400 Subject: [PATCH] Fix deprecated numpy aliases which were removed in numpy version 2.0.0. --- galvani/BioLogic.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index 4d3300d..4d91549 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -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", @@ -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", "/mA"): - return ("I/mA", np.float_) + return ("I/mA", np.float64) elif fieldname in ("Ewe/V", "/V", "Ecell/V", ""): - return ("Ewe/V", np.float_) + return ("Ewe/V", np.float64) elif fieldname.endswith( ( "/s", @@ -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)