-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Closed
Description
The return type of blas_stride
is int
, but it contains a comparison to MAX_INT64
:
numpy/numpy/core/src/multiarray/common.h
Lines 299 to 317 in 64619c5
static NPY_INLINE int | |
blas_stride(npy_intp stride, unsigned itemsize) | |
{ | |
/* | |
* Should probably check pointer alignment also, but this may cause | |
* problems if we require complex to be 16 byte aligned. | |
*/ | |
if (stride > 0 && npy_is_aligned((void *)stride, itemsize)) { | |
stride /= itemsize; | |
#ifndef HAVE_BLAS_ILP64 | |
if (stride <= INT_MAX) { | |
#else | |
if (stride <= NPY_MAX_INT64) { | |
#endif | |
return stride; | |
} | |
} | |
return 0; | |
} |