pyinterp.Axis¶
- class pyinterp.Axis(self, values: numpy.ndarray[numpy.float64], epsilon: float = 1e-06, is_circle: bool = False)¶
Bases:
pybind11_object
A coordinate axis is a Variable that specifies one of the coordinates of a variable’s values.
- Parameters:
values – Axis values.
epsilon – Maximum allowed difference between two real numbers in order to consider them equal. Defaults to
1e-6
.is_circle – True, if the axis can represent a circle. Defaults to
false
.
Attributes
Test if this axis represents a circle.
Public Methods
back
(self)Get the last value of this axis.
find_index
(self, coordinates[, bounded])Given coordinate positions, find what grid elements contains them, or is closest to them.
find_indexes
(self, coordinates)For all coordinate positions, search for the axis elements around them.
flip
(self[, inplace])Reverse the order of elements in this axis.
front
(self)Get the first value of this axis.
increment
(self)Get increment value if is_regular().
is_ascending
(self)Test if the data is sorted in ascending order.
is_regular
(self)Check if this axis values are spaced regularly.
max_value
(self)Get the maximum coordinate value.
min_value
(self)Get the minimum coordinate value.
Protected Methods
Special Methods
__copy__
(self)Implements the shallow copy operation.
__eq__
(self, other)Overrides the default behavior of the
==
operator.__getitem__
(*args, **kwargs)Overloaded function.
__getstate__
(self)__len__
(self)Called to implement the built-in function
len()
__ne__
(self, other)Overrides the default behavior of the
!=
operator.__repr__
(self)Called by the
repr()
built-in function to compute the string representation of an Axis.__setstate__
(self, arg0)