Skip to content

fix(#433): to_java_float_array names the numpy extra when NumPy is missing on the native build - #434

Merged
tae898 merged 1 commit into
ArcadeData:mainfrom
shaunpatterson:fix/to-java-float-array-needs-numpy
Nov 22, 2026
Merged

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

Conversation

@shaunpatterson

Copy link
Copy Markdown
Contributor

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

@tae898
tae898 merged commit 808a49e into ArcadeData:main Nov 22, 2026
44 checks passed
@github-actions github-actions Bot added this to the 26.12.1 milestone Nov 22, 2026
@tae898 tae898 added the bug Something isn't working label Nov 22, 2026
@tae898

tae898 commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Thank you, merged for 26.12.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

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