add tests for empty list
@@ -15,6 +15,18 @@ class TestFromData(unittest.TestCase):
def test_array(self, xp, dtype, order):
return xp.array([[1, 2, 3], [2, 3, 4]], dtype=dtype, order=order)
+ @testing.for_orders('CFAK')
+ @testing.for_all_dtypes()
+ @testing.numpy_cupy_array_equal()
+ def test_array_from_empty_list(self, xp, dtype, order):
+ return xp.array([], dtype=dtype, order=order)
+
+ @testing.for_orders('CFAK')
+ @testing.for_all_dtypes()
+ @testing.numpy_cupy_array_equal()
+ def test_array_from_nested_empty_list(self, xp, dtype, order):
+ return xp.array([[], []], dtype=dtype, order=order)
+
@testing.for_orders('CFAK')
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
