[SciPy-user] assign to diagonal values?

Robert Kern robert.kern@gmail....
Sat May 23 16:05:01 CDT 2009


On Sat, May 23, 2009 at 16:02, Alan G Isaac <aisaac@american.edu> wrote:
> On 1/31/2008 1:37 AM Anne Archibald apparently wrote:
>> m[range(n),range(n)]=new_diagonal
>
> Will that work with range objects (in Python 3)?

No. The automatic conversion to arrays does not consume iterators (nor
will it when we port to Python 3).

-- 
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 SciPy-user mailing list