1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Ole Streicher <olebole@debian.org>
Date: Wed, 18 Jan 2023 18:58:15 +0100
Subject: Fix numpy 1.24 compatibility
In numpy 1.24, the np.complex function (which was an alias for
complex) was removed.
URL: https://github.com/einsteinpy/einsteinpy/pull/628
Closes: #1027198
---
src/einsteinpy/plotting/fractal.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/einsteinpy/plotting/fractal.py b/src/einsteinpy/plotting/fractal.py
index 53096a9..80c51db 100644
--- a/src/einsteinpy/plotting/fractal.py
+++ b/src/einsteinpy/plotting/fractal.py
@@ -17,7 +17,7 @@ def _julia(A, c, zabs_max, i, j, dims, x_range, y_range, iter_max):
ymin, ymax = y_range
xwidth, ywidth = xmax - xmin, ymax - ymin
it = 0
- z = np.complex((i / width) * xwidth + xmin + 1j * ((j / height) * ywidth + ymin))
+ z = complex((i / width) * xwidth + xmin + 1j * ((j / height) * ywidth + ymin))
while abs(z) < zabs_max and it < iter_max:
z = z ** 2 + c
it += 1
|