def test_asarraylike_array(): """ passing in a list should return a np.ndarray """ arr = np.array([1,2,3,4]) result = util.asarraylike(arr) assert result is arr
def test_asarraylike_array(): """ passing in a list should return a np.ndarray """ arr = np.array([1, 2, 3, 4]) result = util.asarraylike(arr) assert result is arr
def test_asarraylike_list(): """ Passing in a list should return a np.ndarray. """ lst = [1, 2, 3, 4] result = util.asarraylike(lst) assert isinstance(result, np.ndarray) assert np.array_equal(result, lst)
def test_asarraylike_list(): """ passing in a list should return a np.ndarray """ lst = [1,2,3,4] result = util.asarraylike(lst) print(result) assert isinstance(result, np.ndarray) assert np.array_equal(result, lst)
def test_as_test_asarraylike_dummy(): dum = DummyArrayLike() result = util.asarraylike(dum) assert result is dum