El dj 07 de 12 del 2006 a les 11:36 +0100, en/na Giorgio Luciano va
escriure:
> Does it exist a workaround for that to make numpy understand when an
> array is empty ?
> Giorgio
>
I guess there should be many. One possibility is to use .size:
In [9]:a=numpy.array([])
In [10]:a.size == False
Out
t; From: Robert Kern <[EMAIL PROTECTED]>
> Subject: Re: [Numpy-discussion] equivalent to isempty command in
> matlab (newbie question)
> To: Discussion of Numerical Python
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=UTF-8
>
> Filip Wasile
On 12/6/06, Robert Kern <[EMAIL PROTECTED]> wrote:
> 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.
Righ
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.
--
Robert Kern
"I have come to believe that the whole world is an en
On 12/6/06, Giorgio Luciano <[EMAIL PROTECTED]> wrote:
> Today I've also posted a question to scipy groups because I've thought
> I've found a solution but
>
> this work good
>
> bar(N, b1[:,0], width, color='r', yerr=binterv)
>
> s3=find(sig1[:,arange(ini,c)]<=0.001)
Just a few ti
Giorgio Luciano wrote:
> Today I've also posted a question to scipy groups because I've thought
> I've found a solution but
>
> this work good
>
> bar(N, b1[:,0], width, color='r', yerr=binterv)
>
> s3=find(sig1[:,arange(ini,c)]<=0.001)
> b1=b.flatten()
> #if s3!=[]:
> for i3
Today I've also posted a question to scipy groups because I've thought
I've found a solution but
this work good
bar(N, b1[:,0], width, color='r', yerr=binterv)
s3=find(sig1[:,arange(ini,c)]<=0.001)
b1=b.flatten()
#if s3!=[]:
for i3 in arange(len(s3)):
text(s3[i3], b1[s3[i3]+