Fix numpy deprecation warning for ragged tensors
This'll be a really helpful fix, thank you!
Numpy shows a deprecation warning when we call `np.array` on a list of ragged tensors without specifying the `dtype`. If their shapes match, the tensors can be collated together, otherwise the resulting array should have `dtype=np.object`.

Fix #3084 
cc @Rocketknight1 