[Numpy-discussion] efficient way to do this?
Mon Sep 22 10:23:06 CDT 2008
On Mon, Sep 22, 2008 at 10:22, Robert Kern <firstname.lastname@example.org> wrote:
> ind2mark = np.asarray((ind[:,np.newaxis] + np.arange(Nmark).flat).clip(0, N-1)
> marked[ind2mark] = True
ind2mark = np.asarray((ind[:,np.newaxis] + np.arange(Nmark)).flat).clip(0, N-1)
"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