

def test_dot_with_floats():

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

    def dfun(x, y):
        return to_scalar(grad(fun)(x, y))
    mat1 = npr.randn(10, 11)
    vect1 = npr.randn(10)
    float1 = npr.randn()
    check_grads(fun, mat1, float1)
    check_grads(fun, float1, mat1)
    check_grads(fun, vect1, float1)
    check_grads(fun, float1, vect1)
    check_grads(dfun, mat1, float1)
    check_grads(dfun, float1, mat1)
    check_grads(dfun, vect1, float1)
    check_grads(dfun, float1, vect1)

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