concatenate_representations#
- astropy.coordinates.concatenate_representations(reps)[source]#
Deprecated since version 7.2: The concatenate_representations function will be deprecated in a future version. Use np.concatenate instead.
Combine multiple representation objects into a single instance by concatenating the data in each component.
Currently, all of the input representations have to be the same type. This properly handles differential or velocity data, but all input objects must have the same differential object type as well.
- Parameters:
- repspython:sequence of
BaseRepresentation The objects to concatenate
- repspython:sequence of
- Returns:
- rep
BaseRepresentationsubclass instance A single representation object with its data set to the concatenation of all the elements of the input sequence of representations.
- rep
Notes
As of astropy 7.2, it is possible to combine representations with
numpy.concatenate, and that is now the recommended way to do it. This function differs fromnumpy.concatenatein that (i) it does not take an axis argument; (ii) scalar representations are allowed to be concatenated with other scalar or one-dimensional ones; (iii) all representations must have the same type and either all have or all not have a differential relative to time, while fornumpy.concatenate, the output type and the number is forced to be that of the first representation, and differentials on the later representations are ignored if the first one does not have them.