Beispiel #1
0
def test_each_col_sum():
  assert_eq_arrays(np.sum(X, axis = 0), col_sum(X), "sum cols")
Beispiel #2
0
def test_range3():
  shape = (10,20,2)
  numpy_result = np.arange(*shape)
  parakeet_result = range3(10,20,2)
  testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range3")
Beispiel #3
0
def test_each_row_sum():
  assert_eq_arrays(np.sum(X, axis = 1), each_sum(X), "sum rows")
Beispiel #4
0
def test_range2():
  shape = (100,111)
  numpy_result = np.arange(*shape)
  parakeet_result = range2(*shape)
  testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range2")
Beispiel #5
0
def test_range1():
  n = 10
  numpy_result = np.arange(n)
  parakeet_result = range1(n)
  print numpy_result, parakeet_result
  testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range1")
Beispiel #6
0
def test_range3():
    shape = (10, 20, 2)
    numpy_result = np.arange(*shape)
    parakeet_result = range3(10, 20, 2)
    testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range3")
Beispiel #7
0
def test_range2():
    shape = (100, 111)
    numpy_result = np.arange(*shape)
    parakeet_result = range2(*shape)
    testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range2")
Beispiel #8
0
def test_range1():
    n = 10
    numpy_result = np.arange(n)
    parakeet_result = range1(n)
    testing_helpers.assert_eq_arrays(numpy_result, parakeet_result, "range1")