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

Robert Kern robert.kern at gmail.com
Sun Jun 7 04:40:06 EDT 2009

On Sun, Jun 7, 2009 at 03:37, Fernando Perez <fperez.net at gmail.com> wrote:
> On Sun, Jun 7, 2009 at 1:28 AM, Fernando Perez <fperez.net at gmail.com> wrote:
>> OK.  Will send it in when I know whether you'd want the fill_diagonal
>> one, and where that should go.
> One more question.  For these *_indices() functions, would you want an
> interface that accepts *either*
> diag_indices(size,ndim)
> or
> diag_indices(anarray)
> 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.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list