Skip to content

Commit

Permalink
Fix numpy 1.24 compatibility
Browse files Browse the repository at this point in the history
In numpy 1.24, the np.complex function (which was an alias for
complex) was removed.
  • Loading branch information
olebole committed Jan 18, 2023
1 parent e7f648b commit cffc0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/einsteinpy/plotting/fractal.py
Expand Up @@ -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
Expand Down

0 comments on commit cffc0ca

Please sign in to comment.