[SciPy-Dev] Official alias for logical_not?
Fri Sep 9 04:13:35 CDT 2011
Hm, I see I should have read the documentation more carefully and noticed:
"If you know you have boolean arguments, you can get away with using Numpy's
bitwise operators, but be careful with parentheses, like this: z = (x > 1) &
(x < 2). The absence of Numpy operator forms of logical_and and logical_or
is an unfortunate consequence of Python's design." on
So, the solution to my problems were parenthese. Thank you for the hint and
not saying RTFM :-)
2011/9/9 Pauli Virtanen <firstname.lastname@example.org>
> Fri, 09 Sep 2011 09:21:14 +0100, Joscha Schmiedt wrote:
> > expressions compared to ~, & and xor in Matlab. Therefore, I regularly
> > find myself creating aliases as n_ for them, which is basically fine,
> > but I could imagine other people doing so.
> > So, are there any plans for officially creating shorthand aliases for
> > the logical_ functions?
> For boolean arrays, ~, &, ^ et al. are the logical operations.
> SciPy-Dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev