diff --git a/vayesta/core/bath/rpa.py b/vayesta/core/bath/rpa.py index b1b7b329d..a947e509e 100644 --- a/vayesta/core/bath/rpa.py +++ b/vayesta/core/bath/rpa.py @@ -71,7 +71,7 @@ def make_bno_coeff(self, cderis=None): # This is of size O(N), so this whole procedure scales as O(N^4) target_rot = einsum("ij,ab->iajb", rot_occ, rot_vir) - target_rot = target_rot.reshape(np.product(target_rot.shape[:2]), np.product(target_rot.shape[2:])) + target_rot = target_rot.reshape(np.prod(target_rot.shape[:2]), np.prod(target_rot.shape[2:])) t0 = timer() myrpa = ssRIdRRPA(self.base.mf, lov=cderis) diff --git a/vayesta/core/helper.py b/vayesta/core/helper.py index 76d1561d1..9023c8f4d 100644 --- a/vayesta/core/helper.py +++ b/vayesta/core/helper.py @@ -85,7 +85,7 @@ def unpack_arrays(packed, dtype=float, maxdim=8): unpacked.append(None) continue shape = shape[:ndim] - size = np.product(shape) + size = np.prod(shape) array, packed = np.hsplit(packed, [size]) unpacked.append(array.view(dtype).reshape(shape)) return unpacked diff --git a/vayesta/core/symmetry/operation.py b/vayesta/core/symmetry/operation.py index ad76e5481..85ffe8816 100644 --- a/vayesta/core/symmetry/operation.py +++ b/vayesta/core/symmetry/operation.py @@ -337,7 +337,7 @@ def get_atom_at(pos): if self.group.dimension == 1 and (dy != 0): continue dr = np.asarray([dx, dy, dz]) - phase = np.product(self.boundary_phases[dr != 0]) + phase = np.prod(self.boundary_phases[dr != 0]) dists = np.linalg.norm(atom_coords_abc + dr - pos, axis=1) idx = np.argmin(dists) if dists[idx] < self.xtol: diff --git a/vayesta/core/symmetry/tsymmetry.py b/vayesta/core/symmetry/tsymmetry.py index 16bef59b4..8475834e7 100644 --- a/vayesta/core/symmetry/tsymmetry.py +++ b/vayesta/core/symmetry/tsymmetry.py @@ -171,7 +171,7 @@ def get_atom_at(pos, xtol=1e-8): if cell.dimension == 1 and (dy != 0): continue dr = np.asarray([dx, dy, dz]) - phase = np.product(boundary[dr != 0]) + phase = np.prod(boundary[dr != 0]) # log.debugv("dx= %d dy= %d dz= %d phase= %d", dx, dy, dz, phase) # print(atom_coords.shape, dr.shape, pos.shape) dists = np.linalg.norm(atom_coords + dr - pos, axis=1) diff --git a/vayesta/dmet/updates.py b/vayesta/dmet/updates.py index 0bd541fc6..ded89b4b1 100644 --- a/vayesta/dmet/updates.py +++ b/vayesta/dmet/updates.py @@ -29,7 +29,7 @@ def _unflatten_params(self, params): def get_nonflat(flat_params, shapes, x): if type(shapes[0]) == int: - return flat_params[x : x + np.product(shapes)].reshape(shapes), x + np.product(shapes) + return flat_params[x : x + np.prod(shapes)].reshape(shapes), x + np.prod(shapes) else: finres = [] for shape in shapes: diff --git a/vayesta/mpi/rma.py b/vayesta/mpi/rma.py index 5a61203a2..63121844b 100644 --- a/vayesta/mpi/rma.py +++ b/vayesta/mpi/rma.py @@ -66,7 +66,7 @@ def remote_init(self): def size(self): if self.shape is None: return 0 - return np.product(self.shape) + return np.prod(self.shape) # @property # def itemsize(self): diff --git a/vayesta/tools/plotting/plotly_mol.py b/vayesta/tools/plotting/plotly_mol.py index b88930fac..51c7249cc 100644 --- a/vayesta/tools/plotting/plotly_mol.py +++ b/vayesta/tools/plotting/plotly_mol.py @@ -21,8 +21,8 @@ def mol_supercell(mol, charges, spins): mol = pyscf.pbc.tools.super_cell(mol, images) # mol = pyscf.pbc.tools.cell_plus_imgs(mol, images) # nimages = images[0]*images[1]*images[2] - # ncells = np.product(2*np.asarray(images)+1) - ncells = np.product(images) + # ncells = np.prod(2*np.asarray(images)+1) + ncells = np.prod(images) if charges is not None: charges = ncells * list(charges) if spins is not None: