Thanks. quite useful!!
Chao
2011/10/15 Neil
> Marc Shivers gmail.com> writes:
>
> >
> > you could use bitwise comparison with paretheses: In [8]:
> (a>4)&(a<8)Out[8]:
> array([False, False, False, False, False, True, True, True, False,
> False, False], dtype=bool)
> >
>
> For cases like th
Marc Shivers gmail.com> writes:
>
> you could use bitwise comparison with paretheses: In [8]: (a>4)&(a<8)Out[8]:
array([False, False, False, False, False, True, True, True, False,
False, False], dtype=bool)
>
For cases like this I find it very useful to define a function between()
you could use bitwise comparison with paretheses:
In [8]: (a>4)&(a<8)
Out[8]:
array([False, False, False, False, False, True, True, True, False,
False, False], dtype=bool)
On Thu, Oct 13, 2011 at 12:13 PM, Chao YUE wrote:
> Dear all,
>
> sorry for this stupid question but I cannot fin
Thanks. I starts to use python do some real data processing and has bunch of
questions.
Chao
2011/10/13 Benjamin Root
> On Thu, Oct 13, 2011 at 11:13 AM, Chao YUE wrote:
>
>> Dear all,
>>
>> sorry for this stupid question but I cannot find it in numpy tutorial or
>> google.
>> suppose I have a
On Thu, Oct 13, 2011 at 11:13 AM, Chao YUE wrote:
> Dear all,
>
> sorry for this stupid question but I cannot find it in numpy tutorial or
> google.
> suppose I have a=np.arange(11).
>
> In [32]: a < 8
> Out[32]:
> array([ True, True, True, True, True, True, True, True, False,
>Fal
On Thu, Oct 13, 2011 at 10:13 AM, Chao YUE wrote:
> Dear all,
>
> sorry for this stupid question but I cannot find it in numpy tutorial or
> google.
> suppose I have a=np.arange(11).
>
> In [32]: a < 8
> Out[32]:
> array([ True, True, True, True, True, True, True, True, False,
>Fal
Dear all,
sorry for this stupid question but I cannot find it in numpy tutorial or
google.
suppose I have a=np.arange(11).
In [32]: a < 8
Out[32]:
array([ True, True, True, True, True, True, True, True, False,
False, False], dtype=bool)
In [34]: a > 4
Out[34]:
array([False, False,