Skip to content

Commit

Permalink
feat: base definition of represent_as (#132)
Browse files Browse the repository at this point in the history
* feat: base definition of represent_as
* test: skip coverage of abstract func

Signed-off-by: nstarman <[email protected]>
  • Loading branch information
nstarman authored Jul 11, 2024
1 parent fd20733 commit 4e91cb0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coordinax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
_d4,
_dn,
_exceptions,
_funcs,
_transform,
_typing,
_utils,
Expand All @@ -33,13 +34,15 @@
from ._d4 import *
from ._dn import *
from ._exceptions import *
from ._funcs import *
from ._transform import *
from ._typing import *
from ._utils import *
from ._version import version as __version__
from .setup_package import RUNTIME_TYPECHECKER

__all__ = ["__version__", "operators"]
__all__ += _funcs.__all__
__all__ += _base.__all__
__all__ += _base_pos.__all__
__all__ += _base_vel.__all__
Expand Down Expand Up @@ -73,5 +76,6 @@
_d3,
_d4,
_dn,
_funcs,
RUNTIME_TYPECHECKER,
)
13 changes: 13 additions & 0 deletions src/coordinax/_funcs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Copyright (c) 2023 coordinax maintainers. All rights reserved."""

__all__ = ["represent_as"]

from typing import Any

from plum import dispatch


@dispatch.abstract # type: ignore[misc]
def represent_as(current: Any, target: type[Any], /, **kwargs: Any) -> Any:
"""Transform the current vector to the target vector."""
raise NotImplementedError # pragma: no cover

0 comments on commit 4e91cb0

Please sign in to comment.