Re: [Numpy-discussion] rank-0 arrays
by Pearu Peterson other posts by this author
Sep 13 2002 3:47PM messages near this date
Re: [Numpy-discussion] rank-0 arrays
|
Re: [Numpy-discussion] rank-0 arrays
On Fri, 13 Sep 2002, Todd Miller wrote:
> Two other issues come up trying to implement the "rank-0 experiment":
>
> 1. What should be the behavior of subscripting a rank-0 array?
>
> a. Return the scalar value (what numarray does
> now. seems inconsistent)
-0.5
> b. Raise an exception
+1
> c. Return a copy of the rank-0 array
-1
> 2. What's a decent notation for .asScalar()?
>
> a. a[ <subscript_resulting_in_rank0> ][0] (what numarray
> does now)
+-0, just be consistent.
> b. a[ <subscript_resulting_in_rank0> ]() (override
> __call__)
-1
> c. a[ <subscript_resulting_in_rank0> ].asScalar()
+0.5
Pearu
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Perry Greenfield
Travis Oliphant
Pearu Peterson
Konrad Hinsen
Perry Greenfield
Todd Miller
Pearu Peterson
Konrad Hinsen
Travis Oliphant
Konrad Hinsen
Perry Greenfield
Travis Oliphant
Tim Hochberg
Chris Barker
Konrad Hinsen
Perry Greenfield
Travis Oliphant
Pearu Peterson
Tim Hochberg
Perry Greenfield
Konrad Hinsen
Perry Greenfield
eric jones
Konrad Hinsen
eric jones
Konrad Hinsen
Tim Hochberg
Tim Hochberg
Paul F Dubois
Scott Gilbert
Konrad Hinsen
|