Skip to content

Commit

Permalink
Replace depreceated numpy.product with numpy.prod
Browse files Browse the repository at this point in the history
  • Loading branch information
chazeon committed Jul 16, 2024
1 parent feac821 commit fdf37b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dynaphopy/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def get_force_sets(self):

if not isinstance(self._force_sets,type(None)):
force_atoms_file = self._force_sets.get_dict()['natom']
force_atoms_input = np.product(np.diagonal(self._force_sets.get_supercell())) * self.get_number_of_atoms()
force_atoms_input = np.prod(np.diagonal(self._force_sets.get_supercell())) * self.get_number_of_atoms()

if force_atoms_file != force_atoms_input:
print("Error: FORCE_SETS file does not match with SUPERCELL MATRIX")
Expand Down
2 changes: 1 addition & 1 deletion dynaphopy/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def crop_trajectory(self, last_steps):

def get_number_of_atoms(self):
if self._number_of_atoms is None:
self._number_of_atoms = self.structure.get_number_of_atoms()*np.product(self.get_supercell_matrix())
self._number_of_atoms = self.structure.get_number_of_atoms()*np.prod(self.get_supercell_matrix())
return self._number_of_atoms

def set_time(self, time):
Expand Down

0 comments on commit fdf37b6

Please sign in to comment.