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

inverse does not check for inputs of special arrays #64

Open
scheidan opened this issue Nov 7, 2019 · 1 comment
Open

inverse does not check for inputs of special arrays #64

scheidan opened this issue Nov 7, 2019 · 1 comment

Comments

@scheidan
Copy link
Contributor

scheidan commented Nov 7, 2019

For scalar transforms inverse is checking the input but not special arrays:

## scalar transform
inverse(as(Real, 5, 10), 5.5)
inverse(as(Real, 5, 10), 1.5)                  # -> error, good
inverse(as(Real, 5, 10), 15.5)                 # -> error, good

## array transform
inverse(UnitVector(3), [sqrt(1/3), sqrt(1/3), sqrt(1/3)])
inverse(UnitVector(3), [0.0, sqrt(1/3), sqrt(1/3)])      # -> no error, bad

inverse(UnitSimplex(3), [0.2, 0.2, 0.6])
inverse(UnitSimplex(3), [0.3, 0.2, 0.6])                 # -> no error, bad

Not sure if this is an omission or design decision.

@tpapp
Copy link
Owner

tpapp commented Nov 8, 2019

No, this is an omission. I will fix it soon, by #65.

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