[Numpy-discussion] Using logical function on more than 2 arrays, availability of a "between" function ?

Matthieu Rigal rigal@rapideye....
Mon Mar 19 06:04:12 CDT 2012


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))

One possibility would have been to have the logical_and being able to handle 
more than two arrays

Another one would have been to be able to make a "double comparison" or a 
"between", like following one :

array = numpy.logical_and((aBlueChannel < 1.0), (1.0 < 
aNirChannel/aBlueChannel < 1.8))

Is there any way to get the things work this way ? Would it else be a possible 
improvement for 1.7 or a later version ?

Best Regards,
Matthieu Rigal

RapidEye AG
Molkenmarkt 30
14776 Brandenburg an der Havel
Germany
 
Follow us on Twitter! www.twitter.com/rapideye_ag
 
Head Office/Sitz der Gesellschaft: Brandenburg an der Havel
Management Board/Vorstand: Ryan Johnson
Chairman of Supervisory Board/Vorsitzender des Aufsichtsrates: 
Robert Johnson
Commercial Register/Handelsregister Potsdam HRB 24742 P
Tax Number/Steuernummer: 048/100/00053
VAT-Ident-Number/Ust.-ID: DE 199331235
DIN EN ISO 9001 certified
 



More information about the NumPy-Discussion mailing list