Skip to content

Commit 94fe23c

Browse files
committed
BUG: avoid deprecated shape mutation APIs in coordinates (2)
1 parent 8c62627 commit 94fe23c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎astropy/coordinates/solar_system.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ def _get_body_barycentric_posvel(body, time, ephemeris=None, get_velocity=True):
315315
):
316316
body_p_or_v += p_or_v
317317

318-
body_posvel_bary.shape = body_posvel_bary.shape[:2] + jd1_shape
318+
body_posvel_bary = np.reshape(
319+
body_posvel_bary, body_posvel_bary.shape[:2] + jd1_shape
320+
)
319321
body_pos_bary = CartesianRepresentation(
320322
body_posvel_bary[0], unit=u.km, copy=False
321323
)

0 commit comments

Comments
 (0)