Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate argument extractor/replacer based on type hints #21

Open
hameerabbasi opened this issue Sep 27, 2019 · 0 comments
Open

Generate argument extractor/replacer based on type hints #21

hameerabbasi opened this issue Sep 27, 2019 · 0 comments

Comments

@hameerabbasi
Copy link
Collaborator

It would be nice if one could generate argument extractors/replacers based on type hints. For example:

@create_multimethod
def concatenate(x: Iterable[ndarray], axis=0, out=None):
    pass

@create_multimethod
def stack(x: Iterable[ndarray], axis=0, out=None):
    pass

Nested_NDArray = Union[ndarray, List["Nested_NDArray"]]

@create_multimethod
def block(x: Nested_NDArray):
    pass

The block example is about as complex as it gets. If we can handle this, we can handle almost all cases in NumPy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant