Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/unxt/quantity.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from typing import Any, Generic, LiteralString, Self, TypeVar

from quax import ArrayValue

_T = TypeVar("_T", bound=LiteralString)
Comment thread
adrn marked this conversation as resolved.
Outdated

class AbstractQuantity(ArrayValue):
Comment thread
adrn marked this conversation as resolved.
# NumpyBinaryOpsMixin
def __add__(self, other: Any) -> Self: ...
def __radd__(self, other: Any) -> Self: ...
def __sub__(self, other: Any) -> Self: ...
def __rsub__(self, other: Any) -> Self: ...
def __mul__(self, other: Any) -> Self: ...
def __rmul__(self, other: Any) -> Self: ...
def __matmul__(self, other: Any) -> Self: ...
def __rmatmul__(self, other: Any) -> Self: ...
def __truediv__(self, other: Any) -> Self: ...
def __rtruediv__(self, other: Any) -> Self: ...
def __floordiv__(self, other: Any) -> Self: ...
def __rfloordiv__(self, other: Any) -> Self: ...
def __mod__(self, other: Any) -> Self: ...
def __rmod__(self, other: Any) -> Self: ...
def __pow__(self, other: Any) -> Self: ...
def __rpow__(self, other: Any) -> Self: ...
Comment thread
adrn marked this conversation as resolved.
Outdated
Comment thread
adrn marked this conversation as resolved.
Outdated

# NumpyUnaryMixin
def __neg__(self) -> Self: ...
def __pos__(self) -> Self: ...
def __abs__(self) -> Self: ...

# NumpyRoundMixin / TruncMixin / FloorMixin / CeilMixin
def __round__(self, ndigits: int = ...) -> Self: ...
def __trunc__(self) -> Self: ...
def __floor__(self) -> Self: ...
def __ceil__(self) -> Self: ...

class AbstractParametricQuantity(AbstractQuantity, Generic[_T]):
@classmethod
def from_(cls, value: Any) -> Self: ...

Comment thread
adrn marked this conversation as resolved.
Outdated
class Quantity(AbstractParametricQuantity[_T]): ...
Loading