Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'numpy' has no attribute 'complex'. #853

Open
Hemilibeatriz opened this issue Jul 18, 2024 · 0 comments
Open

AttributeError: module 'numpy' has no attribute 'complex'. #853

Hemilibeatriz opened this issue Jul 18, 2024 · 0 comments

Comments

@Hemilibeatriz
Copy link

When i run:

import imgaug.augmenters as iaa
import imageio.v2 as imageio
import matplotlib.pyplot as plt

image = imageio.imread('/content/drive/MyDrive/Teste_Colab/images/cyclamen-3659141_1280.jpg')

# Nevoeiro
aug_fog = iaa.Fog()
image_fog = aug_fog(image=image)

# Chuva
aug_rain = iaa.Rain(drop_size=(0.1, 0.2), speed=(0.1, 0.3))
image_rain = aug_rain(image=image)

# Mostrar imagens
plt.figure(figsize=(10, 3))
plt.subplot(1, 2, 1)
plt.imshow(image_fog)
plt.title('Fog')
plt.axis('off')
plt.subplot(1, 2, 2)
plt.imshow(image_rain)
plt.title('Rain')
plt.axis('off')
plt.show()

I got:

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

But all the others augmentations works... What´s wrong? Any ideas I would be most grateful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant