On Fri, Aug 24, 2018 at 5:55 PM Stephan Hoyer <shoyer@gmail.com> wrote:
On Thu, Aug 23, 2018 at 1:06 PM Hameer Abbasi <einstein.edison@gmail.com> wrote:
I might add that if it’s a mandatory part of the protocol, then not all things will work. For example, if XArray and Dask want to support sparse arrays, they’ll need to add an explicit dependency.

I don't follow -- can you please elaborate?

If we make specifying __array_function_types__ a mandatory part -- And such that it is a whitelist, the XArray or Dask would need to import sparse in order to specify that they accept mixing sparse arrays with native arrays (i.e. for adding sparse.SparseArray to __array_function_types__). Which is basically what I mean. It might be a 'soft' dependency, but there will be a dependency nonetheless.

If you don't want to do anything with the 'types' argument, you can simply ignore it.

The problem of identifying whether arguments have valid types or not remains unchanged from the situation with __add__ or __array_ufunc__. 'types' just gives you another optional tool to help solve it.
NumPy-Discussion mailing list