[Numpy-discussion] Set values of a matrix within a specified range to zero
Tue Mar 30 16:40:37 CDT 2010
On Tue, Mar 30, 2010 at 16:35, Ryan May <email@example.com> wrote:
> On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
> <firstname.lastname@example.org> wrote:
>> x *= ((x <= 23) | (x >= 45)) .
> Interesting. In an ideal world, I'd love to see why exactly that is,
> because I don't think multiplication should be faster than a boolean
Branch prediction failures are really costly in modern CPUs.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion