Skip to content

Commit

Permalink
narrow types
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Dec 10, 2024
1 parent 7c14d45 commit 099a163
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +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)
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 099a163

Please sign in to comment.