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 }}
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
NdArray inconsistently coerces floats and ints #1914
I've not contributed to DocArray before - I'll take a look at the codebase this coming week sometime to see whether this is something within my capacity.
The code was using np.ndarray(value) which treats integers as shape specifications, not values. changed the code to Check for scalar types first and use np.array([value]) to explicitly wrap them in 1D arrays.
Activity
[-]NdArray inconsistently coerces floats and int[/-][+]NdArray inconsistently coerces floats and inst[/+][-]NdArray inconsistently coerces floats and inst[/-][+]NdArray inconsistently coerces floats and ints[/+]JoanFM commentedon Dec 6, 2024
Hey @nathanjmcdougall ,
Thanks for reporting the issue. We will look into it. Any chance you would be able to contribute the feature?
nathanjmcdougall commentedon Dec 6, 2024
I've not contributed to DocArray before - I'll take a look at the codebase this coming week sometime to see whether this is something within my capacity.
23Tarandeep57 commentedon Nov 24, 2025
The code was using np.ndarray(value) which treats integers as shape specifications, not values. changed the code to Check for scalar types first and use np.array([value]) to explicitly wrap them in 1D arrays.