np.save incorrectly saves System.Byte arrays as signed
rikkitook opened this issue · 1 comments
rikkitook commented
in function GetDtypeFromType
...
if (type == typeof(Byte))
return "|i1";
...
i1 gets translated to signed integer
https://numpy.org/doc/stable/user/basics.types.html
Cle-O commented
Bump. This issue is still existing.
I am saving a numpy array (an image) with positive values only using np.save().
Positive values only are verified calling amin() on the array.
After reading the file again, the array contains negative values.
Is there a workaround for this?