Skip to content

Commit

Permalink
Fix NumPy 2.0 np.string_->np.bytes_
Browse files Browse the repository at this point in the history
`AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.`
  • Loading branch information
dweindl committed Sep 16, 2024
1 parent 5bee453 commit a65bbc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/parpe/hdf5_pe_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,8 @@ def write_optimization_options(f: h5py.File) -> None:
# set IpOpt options
g = f.require_group('optimizationOptions/ipopt')
g.attrs['max_iter'] = 100
g.attrs['hessian_approximation'] = np.string_("limited-memory")
g.attrs["limited_memory_update_type"] = np.string_("bfgs")
g.attrs['hessian_approximation'] = np.bytes_("limited-memory")
g.attrs["limited_memory_update_type"] = np.bytes_("bfgs")
g.attrs["tol"] = 1e-9
g.attrs["acceptable_iter"] = 1
# set ridiculously high, so only the acceptable_* options below matter
Expand Down

0 comments on commit a65bbc8

Please sign in to comment.