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] equivalent to isempty command in matlab (newbie question), (Robert Kern)
by Giorgio Luciano other posts by this author
Dec 7 2006 2:35AM messages near this date
Re: [Numpy-discussion] Numeric memory leak when building Numeric.array from numarray.array | Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question), (Robert Kern)
>  Today's Topics:
> 
>     1. Re: equivalent to isempty command in matlab	(newbie question)
>        (Robert Kern)
> 
> 
>  ----------------------------------------------------------------------
> 
>  Message: 1
>  Date: Wed, 06 Dec 2006 11:20:19 -0600
>  From: Robert Kern <robert.kern@[...].com>
>  Subject: Re: [Numpy-discussion] equivalent to isempty command in
>  	matlab	(newbie question)
>  To: Discussion of Numerical Python <numpy-discussion@[...].org>
>  Message-ID: <4576FBD3.3090601@[...].com>
>  Content-Type: text/plain; charset=UTF-8
> 
>  Filip Wasilewski wrote:
> 
>    
> > Just like for other Python objects:
> >
> > if ifs3:
> >    print "not empty"
> >     
> 
>  No, that doesn't work. numpy arrays do not have a truth value. They raise an
>  error when you try to use them in such a context.
> 
>    
Does it exist a workaround for that to make numpy understand when an 
array is empty ?
Giorgio


_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Thread:
Giorgio Luciano
Francesc Altet

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