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

fix(datatypes): fix bad references in to_numpy() #7910

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

deepyaman
Copy link
Contributor

Description of changes

Fix bad reference to NumpyFormat; use NumpyType as in the other to_* methods.

Issues closed

Calling .to_numpy() on a DataType object resulted in:

*** ImportError: cannot import name 'NumpyFormat' from 'ibis.formats.numpy' (/opt/miniconda3/envs/pandera-dev/lib/python3.11/site-packages/ibis/formats/numpy.py)

Copy link
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

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

Thanks! Can you add a test (I think in ibis/expr/datatypes/tests/test_core.py) that would hit this code path?

@deepyaman
Copy link
Contributor Author

Thanks! Can you add a test (I think in ibis/expr/datatypes/tests/test_core.py) that would hit this code path?

Added a test. Not sure if there's a better way to get roundtripable types, but this should be sufficient (given that formats are already tested)?

Copy link
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

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

Thanks!

@jcrist jcrist merged commit 6e3fcd7 into ibis-project:main Jan 4, 2024
80 checks passed
@deepyaman deepyaman deleted the patch-3 branch January 4, 2024 21:42
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