¡@

Home 

python Programming Glossary: arr_3d

Why is numpy's einsum faster than numpy's built in functions?

http://stackoverflow.com/questions/18365073/why-is-numpys-einsum-faster-than-numpys-built-in-functions

arr_2D np.arange 500 2 dtype np.double .reshape 500 500 arr_3D np.arange 500 3 dtype np.double .reshape 500 500 500 First lets.. 500 First lets look at the np.sum function np.all np.sum arr_3D np.einsum 'ijk ' arr_3D True timeit np.sum arr_3D 10 loops best.. the np.sum function np.all np.sum arr_3D np.einsum 'ijk ' arr_3D True timeit np.sum arr_3D 10 loops best of 3 142 ms per loop..