Skip to content

Commit 1f0b7ac

Browse files
committed
Change np.product to np.prod
1 parent c816a11 commit 1f0b7ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

deepxde/optimizers/tensorflow/tfp_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, trainable_variables, build_loss):
4848
self.indices = [] # stitch indices
4949
self.partitions = [] # partition indices
5050
for i, shape in enumerate(self.shapes):
51-
n = np.product(shape)
51+
n = np.prod(shape)
5252
self.indices.append(
5353
tf.reshape(tf.range(count, count + n, dtype=tf.int32), shape)
5454
)

deepxde/optimizers/tensorflow_compat_v1/tfp_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, build_loss):
3737
self.indices = [] # stitch indices
3838
self.partitions = [] # partition indices
3939
for i, shape in enumerate(self.shapes):
40-
n = np.product(shape)
40+
n = np.prod(shape)
4141
self.indices.append(
4242
tf.reshape(tf.range(count, count + n, dtype=tf.int32), shape)
4343
)

0 commit comments

Comments
 (0)