Using max
on a logical expression makes code difficult to
read and might be incorrect.
To determine if one or more entries in an array are true
,
use any
instead. For example:
Old | Replacement |
---|---|
max(x == y)
|
any(x == y)
|