pyinterp.core.Axis

class pyinterp.core.Axis

Bases: pybind11_builtins.pybind11_object

A coordinate axis is a Variable that specifies one of the coordinates of a variable’s values.

__init__(self: pyinterp.core.Axis, values: numpy.ndarray[numpy.float64], epsilon: float = 1e-06, is_circle: bool = False) None

Create a coordinate axis from values.

Parameters
  • values (numpy.ndarray) – Axis values.

  • epsilon (float, optional) – Maximum allowed difference between two real numbers in order to consider them equal. Defaults to 1e-6.

  • is_circle (bool, optional) – True, if the axis can represent a circle. Defaults to false.

Methods

Axis.back(self)

Get the last value of this axis.

Axis.find_index(self, coordinates[, bounded])

Given coordinate positions, find what grid elements contains them, or is closest to them.

Axis.find_indexes(self, coordinates)

For all coordinate positions, search for the axis elements around them.

Axis.flip(self[, inplace])

Reverse the order of elements in this axis.

Axis.front(self)

Get the first value of this axis.

Axis.increment(self)

Get increment value if is_regular().

Axis.is_ascending(self)

Test if the data is sorted in ascending order.

Axis.is_regular(self)

Check if this axis values are spaced regularly.

Axis.max_value(self)

Get the maximum coordinate value.

Axis.min_value(self)

Get the minimum coordinate value.

Axis.__eq__(self, other)

Overrides the default behavior of the == operator.

Axis.__getitem__(*args, **kwargs)

Overloaded function.

Axis.__getstate__(self)

Axis.__hash__

Axis.__len__(self)

Axis.__ne__(self, other)

Overrides the default behavior of the != operator.

Axis.__repr__(self)

Called by the repr() built-in function to compute the string representation of an Axis.

Axis.__setstate__(self, arg0)

Attributes

Axis.is_circle

Test if this axis represents a circle.