Add test for filling with a numpy scalar
@@ -42,6 +42,13 @@ class TestArrayCopyAndView(unittest.TestCase):
a.fill(1)
return a
+ @testing.for_all_dtypes()
+ @testing.numpy_cupy_array_equal()
+ def test_fill_with_numpy_ndarray(self, xp, dtype):
+ a = testing.shaped_arange((2, 3, 4), xp, dtype)
+ a.fill(numpy.ones((), dtype=dtype))
+ return a
+
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
def test_transposed_fill(self, xp, dtype):
