obspy.core.inventory.util.Distance
- class Distance(value, **kwargs)[source]
Bases:
FloatWithUncertaintiesAndUnit
Distance object
Attributes
the imaginary part of a complex number |
|
the real part of a complex number |
|
Public Methods
Return integer ratio. |
|
Return self, the complex conjugate of any float. |
|
Create a floating-point number from a hexadecimal string. |
|
Return a hexadecimal representation of a floating-point number. |
|
Return True if the float is an integer. |
Special Methods
- Distance.__abs__()
abs(self)
- Distance.__add__(value, /)
Return self+value.
- Distance.__bool__()
True if self else False
- Distance.__ceil__()
Return the ceiling as an Integral.
- Distance.__delattr__(name, /)
Implement delattr(self, name).
- Distance.__dir__()
Default dir() implementation.
- Distance.__divmod__(value, /)
Return divmod(self, value).
- Distance.__eq__(value, /)
Return self==value.
- Distance.__float__()
float(self)
- Distance.__floor__()
Return the floor as an Integral.
- Distance.__floordiv__(value, /)
Return self//value.
- Distance.__format__(format_spec, /)
Formats the float according to format_spec.
- Distance.__ge__(value, /)
Return self>=value.
- Distance.__getattribute__(name, /)
Return getattr(self, name).
- Distance.__getformat__()
You probably don’t want to use this function.
- typestr
Must be ‘double’ or ‘float’.
It exists mainly to be used in Python’s test suite.
This function returns whichever of ‘unknown’, ‘IEEE, big-endian’ or ‘IEEE, little-endian’ best describes the format of floating point numbers used by the C type named by typestr.
- Distance.__getnewargs__()
- Distance.__gt__(value, /)
Return self>value.
- Distance.__hash__()
Return hash(self).
- Distance.__iadd__(other)
- Distance.__imul__(other)
- Distance.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- Distance.__int__()
int(self)
- Distance.__le__(value, /)
Return self<=value.
- Distance.__lt__(value, /)
Return self<value.
- Distance.__mod__(value, /)
Return self%value.
- Distance.__mul__(value, /)
Return self*value.
- Distance.__ne__(value, /)
Return self!=value.
- Distance.__neg__()
-self
- static Distance.__new__(cls, value, **kwargs)
- Distance.__pos__()
+self
- Distance.__pow__(value, mod=None, /)
Return pow(self, value, mod).
- Distance.__radd__(value, /)
Return value+self.
- Distance.__rdivmod__(value, /)
Return divmod(value, self).
- Distance.__reduce__()
Helper for pickle.
- Distance.__reduce_ex__(protocol, /)
Helper for pickle.
- Distance.__repr__()
Return repr(self).
- Distance.__rfloordiv__(value, /)
Return value//self.
- Distance.__rmod__(value, /)
Return value%self.
- Distance.__rmul__(value, /)
Return value*self.
- Distance.__round__(ndigits=None, /)
Return the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
- Distance.__rpow__(value, mod=None, /)
Return pow(value, self, mod).
- Distance.__rsub__(value, /)
Return value-self.
- Distance.__rtruediv__(value, /)
Return value/self.
- Distance.__setattr__(name, value, /)
Implement setattr(self, name, value).
- Distance.__setformat__(fmt, /)
You probably don’t want to use this function.
- typestr
Must be ‘double’ or ‘float’.
- fmt
Must be one of ‘unknown’, ‘IEEE, big-endian’ or ‘IEEE, little-endian’, and in addition can only be one of the latter two if it appears to match the underlying C reality.
It exists mainly to be used in Python’s test suite.
Override the automatic determination of C-level floating point type. This affects how floats are converted to and from binary strings.
- Distance.__sizeof__()
Size of object in memory, in bytes.
- Distance.__str__()
Return str(self).
- Distance.__sub__(value, /)
Return self-value.
- Distance.__subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- Distance.__truediv__(value, /)
Return self/value.
- Distance.__trunc__()
Return the Integral closest to x between 0 and x.