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

Support/Adopt InverseFunctions? #15

Closed
oschulz opened this issue Aug 17, 2024 · 9 comments
Closed

Support/Adopt InverseFunctions? #15

oschulz opened this issue Aug 17, 2024 · 9 comments

Comments

@oschulz
Copy link

oschulz commented Aug 17, 2024

InverseFunctions is a lightweight central package that defines an inverse(f) API. Would be the interest in adopting/supporting it in TransformsBase?

@oschulz oschulz changed the title Support/Adopt InverseFunctions Support/Adopt InverseFunctions? Aug 17, 2024
@juliohm
Copy link
Member

juliohm commented Aug 17, 2024 via email

@oschulz
Copy link
Author

oschulz commented Aug 17, 2024

Ah, thanks @juliohm !

@oschulz oschulz closed this as completed Aug 17, 2024
@juliohm
Copy link
Member

juliohm commented Aug 17, 2024 via email

@oschulz
Copy link
Author

oschulz commented Aug 17, 2024

Oh yes, neat! Just curious, in what way does TransformsBase.inverse not fulfill the requirement of InverseFunctions.inverse (and might we need to widen the scope in InverseFunctions for such cases)?

@juliohm
Copy link
Member

juliohm commented Aug 18, 2024 via email

@oschulz
Copy link
Author

oschulz commented Aug 18, 2024

Oh, approximate equality is perfectly fine for InverseFunction!

@juliohm
Copy link
Member

juliohm commented Aug 19, 2024

@eliascarv do you remember any other issue we encountered in this context?

@eliascarv
Copy link
Member

eliascarv commented Aug 19, 2024

The InverseFunctions API is not used here because of incompatibility between the designs. The TransformsBase.isinvertible function that checks whether a transform is invertible has a fallback implemented with the transform type, while the InverseFunctions.hasinverse function that would be used in this fallback only works with instances and not with types.

@oschulz
Copy link
Author

oschulz commented Aug 19, 2024

Thanks for the explanation @eliascarv !

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

3 participants