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 Jun 1, 2022
1 parent 1c99edd commit 5fdfef5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions numpy/polynomial/tests/test_symbol.py
Original file line number Diff line number Diff line change
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 5fdfef5

Please sign in to comment.