thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

add.accumulate w/ out array same as input causes memcpy overlap (Trac #2159) #5951

Open numpy-gitbot opened 11 years ago

numpy-gitbot commented 11 years ago

Original ticket http://projects.scipy.org/numpy/ticket/2159 on 2012-06-13 by trac user shauncutts, assigned to unknown.

source looks like:

N.add.accumulate( count, axis = 1, out = count )

where count is 2-dim array.

valgrind reports:

==6607== Source and destination overlap in memcpy(0x23cdfdc0, 0x23cdfdc0, 8)
==6607== at 0x4C23ADE: memcpy (mc_replace_strmem.c:838)
==6607== by 0xAA24AAA: PyUFunc_ReductionOp (ufunc_object.c:3263)
==6607== by 0xAA25CD9: PyUFunc_GenericReduction (ufunc_object.c:3482)
==6607== by 0x41BAFC: PyObject_Call (abstract.c:2522)
==6607== by 0x17684B64: __pyx_pw_9factfiber_4stat_6pmodel_1c_9partition_9find_emm_partition (partition.c:8867

This was a call from cython, but I don't think that is important.