Skip to content

Commit 7ad6f3d

Browse files
authored
Backport PR astropy#19187: BUG: avoid deprecated shape mutation APIs in coordinates (2) (astropy#19207)
Co-authored-by: P. L. Lim <[email protected]>
2 parents d094497 + 8fabbeb commit 7ad6f3d

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
@@ -319,7 +319,9 @@ def _get_body_barycentric_posvel(body, time, ephemeris=None, get_velocity=True):
319319
):
320320
body_p_or_v += p_or_v
321321

322-
body_posvel_bary.shape = body_posvel_bary.shape[:2] + jd1_shape
322+
body_posvel_bary = np.reshape(
323+
body_posvel_bary, body_posvel_bary.shape[:2] + jd1_shape
324+
)
323325
body_pos_bary = CartesianRepresentation(
324326
body_posvel_bary[0], unit=u.km, copy=False
325327
)

0 commit comments

Comments
 (0)