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

[Python] Make the NumPy module optional, not throwing if it's not installed #11981

Merged
merged 1 commit into from May 13, 2024

Conversation

Tishj
Copy link
Contributor

@Tishj Tishj commented May 8, 2024

This PR fixes #11871

We don't have an explicit dependency on NumPy.

Without this change, when attempting to check the type of a python object, we attempt to import this module.
If it's not available we throw, even when we are just trying to do an isinstance check.

This might require a better fix at some point, for now this makes sure the error isn't thrown if NumPy is missing.

@Mytherin Mytherin merged commit fcee4de into duckdb:main May 13, 2024
15 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request May 13, 2024
Merge pull request duckdb/duckdb#11831 from samansmink/hugging-face-fs
Merge pull request duckdb/duckdb#11981 from Tishj/python_optional_numpy
Merge pull request duckdb/duckdb#11980 from Tishj/pyfs_needs_gil
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.

python read_csv prepared statement requires numpy, non-prepared statement doesn't.
2 participants