diff --git a/dpnp/dpnp_array.py b/dpnp/dpnp_array.py index af0cf753c1d..9adeae04657 100644 --- a/dpnp/dpnp_array.py +++ b/dpnp/dpnp_array.py @@ -192,7 +192,12 @@ def __and__(self, other): """Return ``self&value``.""" return dpnp.bitwise_and(self, other) - # '__array__', + def __array__(self, dtype=None, /, *, copy=None): + raise TypeError( + "Implicit conversion to a NumPy array is not allowed. " + "Please use `.asnumpy()` to construct a NumPy array explicitly." + ) + # '__array_finalize__', # '__array_function__', # '__array_interface__',