You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native package without NumPy: SELECT of a record with a float array raises ModuleNotFoundError #444
bugSomething isn't workingin progressThe team is actively working on this issuenativeThe arcadedb package (native library build)pythonPull requests that update python codevectorVector indexes and find_nearest
On the native package (arcadedb) in an environment without NumPy, reading a record that holds a float array raises ModuleNotFoundError: No module named 'numpy'. NumPy is an optional extra of the package (arcadedb[numpy]), so a plain query should not need it.
I saw it on 26.11.1.post2 during the export and import study (#369, comment of 2026-11-11): a SELECT of a record with an ARRAY_OF_FLOATS property, in an environment that had only the wheel.
Cause
Read on main at 6219570. I did not run it again.
src/arcadedb/_native/database.py asks for the binary reply on every statement. _BINARY_REPLY is on by default, so flag 4 goes to arcadedb_n_exec, and the later batches are read through arcadedb_n_next_bin. Whether NumPy can be imported is not part of that decision.
With that flag the library returns float arrays (8 elements or more, by the comment in lib.py) as a float32 tail after the JSON text.
_take in src/arcadedb/_native/lib.py reads that tail with import numpy as np and np.frombuffer, and nothing guards the import. Without NumPy it fails there.
#434 (for #433) fixed another path, to_java_float_array in vector.py. It changed vector.py and tests/test_vector.py only, so this path is as it was.
Expected
The same rows with and without NumPy. The float array already arrives as a Python list (codec.loads calls .tolist() on the slice of the tail), so NumPy is only the reader here.
Possible fix
Do not ask for the float tail when NumPy is missing, or read the tail without NumPy (array.array("f") does it from the standard library).
A test on the native wheel that runs a SELECT of a float array property with NumPy blocked.
Not checked
I did not run this on main or on 26.11.1.post4. By reading the code, ARCADEDB_NATIVE_BIN_REPLY=0 turns the tail off and should avoid the error until it is fixed. I have not tried that.
bugSomething isn't workingin progressThe team is actively working on this issuenativeThe arcadedb package (native library build)pythonPull requests that update python codevectorVector indexes and find_nearest
Activity
test(#444): the INSERT of the NumPy-free test runs in a transaction
fix(#444): the native reply reader reads the float32 tail without Num…