def test_to_array_with_same_dimension_2(self): res = to_array_with_same_dimension(1, 2, 3) exp_res = np.array([1]), np.array([2]), np.array([3]) npt.assert_array_equal(res[0], exp_res[0]) npt.assert_array_equal(res[1], exp_res[1]) npt.assert_array_equal(res[2], exp_res[2]) self.assertEqual(res[0].shape[0], 1)
def test_to_array_with_same_dimension_5(self): res = to_array_with_same_dimension([1, 2, 3], 'put', None) exp_res = np.array([1, 2, 3]), np.array(['put', 'put', 'put' ]), np.array([None, None, None]) npt.assert_array_equal(res[0], exp_res[0]) npt.assert_array_equal(res[1], exp_res[1]) npt.assert_array_equal(res[2], exp_res[2])
def test_to_array_with_same_dimension(self): res = to_array_with_same_dimension([1, 2, 3], 2, None) exp_res = np.array([1, 2, 3]), np.array([2, 2, 2]), np.array([None, None, None]) npt.assert_array_equal(res[0], exp_res[0]) npt.assert_array_equal(res[1], exp_res[1]) npt.assert_array_equal(res[2], exp_res[2]) self.assertEqual(res[0].shape[0], 3)