Skip to content

Commit e5f99d3

Browse files
committed
fixes astropy#6327 - carry along differential_cls in ._apply
1 parent f89f3d9 commit e5f99d3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎astropy/coordinates/baseframe.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,9 @@ def _apply(self, method, *args, **kwargs):
11371137
representation_cls = kwargs.pop('representation_cls',
11381138
self.representation)
11391139

1140+
differential_cls = kwargs.pop('differential_cls',
1141+
self.get_representation_cls('s'))
1142+
11401143
def apply_method(value):
11411144
if isinstance(value, ShapedLikeNDArray):
11421145
if method == 'replicate' and not hasattr(value, method):
@@ -1156,7 +1159,8 @@ def apply_method(value):
11561159
data = apply_method(data)
11571160

11581161
# TODO: change to representation_cls in __init__ - gh-6219.
1159-
frattrs = {'representation': representation_cls}
1162+
frattrs = {'representation': representation_cls,
1163+
'differential_cls': differential_cls}
11601164
for attr in self.get_frame_attr_names():
11611165
if attr not in self._attr_names_with_defaults:
11621166
if (method == 'copy' or method == 'replicate') and attr in kwargs:

0 commit comments

Comments
 (0)