-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
As discussed in #9165 (comment), one might consider raising an exception for an input list that ends up as an object array.
From @mhvk:
My sense would be to be a bit less forgiving in this case. E.g., the list may contain quantities with incompatible units or incompatible TimeDelta scales - both of which would be more likely mistakes. My sense would be to force users to create object arrays if they really want them.
(Over at numpy, there has been discussion - but no action - on never automatically creating object arrays; see numpy/numpy#5353)
From @taldcroft:
I think that this is a somewhat significant API change that would need to be done in a graduated way starting with future deprecation warnings or whatnot. I'm pretty sure some of our Chandra code would break, and I bet we aren't the only ones. Silly stuff like below can be handy sometimes:
t['stuff'] = [random_obj1, random_obj2]
Yes, there is a workaround but ... At the very least, that API change should start as a separate issue with some focused discussion. My feeling would be to follow whatever numpy does or does not do on that front.