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

Domain of inverse(abs2) #37

Closed
jariji opened this issue Sep 18, 2023 · 3 comments
Closed

Domain of inverse(abs2) #37

jariji opened this issue Sep 18, 2023 · 3 comments

Comments

@jariji
Copy link
Contributor

jariji commented Sep 18, 2023

Should this be allowed?

using Accessors
julia> modify(-2, abs2) do x
           x + 1
       end
2.23606797749979

julia> inverse(abs2)
sqrt (generic function with 19 methods)

This issue is similar to #8.

@oschulz
Copy link
Collaborator

oschulz commented Sep 18, 2023

I get

julia> using Accessors, InverseFunctions

julia> modify(-2, abs2) do x
           x + 1
       end
ERROR: This should be unreachable. You probably need to overload
`Accessors.set(obj, ::typeof(abs2), val)

and

julia> inverse(abs2)
NoInverse{typeof(abs2)}(abs2)

@jariji
Copy link
Contributor Author

jariji commented Sep 18, 2023

Huh, I'm not sure what happened. I must've changed something in my repl beforehand. Sorry for the noise.

@jariji jariji closed this as completed Sep 18, 2023
@oschulz
Copy link
Collaborator

oschulz commented Sep 18, 2023

No worries!

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

2 participants