[Numpy-discussion] Functions for indexing into certain parts of an array (2d)

Fernando Perez fperez.net@gmail....
Sun Jun 7 03:49:12 CDT 2009


On Sun, Jun 7, 2009 at 1:40 AM, Robert Kern<robert.kern@gmail.com> wrote:
>> Both can be useful depending on the case, but it  means leaving the
>> first argument as an untyped placeholder and  typechecking on it.  I
>> don't know if numpy has a policy on avoiding that kind of shenanigans.
>
> *I* do.

OK.  I'll go for the first form then, since that one can be used when
no array is present at that point.

If someone complains on patch review, we can always add a helper (with
a name like diag_indices_from(arr) ) for the second call  form.

Thanks,

f


More information about the Numpy-discussion mailing list