I'm trying to use the logical_and
of two or more numpy arrays. I know numpy has the function logical_and()
, but I find the simple operator &
returns the same results and are potentially easier to use.
For example, consider three numpy arrays a, b, and c. Is
np.logical_and(a, np.logical_and(b,c))
equivalent to
a & b & c
?
If they are (more or less) equivalent, what's the advantage of using logical_and()
?