On 03/25/2012 12:22 PM, Pierre Haessig wrote:
> Hi Eric,
>
> Thanks for the hints !
>
> Le 25/03/2012 20:33, Eric Firing a écrit :
>> Using the bitwise operators in place of logical operators is a hack to
>> get around limitations of the language; but, if done carefully, it is a
>> useful one.
> Wh
Hi Eric,
Thanks for the hints !
Le 25/03/2012 20:33, Eric Firing a écrit :
> Using the bitwise operators in place of logical operators is a hack to
> get around limitations of the language; but, if done carefully, it is a
> useful one.
What is the rationale behind not overloading __and__ & othe
On 03/25/2012 06:55 AM, Pierre Haessig wrote:
> Hi,
>
> I have an off topic but somehow related question :
>
> Le 19/03/2012 12:04, Matthieu Rigal a écrit :
>> array = numpy.logical_and(numpy.logical_and(aBlueChannel< 1.0, aNirChannel>
>> (aBlueChannel * 1.0)), aNirChannel< (aBlueChannel * 1.8))
Hi,
I have an off topic but somehow related question :
Le 19/03/2012 12:04, Matthieu Rigal a écrit :
> array = numpy.logical_and(numpy.logical_and(aBlueChannel < 1.0, aNirChannel >
> (aBlueChannel * 1.0)), aNirChannel < (aBlueChannel * 1.8))
Is there any significant difference between :
z = np.
ginal solution, even if
>> probably using less memory than the 2 previous ones. (same was possible
>> with operator +, but slower than operator *)
>>
>> Regards,
>> Matthieu Rigal
>>
>> On Monday 19 March 2012 18:00:02 numpy-discussion-req
with operator +, but slower than operator *)
>
> Regards,
> Matthieu Rigal
>
> On Monday 19 March 2012 18:00:02 numpy-discussion-requ...@scipy.org wrote:
> > Message: 2
> > Date: Mon, 19 Mar 2012 13:20:23 +0000
> > From: Richard Hattersley
> > Subject:
What do you mean by "efficient"? Are you trying to get it execute
faster? Or using less memory? Or have more concise source code?
Less memory:
- numpy.vectorize would let you get to the end result without any
intermediate arrays but will be slow.
- Using the "out" parameter of numpy.logical_and
Dear Numpy fellows,
I have actually a double question, which only aims to answer a single one :
how to get the following line being processed more efficiently :
array = numpy.logical_and(numpy.logical_and(aBlueChannel < 1.0, aNirChannel >
(aBlueChannel * 1.0)), aNirChannel < (aBlueChannel * 1.8