Skip to content

Commit d52febc

Browse files
committed
Replaces np.float by np.float64 since it was removed in numpy 1.24
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
1 parent f11b4c9 commit d52febc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

speasy/core/data_containers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def to_dictionary(self, array_to_list=False) -> Dict[str, object]:
7373
}
7474

7575
@staticmethod
76-
def from_dictionary(dictionary: Dict[str, str or Dict[str, str] or List], dtype=np.float) -> "DataContainer":
76+
def from_dictionary(dictionary: Dict[str, str or Dict[str, str] or List], dtype=np.float64) -> "DataContainer":
7777
try:
7878
return DataContainer(values=np.array(dictionary["values"], dtype=dtype), meta=dictionary["meta"],
7979
name=dictionary["name"],
@@ -109,8 +109,8 @@ def __eq__(self, other: 'DataContainer') -> bool:
109109
np.array_equal(self.__values, other.__values, equal_nan=True)
110110

111111
def replace_val_by_nan(self, val):
112-
if self.__values.dtype != np.float:
113-
self.__values = self.__values.astype(np.float)
112+
if self.__values.dtype != np.float64:
113+
self.__values = self.__values.astype(np.float64)
114114
self.__values[self.__values == val] = np.nan
115115

116116
@property

0 commit comments

Comments
 (0)