Skip to content

Commit

Permalink
Update numpy dependency (#1146)
Browse files Browse the repository at this point in the history
* fix: numpy migration

* build: increase numpy version
  • Loading branch information
benjamc authored Sep 25, 2024
1 parent e1e324e commit e0a1a43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def read_file(filepath: str) -> str:
include_package_data=True,
python_requires=">=3.8",
install_requires=[
"numpy>=1.23.3,<2.0.0",
"numpy",
"scipy>=1.9.2",
"psutil",
"pynisher>=1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions smac/utils/numpyencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def default(self, obj: Any) -> Any:
):
return int(obj)

elif isinstance(obj, (np.float_, np.float16, np.float32, np.float64)):
elif isinstance(obj, (np.float16, np.float32, np.float64)):
return float(obj)

elif isinstance(obj, (np.complex_, np.complex64, np.complex128)):
elif isinstance(obj, (np.complex64, np.complex128)):
return {"real": obj.real, "imag": obj.imag}

elif isinstance(obj, (np.ndarray,)):
Expand Down

0 comments on commit e0a1a43

Please sign in to comment.