Skip to content

Commit 04bbe7f

Browse files
authored
change np.Inf to np.inf for numpy>2.0 (#1863)
1 parent ba8e824 commit 04bbe7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deepxde/callbacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __init__(
137137
self.monitor = monitor
138138
self.monitor_op = np.less
139139
self.epochs_since_last_save = 0
140-
self.best = np.Inf
140+
self.best = np.inf
141141

142142
def on_epoch_end(self):
143143
self.epochs_since_last_save += 1
@@ -221,7 +221,7 @@ def on_train_begin(self):
221221
if self.baseline is not None:
222222
self.best = self.baseline
223223
else:
224-
self.best = np.Inf if self.monitor_op == np.less else -np.Inf
224+
self.best = np.inf if self.monitor_op == np.less else -np.inf
225225

226226
def on_epoch_end(self):
227227
if self.model.train_state.epoch < self.start_from_epoch:

0 commit comments

Comments
 (0)