Did I find the right examples for you? yes no

# sympy.geometry.are_similar

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
```Returns True if e1 and e2 are similar (one can be uniformly scaled to
the other) or False otherwise.

Notes:
======
- If the two objects are equal then they are always similar.
```

```        def are_similar(e1, e2):
"""
Returns True if e1 and e2 are similar (one can be uniformly scaled to
the other) or False otherwise.

Notes:
======
- If the two objects are equal then they are always similar.
"""
if e1 == e2: return True
try:
return e1.is_similar(e2)
except AttributeError:
try:
return e2.is_similar(e1)
except AttributeError:
n1 = e1.__class__.__name__
n2 = e2.__class__.__name__
raise GeometryError("Cannot test similarity between %s and %s" % (n1, n2))
```

src/s/y/sympy-HEAD/sympy/geometry/tests/test_geometry.py   sympy(Download)
```from sympy import (Abs, C, Dummy, Rational, Float, S, Symbol, cos, oo, pi,
simplify, sin, sqrt, symbols, tan)
from sympy.geometry import (Circle, Curve, Ellipse, GeometryError, Line, Point,
Polygon, Ray, RegularPolygon, Segment, Triangle,
are_similar, convex_hull, intersection, centroid)
```
```    assert t2.is_equilateral()
assert t3.is_equilateral() is False
assert are_similar(t1, t2) is False
assert are_similar(t1, t3)
assert are_similar(t2, t3) is False
```

src/s/y/sympy-polys-HEAD/sympy/geometry/tests/test_geometry.py   sympy-polys(Download)
```from sympy import Symbol, Rational, sqrt, pi, cos, oo, simplify, Real, raises
from sympy.geometry import Point, Polygon, convex_hull, Segment, \
RegularPolygon, Circle, Ellipse, GeometryError, Line, intersection, \
Ray, Triangle, are_similar, Curve

```
```    assert t2.is_equilateral()
assert t3.is_equilateral() == False
assert are_similar(t1, t2) == False
assert are_similar(t1, t3)
assert are_similar(t2, t3) == False
```