Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disallow truncation in types.arraydata (#890)
If `types.arraydata` is passed a `numpy.array` with dtype `numpy.int64` and the platform default int type is 32 bit, then `types.arraydata` truncates the array to `numpy.int32` without warning. This behavior is inherited from `numpy.astype`. Since this may lead to unexpected behavior, this PR disallows truncation by checking that the casted array is equal to the original array.
- Loading branch information