Hi All,
It seems there are two extreme possibilities for general functions:
1. Put `asarray` everywhere. The main benefit that I can see is that even if people put in list instead of arrays, one is guaranteed to have shape, dtype, etc. But it seems a bit like calling `int` on everything that might get used as an index, instead of letting the actual indexing do the proper thing and call `__index__`.
2. Do not coerce at all, but rather write code assuming something is an array already. This will often, but not always, just work for array mimics, with coercion done only where necessary (e.g., in lower-lying C code such as that of the ufuncs which has a smaller API surface and can be overridden more easily).
The current __array_function__ work may well provide us with a way to combine both, if we (over time) move the coercion inside `ndarray.__array_function__` so that the actual implementation *can* assume it deals with pure ndarray - then, when relevant, calling that implementation will be what subclasses/duck arrays can happily do (and it is up to them to ensure this works).
Of course, the above does not really answer what to do in the meantime. But perhaps it helps in thinking of what we are actually aiming for.
One last thing: could we please stop bashing subclasses? One can subclass essentially everything in python, often to great advantage. Subclasses such as MaskedArray and, yes, Quantity, are widely used, and if they cause problems perhaps that should be seen as a sign that ndarray subclassing should be made easier and clearer.
All the best,
Marten