pyinterp.geometry.cartesian.Point

Contents

pyinterp.geometry.cartesian.Point#

class pyinterp.geometry.cartesian.Point(self, x: float = 0.0, y: float = 0.0)#

Bases: object

A point in Cartesian coordinates.

The point is represented using Cartesian coordinates (x, y) on a flat plane.

Examples

>>> from pyinterp.geometry.cartesian import Point
>>> point = Point(100.0, 200.0)
>>> point.x
100.0
>>> point.y
200.0

Construct a point from x and y coordinates.

Parameters:
  • x – X coordinate (default: 0.0).

  • y – Y coordinate (default: 0.0).

Attributes

x

X coordinate.

y

Y coordinate.

Special Methods

__eq__(self, other)

Check if two points are equal.

__getstate__(self)

Return the state of the point for pickling.

__ne__(self, other)

Check if two points are not equal.

__new__(*args, **kwargs)

__repr__(self)

Return the official string representation of the point.

__setstate__(self, state)

Restore the state of the point from pickling.

__str__(self)

Return the informal string representation of the point.