Skip to content

Commit

Permalink
Fixed IndexError in constant order multiplication.
Browse files Browse the repository at this point in the history
Fixed sympy/sympy#9192

// edited by skirpichev
  • Loading branch information
debugger22 authored and skirpichev committed Jul 3, 2015
1 parent 9c4a8ca commit 9bf622f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sympy/series/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def as_expr_variables(self, order_symbols):
not all(p == self.point[0] for p in self.point):
raise NotImplementedError('Order at points other than 0 '
'or oo not supported, got %s as a point.' % point)
if order_symbols[0][1] != self.point[0]:
if order_symbols and order_symbols[0][1] != self.point[0]:
raise NotImplementedError(
"Multiplying Order at different points is not supported.")
order_symbols = dict(order_symbols)
Expand Down
4 changes: 4 additions & 0 deletions sympy/series/tests/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,7 @@ def test_order_subs_limits():

def test_issue_9351():
assert exp(x).series(x, 10, 1) == exp(10) + Order(x - 10, (x, 10))


def test_issue_9192():
assert O(1)*O(1) == O(1)

0 comments on commit 9bf622f

Please sign in to comment.