mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
21 lines
948 B
Diff
21 lines
948 B
Diff
diff --git a/astropy/modeling/separable.py b/astropy/modeling/separable.py
|
|
index 1234567..abcdefg 100644
|
|
--- a/astropy/modeling/separable.py
|
|
+++ b/astropy/modeling/separable.py
|
|
@@ -264,8 +264,13 @@ def _cdot(left, right):
|
|
def _n_inputs_outputs(input, position):
|
|
"""
|
|
Return ``n_inputs``, ``n_outputs`` for a model or coord_matrix.
|
|
"""
|
|
if isinstance(input, Model):
|
|
- coords = _coord_matrix(input, position, input.n_outputs)
|
|
+ # Check if it's a CompoundModel and handle it differently
|
|
+ if isinstance(input, CompoundModel):
|
|
+ # For CompoundModels, use _separable to get the separability matrix
|
|
+ coords = _separable(input)
|
|
+ else:
|
|
+ # For simple Models, use _coord_matrix as before
|
|
+ coords = _coord_matrix(input, position, input.n_outputs)
|
|
else:
|
|
coords = input
|
|
return coords
|