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] empty data matrix (are they really empty ?)
by Sven Schreiber other posts by this author
Dec 14 2006 6:20AM messages near this date
[Numpy-discussion] empty data matrix (are they really empty ?) | Re: [Numpy-discussion] empty data matrix (are they really empty ?)
[you probably should have started a new thread instead of replying to
another one...]

Giorgio Luciano schrieb:

>  In the old file I created a matrix  on the fly. I know that Numpy  and 
>  python cannot do that so I found a workaround

I'm not sure what you mean what numpy cannot do, but...

>  here's the code
>  
>  lev2=empty((1,h))

<calcs> 

>  lev=lev2[1:,]


>  So
>  First I create the empty matrix
>  Secon perform the calculation
>  Third take the matrix and exclude the first line since it has "dummy" 
...
> 
>  everything works fine.. but is this really necessary ? could not an empy 
>  just just be "really empty" ?
>  Thanks for the answers
>  
> 

you can use lev2 = empty((0,h)) as a starting point for adding rows, it
works and then nothing "dummy"-like will be in lev2

hth,
sven

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Thread:
Cameron Walsh
Rick White
Brian Granger
Eric Jones
Cameron Walsh
Rick White
Eric Jones
Cameron Walsh
Cameron Walsh
Eric Jones
Giorgio Luciano
Sven Schreiber
Christopher Barker
Cameron Walsh
Eric Jones

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