Skip to content

Avoid the deprecated use of np.complex. - #3

Open
bangerth wants to merge 1 commit into
jaustermann:masterfrom
bangerth:python3-2
Open

Avoid the deprecated use of np.complex.#3
bangerth wants to merge 1 commit into
jaustermann:masterfrom
bangerth:python3-2

Conversation

@bangerth

Copy link
Copy Markdown

In Python3, you get the following error when using np.complex:

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. Did you mean: 'complex_'?

This patch does as suggested: Replace np.complex by `complex.

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

Successfully merging this pull request may close these issues.

1 participant