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[2]: [Numpy-discussion] The idiom for supporting matrices and arrays in a function
by Alan G Isaac other posts by this author
Mar 2 2006 6:59AM messages near this date
Re: [Numpy-discussion] Numpy licenses | Re: Re[2]: [Numpy-discussion] The idiom for supporting matrices and arrays in a function
On Thu, 02 Mar 2006, "Colin J. Williams" apparently wrote: 
>  How does asanyyarray() differ from asarray()? 

It leaves alone subclasses of ndarray.  See example below.
Cheers,
Alan Isaac

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
> >> import numpy as N
> >> y=N.mat([[1,2],[3,4]])
> >> z1=N.asarray(y)
> >> z2=N.asanyarray(y)
> >> z1
array([[1, 2],
       [3, 4]])
> >> z2
matrix([[1, 2],
       [3, 4]])
> >>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Alan G Isaac
Bill Baxter
Alan G Isaac

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