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 >> scipy-user
scipy-user
Re: [SciPy-user] Best/Safest way to parse NumPy array in C extension?
by Lou Pecora other posts by this author
Dec 12 2006 1:20PM messages near this date
Re: [SciPy-user] How to delete attachments sent to the SciPy Wiki? | Re: [SciPy-user] feed-forward neural network for python
Thanks. I also found .flags.contiguous after some
googling.  You give a good example for the
non-contiguous case. 

-- Lou

--- Fernando Perez <fperez.net@[...].com>  wrote:

>  On 12/12/06, Lou Pecora <lou_boog2000@[...].com>
>  wrote:
>  
>  > I will have to learn how to check for contiguous
>  in
>  > Python.
>  
>  Easy:
>  
>  In [1]: import numpy as N
>  
>  In [2]: a=N.arange(10)
>  
>  In [3]: b=a[::2]
>  
>  In [4]: a.flags.contiguous
>  Out[4]: True
>  
>  In [5]: b.flags.contiguous
>  Out[5]: False
>  
>  
>  Cheers,
>  
>  f



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
_______________________________________________
SciPy-user mailing list
SciPy-user@[...].org
http://projects.scipy.org/mailman/listinfo/scipy-user
Thread:
Fernando Perez
Lou Pecora
Fred
Lou Pecora
Fred
Robert Kern
Lou Pecora
Lou Pecora

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