[Numpy-discussion] How to remove loops over inner()
engel at physics.harvard.edu
Thu Nov 29 09:48:23 EST 2007
> Essentially, you want to operate on a stack of two dimensional arrays, correct?
Yes, this is correct -- and I also think that one should be able to provide a
list of axes to be ignored.
> I'd be mildly supportive of something like this for tensordot; I'd prefer
> more descriptive name for keep_axis, but I don't know what it would be off
> the top of my head. In any event it should be XXX_axes and optionally take a
> sequence of axes so that more than one can be ignored. You could trivially
> build more specific functions on top of tensordot, so I don't see that inner
> needs to be changed as it's basically a convenience function anyway.
Good point; indeed a generalization of |tensordot()| would be sufficient for me!
I don't know the best naming here, |ignore_axes| might be a bit more descriptive.
Would this feature only require a few lines of code? Would this be easy to
implement for an expert on the intricacies of the numpy internals?
More information about the NumPy-Discussion