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

Migrate away from removed numpy.math #25

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

mweinelt
Copy link
Contributor

@mweinelt mweinelt commented Jan 5, 2025

This was just a wrapper for the python stdlib math anyway, so nothing was lost. Also I checked and numpy does not provide a factorial function.

Fixes the following series of errors when running with numpy 2.2.0:

FAILED tests/filterbanks_test.py::test_fb_def_and_forward_lowdim[fb_config0-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_lowdim[fb_config1-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_lowdim[fb_config2-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_lowdim[fb_config3-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_all_dims[fb_config0-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_all_dims[fb_config1-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_all_dims[fb_config2-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_def_and_forward_all_dims[fb_config3-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[2-fb_config0-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[2-fb_config1-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[2-fb_config2-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[2-fb_config3-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[3-fb_config0-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[3-fb_config1-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[3-fb_config2-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[3-fb_config3-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[4-fb_config0-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[4-fb_config1-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[4-fb_config2-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_fb_forward_multichannel[4-fb_config3-MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
FAILED tests/filterbanks_test.py::test_pinv_of[MultiphaseGammatoneFB] - AttributeError: module 'numpy' has no attribute 'math'. Did you mean: 'emath'?
======= 21 failed, 643 passed, 1494 deselected, 1091 warnings in 18.39s ========

This was just a wrapper for the python stdlib math anyway, so nothing
was lost. Also I checked and numpy does not provide a factorial function.
@mweinelt mweinelt changed the title Migrate from remove numpy.math Migrate away from removed numpy.math Jan 5, 2025
@mpariente mpariente merged commit ddecf6b into asteroid-team:master Jan 12, 2025
@mweinelt mweinelt deleted the numpy2-compat branch January 12, 2025 16:39
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.

2 participants