Пример #1
0
def eval_1():
    fname = __name__ + "." + sys._getframe().f_code.co_name

    marks = 1
    from code import Q12
    from mycode import matmul
    m1 = [[12, 14], [16, 18]]
    m2 = [[12, 14], [16, 18]]
    sub = lambda: Q12.matmul(m1, m2)
    ref = lambda: matmul.matmul(m1, m2)
    return eval_matfun(fname, sub, ref)
Пример #2
0
def eval_1():
    fname = __name__ + "." + sys._getframe().f_code.co_name

    marks = 1
    from code import Q12
    from mycode import matmul
    m1 = [[12, 14], [16, 18]]
    m2 = [[12, 14], [16, 18]]
    o = Q12.matmul(m1, m2)
    e = matmul.matmul(m1, m2)
    if (equals(o, e)):
        return (marks, fname)
    else:
        return (0, fname + ": wrong answer")