Christopher Barker wrote:
> I'm a bit confused, because I thought that when you extracted a scalar 
> from an array, you got regular python scalar for the datatypes that are 
> supported. This made it clear that you always get a numpy Scalar, which, 
> in a few situations, behaves differently than a seemingly equivalent 
> Python scalar.

Part of the point of adding scalar types was to ensure that a[0], for example,
always exposes the array interface (.shape, .dtype, etc.) whether a.shape is
(10,) or (10, 10). This uniformity aids generic programming.

-- 
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


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to