Repository navigation
fix(#433): to_java_float_array names the numpy extra when NumPy is missing on the native build - #434
Open
shaunpatterson wants to merge 1 commit into
Conversation
…umPy is missing on the native build
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
On the native package the conversion in
to_java_float_arraycalled_np.asarraywith_npset toNonewhen NumPy is not installed, so a list raisedAttributeError: 'NoneType' object has no attribute 'asarray'. It now raises anImportErrorthat namesarcadedb[numpy], and the docstring lists the exception.Related issues
Closes #433
Performance changes
None.
Docs
The
Raisesentry of theto_java_float_arraydocstring.Checklist
test_to_java_float_array_without_numpy_on_the_native_build_says_what_to_install, which sets_nptoNoneand the native switch on, so it runs on both wheels)tests/test_vector.pyon the JVM engine)uvx pre-commit run --files <changed files>passes