You should not modify the parameter inplace. The user don't expect that.

If we keep you new definition of axis, assert that all axis are >=0. People will mix this new definition of axes and the one from tensordot.