On Thu, Jul 7, 2011 at 4:59 PM, James Bergstra <bergs...@iro.umontreal.ca> wrote: > On Thu, Jul 7, 2011 at 1:10 PM, Charles R Harris > <charlesr.har...@gmail.com> wrote: >> >> >> On Thu, Jul 7, 2011 at 11:03 AM, James Bergstra <bergs...@iro.umontreal.ca> >> wrote: >>> >>> In numpy 1.5.1, the functions PyArray_MoveInto and PyArray_CopyInto >>> don't appear to treat strides correctly. >>> >>> Evidence: >>> PyNumber_InPlaceAdd(dst, src), and modifies the correct subarray to >>> which dst points. >>> >>> In the same context, PyArray_MoveInto(dst, src) modifies the first two >>> rows of the >>> underlying matrix instead of the first two columns. PyArray_CopyInto >>> does the same. >>> >>> Is there something subtle going on here? >>> >> >> What are the strides/dims in src and dst? >> >> Chuck >> > > In dst: strides = (40,8), dims=(5,2) > in src: strides = () dims=() > > dst was sliced out of a 5x5 array of doubles. > src is a 0-d array > > James > -- > http://www-etud.iro.umontreal.ca/~bergstrj >
I figured it out - I had forgotten to call PyArray_UpdateFlags after adjusting some strides. James -- http://www-etud.iro.umontreal.ca/~bergstrj _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion