Skip to content

Commit

Permalink
Merge pull request #158 from zakv/157-numpy-float-deprecated
Browse files Browse the repository at this point in the history
Replace deprecated `np.float`
  • Loading branch information
zakv authored Feb 13, 2023
2 parents acd53af + 434e5eb commit e6f61d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mloop/learners.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def __init__(self,
if min_boundary is None:
self.min_boundary = np.full((self.num_params,), -1.0)
else:
self.min_boundary = np.array(min_boundary, dtype=np.float)
self.min_boundary = np.array(min_boundary, dtype=float)
if self.min_boundary.shape != (self.num_params,):
msg = 'min_boundary array the wrong shape:' + repr(self.min_boundary.shape)
self.log.error(msg)
raise ValueError(msg)
if max_boundary is None:
self.max_boundary = np.full((self.num_params,), 1.0)
else:
self.max_boundary = np.array(max_boundary, dtype=np.float)
self.max_boundary = np.array(max_boundary, dtype=float)
if self.max_boundary.shape != (self.num_params,):
msg = 'max_boundary array the wrong shape:' + self.min_boundary.shape
self.log.error(msg)
Expand Down

0 comments on commit e6f61d6

Please sign in to comment.