Converting rotated array to bytes, throws IndexOutOfRangeException
Taz145 opened this issue · 1 comments
Taz145 commented
Possibly related to #52
var arr1 = np.arange(24).reshape((2,3,4));
arr1 = np.rot90(arr1);
arr1.tobytes();
The above section will throw an IndexOutOfRangeException.
Full Error details:
Message:
System.IndexOutOfRangeException : Index was outside the bounds of the array.
Stack Trace:
MemoryAccess.GetByte(Int32[] Array, Int64 byte_index)
MemCopy.MemCpyInt32ToUBytes(VoidPtr Dest, Int64 DestOffset, VoidPtr Src, Int64 SrcOffset, Int64 totalBytesToCopy)
MemCopy.MemCpyToUBytes(VoidPtr Dest, Int64 DestOffset, VoidPtr Src, Int64 SrcOffset, Int64 totalBytesToCopy)
MemCopy.MemCpy(VoidPtr Dest, Int64 DestOffset, VoidPtr Src, Int64 SrcOffset, Int64 totalBytesToCopy)
numpyAPI.MemCpy(VoidPtr Dest, Int64 DestOffset, VoidPtr Src, Int64 SrcOffset, Int64 Length)
NpyCoreApi.GetBytes(ndarray arr, Byte[] bytes, NPY_ORDER order)
ndarray.ToString(NPY_ORDER order)
ndarray.tobytes(NPY_ORDER order)
Copying the array before converting to bytes does still work as a temporary workaround for the issue.
KevinBaselinesw commented
0.9.85.1 should fix this problem