aboutsummaryrefslogtreecommitdiff
path: root/tests/test_nn_tensorflow_tflite_metrics.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_nn_tensorflow_tflite_metrics.py')
-rw-r--r--tests/test_nn_tensorflow_tflite_metrics.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_nn_tensorflow_tflite_metrics.py b/tests/test_nn_tensorflow_tflite_metrics.py
index 0e4c79c..e8d7c09 100644
--- a/tests/test_nn_tensorflow_tflite_metrics.py
+++ b/tests/test_nn_tensorflow_tflite_metrics.py
@@ -34,10 +34,10 @@ def _sample_keras_model() -> tf.keras.Model:
def _sparse_binary_keras_model() -> tf.keras.Model:
def get_sparse_weights(shape: list[int]) -> np.ndarray:
weights = np.zeros(shape)
- with np.nditer(weights, op_flags=["writeonly"]) as weight_iterator:
- for idx, value in enumerate(weight_iterator):
+ with np.nditer(weights, op_flags=[["writeonly"]]) as weight_it:
+ for idx, value in enumerate(weight_it):
if idx % 2 == 0:
- value[...] = 1.0
+ value[...] = 1.0 # type: ignore
return weights
keras_model = _sample_keras_model()