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

Deprecation warning of np.str and np.object #846

Closed
seisman opened this issue Feb 6, 2021 · 0 comments · Fixed by #847
Closed

Deprecation warning of np.str and np.object #846

seisman opened this issue Feb 6, 2021 · 0 comments · Fixed by #847
Labels
help wanted Helping hands are appreciated maintenance Boring but important stuff for the core devs

Comments

@seisman
Copy link
Member

seisman commented Feb 6, 2021

Running the tests gives the following warnings:

DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. 
To silence this warning, use `str` by itself. 
Doing this will not modify any behavior and is safe. 
If you specifically wanted the numpy scalar type, use `np.str_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    @pytest.mark.parametrize("dtype", [np.str, np.object])
DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. 
To silence this warning, use `object` by itself.
Doing this will not modify any behavior and is safe. 
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    @pytest.mark.parametrize("dtype", [str, np.object])

We may need to replace np.str with str, np.object with object.

@seisman seisman added maintenance Boring but important stuff for the core devs help wanted Helping hands are appreciated labels Feb 6, 2021
@seisman seisman changed the title Deprecation warning of np.str Deprecation warning of np.str and np.object Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Helping hands are appreciated maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant