From 850c9c2b607e4c3ef051be66af83f9ef7d404bee Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 8 Nov 2023 00:21:15 +0000 Subject: [PATCH] feat!: error if the caller invokes np.XXX on an array --- src/dask_awkward/lib/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dask_awkward/lib/core.py b/src/dask_awkward/lib/core.py index a7a6458f..86fd8f02 100644 --- a/src/dask_awkward/lib/core.py +++ b/src/dask_awkward/lib/core.py @@ -1357,6 +1357,13 @@ def clear_divisions(self) -> None: """Clear the divisions of a Dask Awkward Collection.""" self._divisions = (None,) * (self.npartitions + 1) + def __array_function__(self, func, types, args, kwargs): + raise NotImplementedError( + "overloads of NumPy functions are not supported in dask-awkward. " + "Instead, use the Awkward Array equivalent, e.g. `ak.all` instead " + "of `np.all`" + ) + def __awkward_function__(self, func, array_likes, args, kwargs): import dask_awkward