2008/7/8 Alan McIntyre <[EMAIL PROTECTED]>: > On Tue, Jul 8, 2008 at 1:29 PM, Travis E. Oliphant > <[EMAIL PROTECTED]> wrote: >> Alan McIntyre wrote: >>> 2. The behavior of __mul__ seems odd: >>> >> What is odd about this? >> >> It is patterned after >> >> >>> 'a' * 3 >> >>> 'a' * 4 >> >>> 'a' * 5 >> >> for regular python strings. > > That's what I would have expected, but for N >= 4, Q*N is the same as Q*4.
In particular, the returned type is always "string of length four", which is very peculiar - why four? I realize that variable-length strings are a problem (object arrays, I guess?), as is returning arrays of varying dtypes (strings of length N), but this definitely violates the principle of least surprise... Anne _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
