Closed
Description
Describe the bug
Similar to #722 but a bit different, so making a separate issue.
micropython-ulab/code/ndarray.c
Lines 1617 to 1622 in 88ef893
ivalue > 32767
should be ivalue > 65535
ulab
version: 6.7.4-4D-c
To Reproduce
from ulab import numpy as np
foo = np.ones((1), dtype=np.uint16) * 65535
print(foo)
Expected behavior
Should print:
array([65535], dtype=uint16)
Instead prints:
array([65535.0], dtype=float32)
It incorrectly promotes the dtype
to float
.
Additional context
Testing on my end, making the suggested change fixes the problem.