Skip to content

Commit

Permalink
Merge pull request #11981 from Tishj/python_optional_numpy
Browse files Browse the repository at this point in the history
[Python] Make the NumPy module optional, not throwing if it's not installed
  • Loading branch information
Mytherin committed May 13, 2024
2 parents e9e1992 + 6557e56 commit fcee4de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/pythonpkg/scripts/cache_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@
"numpy.csingle",
"numpy.cdouble",
"numpy.clongdouble"
]
],
"required": false
},
"numpy.core": {
"type": "attribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ struct NumpyCacheItem : public PythonImportCacheItem {
PythonImportCacheItem csingle;
PythonImportCacheItem cdouble;
PythonImportCacheItem clongdouble;

protected:
bool IsRequired() const override final {
return false;
}
};

} // namespace duckdb

0 comments on commit fcee4de

Please sign in to comment.