Visitar URL original
Remove usage of `np.complex` in favor of `complex` by namurphy · Pull Request #1617 · PlasmaPy/PlasmaPy · GitHub
Skip to content

Remove usage of np.complex in favor of complex - #1617

Merged
rocco8773 merged 2 commits into
PlasmaPy:mainfrom
namurphy:np-complex
Jul 6, 2022
Merged

rocco8773 merged 2 commits into
PlasmaPy:mainfrom
namurphy:np-complex

Conversation

@namurphy

@namurphy namurphy commented Jul 2, 2022

Copy link
Copy Markdown
Member

A quick change to fix the following warning:

plasmapy/utils/decorators/tests/test_checks.py::TestCheckValues::test_cv_method__check_value
  /home/namurphy/Projects/PlasmaPy/plasmapy/utils/decorators/tests/test_checks.py:917: DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, 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.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    np.complex(3.0),

@namurphy
namurphy marked this pull request as ready for review July 2, 2022 20:49
@github-actions github-actions Bot added the plasmapy.utils Related to the plasmapy.utils subpackage label Jul 2, 2022
@codecov

codecov Bot commented Jul 2, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #1617 (7eba647) into main (144c99f) will not change coverage.
The diff coverage is n/a.

❗ Current head 7eba647 differs from pull request most recent head 4d88023. Consider uploading reports for the commit 4d88023 to get more accurate results

@@           Coverage Diff           @@
##             main    #1617   +/-   ##
=======================================
  Coverage   97.21%   97.21%           
=======================================
  Files          83       83           
  Lines        7961     7961           
=======================================
  Hits         7739     7739           
  Misses        222      222           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 144c99f...4d88023. Read the comment docs.

@namurphy namurphy added the no changelog entry needed For PRs that should not have a changelog entry label Jul 2, 2022
@namurphy namurphy added this to the 0.9.0 milestone Jul 2, 2022
@namurphy
namurphy requested a review from a team July 6, 2022 01:29
@namurphy namurphy added the size: very small < 10 changed lines label Jul 6, 2022

@rocco8773 rocco8773 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to remain consistent with the original spirit of the tests.

@rocco8773
rocco8773 enabled auto-merge (squash) July 6, 2022 20:16
@rocco8773
rocco8773 merged commit 32b8090 into PlasmaPy:main Jul 6, 2022
@namurphy
namurphy deleted the np-complex branch May 24, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog entry needed For PRs that should not have a changelog entry plasmapy.utils Related to the plasmapy.utils subpackage size: very small < 10 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants