Skip to content

Commit

Permalink
Fix NPY<2 compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Dec 13, 2024
1 parent 099a163 commit c1c93fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ def remove_atom_names(self, atom_names: str | list[str]):
atom_idx = self.data["atom_types"] == idx
removed_atom_idx.append(atom_idx)
picked_atom_idx = ~np.any(removed_atom_idx, axis=0)
assert not isinstance(picked_atom_idx, np.bool)
assert not isinstance(picked_atom_idx, np.bool_)
new_sys = self.pick_atom_idx(picked_atom_idx)
# let's remove atom_names
# firstly, rearrange atom_names and put these atom_names in the end
Expand Down

0 comments on commit c1c93fb

Please sign in to comment.