ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
RE: [Numpy-discussion] rank-0 arrays
by Perry Greenfield other posts by this author
Sep 13 2002 8:14PM messages near this date
Re: [Numpy-discussion] rank-0 arrays | RE: [Numpy-discussion] rank-0 arrays
>  If we just implemented Python scalars for the other precisions then much
>  of this rank 0 array business would be solved as we could always return
>  the Python scalar rather than an array for rank 0 arrays.
>  
>  I believe Konrad made this suggestion many moons ago and I would agree
>  with him.
>  
>  -Travis Oliphant
>  
Hi Travis,

refresh my memory about how this proposal would work. I've heard
proposals to add new types to Python itself, but that seems out of
the question. Are you talking about adding new scalar types as 
module? E.g.

> >> x = Int8(22) 
> >> arr = arange(10, typecode = Int8)
> >> arr[2]
Int8(2)

Or some other approach? 

In any case, doesn't this still have the problem that Eric complained
about, having to test for whether a result is an array or a scalar
(which was one of the drivers to produce rank-0 results).

Thanks, Perry


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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved