[Numpy-discussion] chararray __mod__ behavior

Alan McIntyre alan.mcintyre at gmail.com
Sat Jul 19 10:33:24 EDT 2008


On Fri, Jul 18, 2008 at 8:32 AM, Stéfan van der Walt <stefan at sun.ac.za> wrote:
> That looks like a bug to me.  I would have expected at least one of
> the following to work:
>
> A % [[1, 2], [3, 4]]
> A % 1
> A % (1, 2, 3, 4)
>
> and none of them do.

I wouldn't expect the last one to work, since the shapes are
different.  The first two work if I use .flat to assign the result.

Since this actually changes the existing behavior of chararray, I
figured it deserved a tracker item:
http://scipy.org/scipy/numpy/ticket/856



More information about the NumPy-Discussion mailing list