Sorry about that, I knew better.  I was just thinking about the PEP8 
section about using 'is' for booleans.



On 4/24/2013 6:51 AM, Luke Campbell wrote:
> In ion_functions/data/adcp_functions.py:
>
>> @@ -282,8 +282,14 @@ def adcp_magvar(theta, uu, vv):
>>          [np.cos(theta_rad), np.sin(theta_rad)],
>>          [-np.sin(theta_rad), np.cos(theta_rad)]
>>      ])
>> -
>> -    nbins = len(uu)
>> +
>> +    if np.size(uu) is 1 and isinstance(uu,float):
>
> please use |==| for numeric comparisons. The keyword |is| refers to
> object identity and the only time it should be used is for comparing
> |None| or comparing the identity of complex objects.
>
> # good
> if  a  is  None:
>    pass
> # bad
> if  a==None:
>    pass
> #good
> if  a==b:
>    pass
> # dangerous
> if  a  is  b:
>    pass
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ooici/ion-functions/pull/18/files#r3936878>.
>