

def test_outer():

    def fun(x, y):
        return to_scalar(np.outer(x, y))

    def dfun(x, y):
        return to_scalar(grad(fun)(x, y))
    vect2 = npr.randn(11)
    vect3 = npr.randn(11)
    check_grads(fun, vect2, vect3)
    check_grads(fun, vect2.T, vect3)
    check_grads(fun, vect2.T, vect3.T)
    check_grads(dfun, vect2, vect3)
    check_grads(dfun, vect2.T, vect3)
    check_grads(dfun, vect2.T, vect3.T)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_outer/original