On Fri, Aug 24, 2018, 09:07 Hameer Abbasi <einstein.edi...@gmail.com> wrote:

>
>
> On Fri, Aug 24, 2018 at 5:55 PM Stephan Hoyer <sho...@gmail.com> wrote:
>
>> On Thu, Aug 23, 2018 at 1:06 PM Hameer Abbasi <einstein.edi...@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.
>

Oh yeah, if we did this then we definitely wouldn't want to make it
mandatory. Some `__array_function__` implementations might want to do
checking another way, or support different types in different overloaded
functions, or be able to handle arbitrary types.

-n
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to