I've got an array a
>> a = np.array([np.ones((4,5)), np.arange(6), np.arange(20).reshape((2,2,5))])
>> a
array([array([[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.]]),
array([0, 1, 2, 3, 4, 5]),
array([[[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9]],
[[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19]]])], dtype=object)
and I want to flatten it to get something like array(1, 1, 1, ... 17, 18, 19). How do I do this in the most efficient way?