Skip to content

Commit

Permalink
Change np.product to np.prod (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
vl-dud authored Nov 10, 2024
1 parent c816a11 commit 9ba2019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deepxde/optimizers/tensorflow/tfp_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, trainable_variables, build_loss):
self.indices = [] # stitch indices
self.partitions = [] # partition indices
for i, shape in enumerate(self.shapes):
n = np.product(shape)
n = np.prod(shape)
self.indices.append(
tf.reshape(tf.range(count, count + n, dtype=tf.int32), shape)
)
Expand Down
2 changes: 1 addition & 1 deletion deepxde/optimizers/tensorflow_compat_v1/tfp_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, build_loss):
self.indices = [] # stitch indices
self.partitions = [] # partition indices
for i, shape in enumerate(self.shapes):
n = np.product(shape)
n = np.prod(shape)
self.indices.append(
tf.reshape(tf.range(count, count + n, dtype=tf.int32), shape)
)
Expand Down

0 comments on commit 9ba2019

Please sign in to comment.