From d476e93da93e34a3ecd88cf59769513465c4e093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=94=CC=B7=CD=98=CC=94=CD=8C=CD=90=CC=BF=CD=8A=CD=A0?= =?UTF-8?q?=CC=8C=CD=81=CC=84=CC=91=CC=BF=CD=83=CC=89=CC=88=CC=80=CC=AD?= =?UTF-8?q?=CC=BA=CC=99=CC=9E=CD=96=CC=A8=CC=96=CD=95=CC=B0=CC=A5=CC=99?= =?UTF-8?q?=CC=AF=CD=99=CC=9E=CC=AF=CC=A7=CC=A1=CC=97=CE=BB=CC=B6=CC=8D?= =?UTF-8?q?=CC=8F=CD=8C=CC=85=CD=83=CD=83=CD=82=CC=8D=CC=BE=CC=94=CD=94?= =?UTF-8?q?=CD=93=CC=98=CC=98=CC=B3=CD=87=CD=9C=CC=BB=CE=BB=CC=B6=CC=8E?= =?UTF-8?q?=CC=90=CD=86=CD=82=CC=BD=CD=98=CC=93=CC=87=CC=81=CD=8C=CC=81?= =?UTF-8?q?=CD=80=CC=8F=CC=8E=CC=85=CC=9B=CD=8B=CC=8F=CC=8A=CC=AF=CC=96?= =?UTF-8?q?=CC=AF=CC=B2=CC=B1=CD=8E=CC=99=CD=8E=CE=BB=CC=B6=CD=81=CC=90?= =?UTF-8?q?=CC=92=CC=B0=CC=9F=CC=AF=CC=AB=CC=B2=CC=A8=CC=B2=CC=AB=CC=AF?= =?UTF-8?q?=CC=AD=CC=A4=CC=B3=CC=BC=CC=AB=CC=A8=CD=89=CC=B9=CC=9E=CE=94?= =?UTF-8?q?=CC=B7=CC=84=CC=8F=CC=82=CC=9B=CC=9A=CD=9B=CC=85=CC=8C=CD=97?= =?UTF-8?q?=CC=82=CC=BD=CC=85=CD=80=CD=86=CC=BF=CC=94=CC=A5=CC=96=CD=87?= =?UTF-8?q?=CD=9A=CD=8D=CD=9C=CC=A1=CD=8D?= Date: Wed, 10 Jan 2024 11:00:37 -0500 Subject: [PATCH] Update fractal_dimension.py AttributeError: scipy.misc is deprecated and has no attribute imread. --- code/fractal_dimension.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/fractal_dimension.py b/code/fractal_dimension.py index 60d9405..2a39892 100644 --- a/code/fractal_dimension.py +++ b/code/fractal_dimension.py @@ -25,11 +25,11 @@ def boxcount(Z, k): if __name__ == '__main__': - from scipy import misc + import imageio.v2 as imageio import matplotlib.pyplot as plt import matplotlib.patches as patches - Z = 1.0 - misc.imread("../data/Great-Britain.png")/255 + Z = 1.0 - imageio.imread("../data/Great-Britain.png")/255 print(fractal_dimension(Z, threshold=0.25))