Nice function, and wonderful that it speeds some tasks up.
some feedback: the following notation is a little counter intuitive to me:Since there is nothing after the ->, I expected a scalar not a vector. I might suggest 'i...->...'>>> np.einsum('i...->', a)array([50, 55, 60, 65, 70])>>> np.sum(a, axis=0)array([50, 55, 60, 65, 70])
Just noticed also a typo in the doc:should be changed to
order : 'C', 'F', 'A', or 'K'
Controls the memory layout of the output. 'C' means it shouldbe Fortran contiguous. 'F' means it should be Fortran contiguous,order : 'C', 'F', 'A', or 'K'Controls the memory layout of the output. 'C' means it shouldbe C contiguous. 'F' means it should be Fortran contiguous,