If I have a numpy array with each element being another numpy array of varying lengths (not an ndarray because of this), how can I sort the outer array by descending lengths of the inner array?
For example:
a = np.array([np.array([1]), np.array([1, 2, 3]), np.array([1, 2])])
would be sorted as:
[[1, 2, 3], [1, 2], [1]]
listobjects in this case? At least, as the outer object?