diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-04-20 13:36:53 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-04-20 13:36:53 +0200 |
commit | a16f16b94b61fc35b887d9e9f2e12c817c2819b6 (patch) | |
tree | d958cc19d9a365306b7210336157712ddfaf21b2 | |
parent | 6b9e15f0ad50915ac9d0f2a37fe769ca0a41a447 (diff) | |
download | python-numpy-a16f16b94b61fc35b887d9e9f2e12c817c2819b6.tar.gz python-numpy-a16f16b94b61fc35b887d9e9f2e12c817c2819b6.tar.bz2 python-numpy-a16f16b94b61fc35b887d9e9f2e12c817c2819b6.zip |
BUG: do not try to read data from empty src-stride 0 arrays
-rw-r--r-- | numpy/core/src/multiarray/lowlevel_strided_loops.c.src | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src index 9a5c3004d..397aaf209 100644 --- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src @@ -206,6 +206,9 @@ static NPY_GCC_OPT_3 void #else npy_uint64 temp0, temp1; #endif + if (N == 0) { + return; + } #if @is_aligned@ && @elsize@ != 16 /* sanity check */ assert(npy_is_aligned(dst, _ALIGN(@type@))); |