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

[MTN] more permissive check_backend #494

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

tomMoral
Copy link
Contributor

@tomMoral tomMoral commented Aug 2, 2023

With the current behavior, the check_backend helper fails when one of the arguments is a subtype of the base type of the backend. For instance, if one argument is a memmap, while it is still a ndarray, the check_backend raises a ValueError.

This PR makes the helper check the type of all arguments with isinstance. It also refactors the API to ease the backend management.

@rflamary rflamary changed the title MTN more permissive check_backend [MTN] more permissive check_backend Aug 2, 2023
@rflamary rflamary merged commit a879690 into PythonOT:master Aug 2, 2023
@tomMoral tomMoral deleted the MTN_backend_registration branch August 2, 2023 22:15
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

Successfully merging this pull request may close these issues.

2 participants