Skip to content

Commit

Permalink
TST: compose poly instances w/ different symbols.
Browse files Browse the repository at this point in the history
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
  • Loading branch information
rossbar and WarrenWeckesser committed May 26, 2022
1 parent e8b2d2c commit b4124d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions numpy/polynomial/tests/test_symbol.py
Expand Up @@ -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
#
Expand Down

0 comments on commit b4124d1

Please sign in to comment.