Implement type inference for np.outer and ufunc.outer