Skip to content

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
ArcadeData:mainfrom
shaunpatterson:fix/to-java-float-array-needs-numpy
Open

shaunpatterson wants to merge 1 commit into
ArcadeData:mainfrom
shaunpatterson:fix/to-java-float-array-needs-numpy

Conversation

@shaunpatterson

Copy link
Copy Markdown

What does this PR do?

On the native package the conversion in to_java_float_array called _np.asarray with _np set to None when NumPy is not installed, so a list raised AttributeError: 'NoneType' object has no attribute 'asarray'. It now raises an ImportError that names arcadedb[numpy], and the docstring lists the exception.

Related issues

Closes #433

Performance changes

None.

Docs

The Raises entry of the to_java_float_array docstring.

Checklist

  • A regression test fails on the old code and passes on the new (test_to_java_float_array_without_numpy_on_the_native_build_says_what_to_install, which sets _np to None and the native switch on, so it runs on both wheels)
  • The test suite that the change can affect passes (tests/test_vector.py on the JVM engine)
  • uvx pre-commit run --files <changed files> passes

This branch has not been deployed

No deployments
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.

native to_java_float_array raises AttributeError for a list when NumPy is not installed

2 participants