From 80802c248dab2f6feaabeb9448f33bc99338645b Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Thu, 25 Jul 2024 10:23:32 -0700 Subject: [PATCH] [numpy] Fix users of NumPy APIs that are removed in NumPy 2.0. This change migrates users of APIs removed in NumPy 2.0 to their recommended replacements (https://numpy.org/devdocs/numpy_2_0_migration_guide.html). PiperOrigin-RevId: 655999944 --- .../privacy/fast_gradient_clipping/common_test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_privacy/privacy/fast_gradient_clipping/common_test_utils.py b/tensorflow_privacy/privacy/fast_gradient_clipping/common_test_utils.py index 06e139e..5977e66 100644 --- a/tensorflow_privacy/privacy/fast_gradient_clipping/common_test_utils.py +++ b/tensorflow_privacy/privacy/fast_gradient_clipping/common_test_utils.py @@ -359,7 +359,7 @@ def make_weighted_bow_model( feature_shape = input_dims + output_dims feature_weights = tf.expand_dims( tf.reshape( - tf.range(np.product(feature_shape), dtype=tf.float32), + tf.range(np.prod(feature_shape), dtype=tf.float32), feature_shape, ), axis=0,