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

Fernando Perez fperez.net at gmail.com
Sun Jun 7 04:49:12 EDT 2009

On Sun, Jun 7, 2009 at 1:40 AM, Robert Kern<robert.kern at 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.



More information about the NumPy-Discussion mailing list