From b4124d13424e8c3df5e03441c640573804d098e2 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Thu, 26 May 2022 14:31:18 -0700 Subject: [PATCH] TST: compose poly instances w/ different symbols. Co-authored-by: Warren Weckesser --- numpy/polynomial/tests/test_symbol.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/numpy/polynomial/tests/test_symbol.py b/numpy/polynomial/tests/test_symbol.py index 6ee89b8c913..4ea6035ef7a 100644 --- a/numpy/polynomial/tests/test_symbol.py +++ b/numpy/polynomial/tests/test_symbol.py @@ -181,6 +181,14 @@ def test_deriv(self): other = self.p.deriv() assert_equal(other.symbol, 'z') + +def test_composition(): + p = poly.Polynomial([3, 2, 1], symbol="t") + q = poly.Polynomial([5, 1, 0, -1], symbol="λ_1") + r = p(q) + assert r.symbol == "λ_1" + + # # Class methods that result in new polynomial class instances #