mdot: in docs use "D-1" instead of "ndim==1".
mdot: return properly shaped result of 1D inputs.
mdot: test that the 1D input is handeled correctly