Skip to content

Commit

Permalink
Merge pull request #9867 from gxyd/dummy_change
Browse files Browse the repository at this point in the history
symbols -> Dummy_symbols in ComplexPlane
  • Loading branch information
aktech committed Aug 28, 2015
2 parents b38fbf5 + 41127f0 commit 863d13c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sympy/printing/pretty/tests/test_pretty.py
Expand Up @@ -3110,7 +3110,7 @@ def test_pretty_ConditionSet():

def test_pretty_ComplexPlane():
from sympy import ComplexPlane
ucode_str = u('{x + ⅈ⋅y | x, y ∊ [3, 5] × [4, 6]}')
ucode_str = u('{x + y⋅ⅈ | x, y ∊ [3, 5] × [4, 6]}')
assert upretty(ComplexPlane(Interval(3, 5)*Interval(4, 6))) == ucode_str

ucode_str = u('{r⋅(ⅈ⋅sin(θ) + cos(θ)) | r, θ ∊ [0, 1] × [0, 2⋅π)}')
Expand Down
2 changes: 1 addition & 1 deletion sympy/printing/tests/test_latex.py
Expand Up @@ -618,7 +618,7 @@ def test_latex_ConditionSet():

def test_latex_ComplexPlane():
assert latex(ComplexPlane(Interval(3, 5)*Interval(4, 6))) == \
r"\left\{x + i y\; |\; x, y \in \left[3, 5\right] \times \left[4, 6\right] \right\}"
r"\left\{x + y i\; |\; x, y \in \left[3, 5\right] \times \left[4, 6\right] \right\}"
assert latex(ComplexPlane(Interval(0, 1)*Interval(0, 2*pi), polar=True)) == \
r"\left\{r \left(i \sin{\left (\theta \right )} + \cos{\left (\theta \right )}\right)\; |\; r, \theta \in \left[0, 1\right] \times \left[0, 2 \pi\right) \right\}"

Expand Down
12 changes: 6 additions & 6 deletions sympy/sets/fancysets.py
Expand Up @@ -573,15 +573,15 @@ class ComplexPlane(Set):
>>> c = Interval(1, 8)
>>> c1 = ComplexPlane(a*b) # Rectangular Form
>>> c1
ComplexPlane(Lambda((x, y), x + I*y), [2, 3] x [4, 6])
ComplexPlane(Lambda((_x, _y), _x + _y*I), [2, 3] x [4, 6])
* c1 represents the rectangular region in complex plane
surrounded by the coordinates (2, 4), (3, 4), (3, 6) and
(2, 6), of the four vertices.
>>> c2 = ComplexPlane(Union(a*b, b*c))
>>> c2
ComplexPlane(Lambda((x, y), x + I*y),
ComplexPlane(Lambda((_x, _y), _x + _y*I),
[2, 3] x [4, 6] U [4, 6] x [1, 8])
* c2 represents the Union of two rectangular regions in complex
Expand All @@ -598,7 +598,7 @@ class ComplexPlane(Set):
>>> theta = Interval(0, 2*S.Pi)
>>> c2 = ComplexPlane(r*theta, polar=True) # Polar Form
>>> c2 # unit Disk
ComplexPlane(Lambda((r, theta), r*(I*sin(theta) + cos(theta))),
ComplexPlane(Lambda((_r, _theta), _r*(I*sin(_theta) + cos(_theta))),
[0, 1] x [0, 2*pi))
* c2 represents the region in complex plane inside the
Expand All @@ -613,7 +613,7 @@ class ComplexPlane(Set):
>>> upper_half_unit_disk = ComplexPlane(Interval(0, 1)*Interval(0, S.Pi), polar=True)
>>> intersection = unit_disk.intersect(upper_half_unit_disk)
>>> intersection
ComplexPlane(Lambda((r, theta), r*(I*sin(theta) + cos(theta))), [0, 1] x [0, pi])
ComplexPlane(Lambda((_r, _theta), _r*(I*sin(_theta) + cos(_theta))), [0, 1] x [0, pi])
>>> intersection == upper_half_unit_disk
True
Expand All @@ -626,9 +626,9 @@ class ComplexPlane(Set):
is_ComplexPlane = True

def __new__(cls, sets, polar=False):
from sympy import symbols
from sympy import symbols, Dummy

x, y, r, theta = symbols('x, y, r, theta')
x, y, r, theta = symbols('x, y, r, theta', cls=Dummy)
I = S.ImaginaryUnit

# Rectangular Form
Expand Down

0 comments on commit 863d13c

Please sign in to comment.