Skip to content

Commit

Permalink
Replacing product by prod
Browse files Browse the repository at this point in the history
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
  • Loading branch information
Joao-L-S-Almeida committed Mar 26, 2024
1 parent ab3ac38 commit 44d71df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/Conv2D/scripts/mnist_increase_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def normalize(data_train, data_test):
grid_x_new, grid_y_new = np.mgrid[0:1:56j, 0:1:56j]

points = np.hstack([grid_x.flatten()[:, None], grid_y.flatten()[:, None]])
values_train = x_train.reshape(-1, np.product(dims[:]))
values_test = x_test.reshape(-1, np.product(dims[:]))
values_train = x_train.reshape(-1, np.prod(dims[:]))
values_test = x_test.reshape(-1, np.prod(dims[:]))

if not os.path.isfile(path_new):
interpolated_train_list = list()
Expand Down
2 changes: 1 addition & 1 deletion simulai/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ def __call__(

if data_preparer is None:
data_ = data.view(float)
data_flatten = data_.reshape(-1, np.product(data_.shape[1:]))
data_flatten = data_.reshape(-1, np.prod(data_.shape[1:]))
else:
data_flatten = data_preparer.prepare_input_structured_data(data)

Expand Down
2 changes: 1 addition & 1 deletion simulai/rom/_rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def __init__(self, config=None):
self.A_tilde = None
self.initial_state = None

"""The method fit from DMD receives an array with shape (nt, np.product(*dims))
"""The method fit from DMD receives an array with shape (nt, np.prod(*dims))
and constructs a model for estimating the state nt+1
"""

Expand Down
2 changes: 1 addition & 1 deletion tests/preprocessing/test_mapvalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def data_gen(self, size=None, valid_percent=0.10, mask=None):

n_samples = size[0]

n_tot = np.product(size[1:])
n_tot = np.prod(size[1:])

n_valid = int(valid_percent * n_tot)

Expand Down

0 comments on commit 44d71df

Please sign in to comment.