diff --git a/tensorboard/plugins/npmi/csv_to_plugin_data_demo.py b/tensorboard/plugins/npmi/csv_to_plugin_data_demo.py index 3ed3ab4a95..02ddb65756 100644 --- a/tensorboard/plugins/npmi/csv_to_plugin_data_demo.py +++ b/tensorboard/plugins/npmi/csv_to_plugin_data_demo.py @@ -70,7 +70,7 @@ def convert_file(file_path): for row in csv_reader: annotations.append(row[0]) values.append(row[1:]) - values = np.array(values).astype(np.float) + values = np.array(values).astype(float) writer = tf.summary.create_file_writer(os.path.dirname(file_path)) with writer.as_default(): diff --git a/tensorboard/plugins/pr_curve/summary.py b/tensorboard/plugins/pr_curve/summary.py index 826586ba47..9eed11cee9 100644 --- a/tensorboard/plugins/pr_curve/summary.py +++ b/tensorboard/plugins/pr_curve/summary.py @@ -215,7 +215,7 @@ def pb( # Compute bins of true positives and false positives. bucket_indices = np.int32(np.floor(predictions * (num_thresholds - 1))) - float_labels = labels.astype(np.float) + float_labels = labels.astype(float) histogram_range = (0, num_thresholds - 1) tp_buckets, _ = np.histogram( bucket_indices,