Did I find the right examples for you? yes no

sympy.geometry.Point

All Samples(726)  |  Call(715)  |  Derive(0)  |  Import(11)
```A point in a 2-dimensional Euclidean space.

Parameters
==========

coords : sequence of 2 coordinate values.

Attributes
==========
(more...)
```

src/s/y/sympy-HEAD/sympy/geometry/util.py   sympy(Download)
```    """

from sympy.geometry import Polygon, Segment, Point
if args:
if all(isinstance(g, Point) for g in args):
c = Point(0, 0)
```
```            return c/len(args)
elif all(isinstance(g, Segment) for g in args):
c = Point(0, 0)
L = 0
for g in args:
```
```            return c/L
elif all(isinstance(g, Polygon) for g in args):
c = Point(0, 0)
A = 0
for g in args:
```

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 c.parameter == z
assert c.functions == (2*s, s**2)
assert c.arbitrary_point() == Point(2*s, s**2)
assert c.arbitrary_point(z) == Point(2*s, s**2)

```
```    t = Symbol('t')
# the t returned as assumptions
assert c.arbitrary_point() != Point(2*t, t**2)
t = Symbol('t', real=True)
# now t has the same assumptions so the test passes
assert c.arbitrary_point() == Point(2*t, t**2)
```

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

```
```def test_point():
p1 = Point(x1, x2)
p2 = Point(y1, y2)
p3 = Point(0, 0)
p4 = Point(1, 1)
```

src/c/e/census_explorer-HEAD/scripts/getPubFacility_GeoJSON_with_CACODE.py   census_explorer(Download)
```def randomCheck(polygonJSONfn, pubFacilityJSONfn):
from sympy import Polygon
from sympy.geometry import Point
import random
totalMatch = 0
```
```    for i in range(numOfPubFacility):
location = pub_facility_data['features'][i]['geometry']['coordinates']
point = Point(location)
#check if it is in or out
if polygon.encloses_point(point):
```

src/s/y/sympy-HEAD/sympy/core/tests/test_sympify.py   sympy(Download)
```from sympy.utilities.pytest import XFAIL, raises
from sympy.utilities.decorator import conserve_mpmath_dps
from sympy.geometry import Point, Line
from sympy.functions.combinatorial.factorials import factorial, factorial2
from sympy.abc import _clash, _clash1, _clash2
```
```def test_geometry():
p = sympify(Point(0, 1))
assert p == Point(0, 1) and type(p) == Point
L = sympify(Line(p, (1, 0)))
assert L == Line((0, 1), (1, 0)) and type(L) == Line
```

src/s/y/sympy-HEAD/sympy/printing/tests/test_str.py   sympy(Download)
```from sympy.physics.units import second, joule
from sympy.polys import Poly, RootOf, RootSum, groebner, ring, field, ZZ, QQ, lex, grlex
from sympy.geometry import Point, Circle

from sympy.utilities.pytest import raises
```
```def test_Geometry():
assert sstr(Point(0, 0)) == 'Point(0, 0)'
assert sstr(Circle(Point(0, 0), 3)) == 'Circle(Point(0, 0), 3)'
# TODO test other Geometry entities

```

src/s/y/sympy-HEAD/sympy/printing/tests/test_repr.py   sympy(Download)
```from sympy.utilities.pytest import raises
from sympy import symbols, Function, Integer, Matrix, Abs, \
Rational, Float, S, WildFunction, ImmutableMatrix, sin
from sympy.core.compatibility import exec_
from sympy.geometry import Point, Ellipse
```
```def test_Geometry():
sT(Point(0, 0), "Point(Integer(0), Integer(0))")
sT(Ellipse(Point(0, 0), 5, 1),
"Ellipse(Point(Integer(0), Integer(0)), Integer(5), Integer(1))")
# TODO more tests
```

src/s/y/sympy-polys-HEAD/sympy/printing/tests/test_repr.py   sympy-polys(Download)
```from sympy.utilities.pytest import XFAIL
from sympy import Symbol, symbols, Function, Integer, Matrix, nan, oo, abs, \
Rational, Real, S, WildFunction, raises
from sympy.geometry import Point, Circle, Ellipse
from sympy.printing import srepr
```
```def test_Geometry():
sT(Point(0,0),  "Point(Zero, Zero)")
sT(Ellipse(Point(0, 0), 5, 1),  "Ellipse(Point(Zero, Zero), Integer(5), One)")
# TODO more tests

```

src/s/y/sympy-polys-HEAD/sympy/printing/tests/test_str.py   sympy-polys(Download)
```from sympy.polys import Poly, RootsOf, RootOf, RootSum
from sympy.statistics.distributions import Normal, Sample, Uniform
from sympy.geometry import Point, Circle
from sympy.utilities.pytest import XFAIL

```
```def test_Geometry():
assert sstr(Point(0,0))  == 'Point(0, 0)'
assert sstr(Circle(Point(0,0), 3))   == 'Circle(Point(0, 0), 3)'
# TODO test other Geometry entities

```

src/s/y/sympy-0.7.5/sympy/printing/tests/test_str.py   sympy(Download)
```from sympy.physics.units import second, joule
from sympy.polys import Poly, RootOf, RootSum, groebner, ring, field, ZZ, QQ, lex, grlex
from sympy.geometry import Point, Circle

from sympy.utilities.pytest import raises
```
```def test_Geometry():
assert sstr(Point(0, 0)) == 'Point(0, 0)'
assert sstr(Circle(Point(0, 0), 3)) == 'Circle(Point(0, 0), 3)'
# TODO test other Geometry entities

```

1 | 2  Next