Exemple #1
0
def testVariance1():
    assert variance(Array((5, ), [7, 7, 8, 8, 3])) == 3.0
Exemple #2
0
def testMin():
    assert min_element(Array((5, ), [7, 0, 8, 8, 3])) == 0.0
Exemple #3
0
def testMean1():
    assert mean(Array((1, ), [5])) == 5.0
Exemple #4
0
def testVariance():
    assert variance(Array((5, ), [1, 2, 3, 4, 5])) == 2.0
Exemple #5
0
def testPrint():
    assert str(Array((1, ), True)) == "Array has 1 value(s) of type: boolean."
Exemple #6
0
def testMean():
    assert mean(Array((3, ), [8, 8, 5])) == 7.0
Exemple #7
0
def testIsEq():
    assert is_equal(Array((4, ), [5, 5, 4, 5]), Array(
        (4, ), [5, 2, 4, 5])) == [True, False, True, True]
Exemple #8
0
def testSub():
    assert sub(Array((5, ), [5, 4, 3, 10, 8]), 3) == [5, 4, 10, 8]
Exemple #9
0
def testEq():
    assert eq(Array((4, ), [5, 5, 4, 5]), Array((4, ), [5, 2, 4, 5])) == False
Exemple #10
0
def testEq1():
    assert eq(Array((4, ), [5, 2, 4, 5]), Array((4, ), [5, 2, 4, 5])) == True
Exemple #11
0
def testMul1():
    assert mul(Array((4, ), [5, 2, 42, 50]), 0) == [0, 0, 0, 0]
Exemple #12
0
def testMul():
    assert mul(Array((3, ), [8, 8, 5]), 10) == [80, 80, 50]
Exemple #13
0
def testSub1():
    assert sub(Array((2, ), [8, 10]), 8) == [10]
Exemple #14
0
def testMin1():
    assert min_element(Array((4, ), [7, 12, 8, 8])) == 7.0
Exemple #15
0
def testIsEq1():
    assert is_eq(Array((4, ), [5, 2, 4, 5]), 3) == [False, False, False, False]
Exemple #16
0
def testAdd():
    assert add(Array((3, ), [5, 4, 3]), 10) == [5, 4, 3, 10]
Exemple #17
0
def testAdd1():
    assert add(Array((4, ), [5, 4, 3, 11]), 25) == [5, 4, 3, 11, 25]