¡@

Home 

python Programming Glossary: np.take

Multiplying elements in a sparse array with rows in matrix

http://stackoverflow.com/questions/12237954/multiplying-elements-in-a-sparse-array-with-rows-in-matrix

COO matrix the equivalent is Z.data Y Z.row # you can use np.take which is faster then indexing. For a CSC matrix the equivalent..

Using numpy.take for faster fancy indexing

http://stackoverflow.com/questions/14491480/using-numpy-take-for-faster-fancy-indexing

complicated problem I am facing below but my problems with np.take can be summarized better as follows. Say you have an array img.. of the following not so nice looking alternatives using np.take than run much faster A single LUT on a single plane runs about.. LUT on a single plane runs about x70 faster In 2 timeit np.take lut 0 0 img 0 10 loops best of 3 78.5 ms per loop A python loop..