From 69675bb0d4073754fedf29ad1dee592f988c92e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gr=C3=BCter?= Date: Sun, 7 Aug 2022 17:42:55 +0200 Subject: [PATCH] Use int instead of deprecated np.int Raised the following warning: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe.When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations --- lectures/4_segmentation.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/4_segmentation.ipynb b/lectures/4_segmentation.ipynb index 4eefa4a..54f3150 100644 --- a/lectures/4_segmentation.ipynb +++ b/lectures/4_segmentation.ipynb @@ -338,7 +338,7 @@ "indices = draw.circle_perimeter(100, 220, 25)\n", "\n", "astronaut_labels[indices] = 1\n", - "astronaut_labels[points[:, 1].astype(np.int), points[:, 0].astype(np.int)] = 2\n", + "astronaut_labels[points[:, 1].astype(int), points[:, 0].astype(int)] = 2\n", "\n", "image_show(astronaut_labels);" ]