These are chat archives for astropy/astropy
icrs.spherical.componentsreturns its values. However,
icrs.representation.componentsreturns a property object.
icrs.representationis returning the
ICRSclass, so when you ask for
componentson that you are just getting the property. You can't really do anything with a bare property.
icrs = SkyCoord(..) # Spherical icrs_cart = icrs.frame.cartesian # CartesianRepresentation object icrs.representation = 'cartesian' assert icrs.x == icrs_cart.x # and same for y and z