Maybe the best of both worlds would require explicit opt-in for classes that shouldn't be coerced, e.g.,

or maybe better yet ;)

On Thu, Nov 2, 2017 at 3:39 PM Marten van Kerkwijk <> wrote:
I guess my argument boils down to it being better to state that a
function only accepts arrays and happily let it break on, e.g.,
matrix, than use `asarray` to make a matrix into an array even though
it really isn't.

I do like the dtype ideas, but think I'd agree they're likely to come
with their own problems. But just making new numerical types possible
is interesting.

-- Marten
NumPy-Discussion mailing list