diff options
author | Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com> | 2022-09-30 09:17:50 -0700 |
---|---|---|
committer | Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com> | 2023-01-04 02:19:18 -0800 |
commit | 37af59f00b55f63717172e7bfd07be1ed4878d68 (patch) | |
tree | 399cd4214183251efa2468ebe266b6d0f8df2958 /numpy | |
parent | f33274b8e7f7c3f8071330684d010d97dbd45536 (diff) | |
download | numpy-37af59f00b55f63717172e7bfd07be1ed4878d68.tar.gz |
Resolve linux32 stride failures
On linux 32 an assert fires where stride (12) passed from ufunc_object (try_trivial_single_output_loop) to DOUBLE_isnan and DOUBLE_isfinite doesn't match the type size (8), we can relax this assert and instead fall back to the UNARY_LOOP path instead
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/umath/loops_unary_fp.dispatch.c.src | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/src/umath/loops_unary_fp.dispatch.c.src b/numpy/core/src/umath/loops_unary_fp.dispatch.c.src index 543402f6f..54459d545 100644 --- a/numpy/core/src/umath/loops_unary_fp.dispatch.c.src +++ b/numpy/core/src/umath/loops_unary_fp.dispatch.c.src @@ -709,9 +709,10 @@ NPY_NO_EXPORT void NPY_CPU_DISPATCH_CURFX(@TYPE@_@kind@) const int olsize = sizeof(npy_bool); const npy_intp istride = istep / ilsize; const npy_intp ostride = ostep / olsize; - assert(len <= 1 || (istep % ilsize == 0 && ostep % olsize == 0)); + assert(len <= 1 || ostep % olsize == 0); - if (!is_mem_overlap(ip, istep, op, ostep, len) && + if ((istep % ilsize == 0) && + !is_mem_overlap(ip, istep, op, ostep, len) && npyv_loadable_stride_@sfx@(istride) && npyv_storable_stride_@sfx@(ostride)) { |