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

More tests and correctness checks #15

Open
2 tasks
tpapp opened this issue Sep 8, 2018 · 3 comments
Open
2 tasks

More tests and correctness checks #15

tpapp opened this issue Sep 8, 2018 · 3 comments

Comments

@tpapp
Copy link
Owner

tpapp commented Sep 8, 2018

  • identity array transformations, especially with generalized indexing (should just copy, check that it is aligned correctly)
  • use the checkbounds framework for index checking with IndexInto
@cscherrer
Copy link

Along these lines, what do you think of using a StaticVector for UnitVector transforms? They're fast for low dimensions, and off-by-one errors seem especially likely in this case. Current status below

julia> UnitVector(3)(randn(1))
3-element Array{Float64,1}:
 0.18606499467826754
 0.0                
 0.9825374383479626 

julia> UnitVector(3)(randn(2))
3-element Array{Float64,1}:
 -0.3151137999598784
 -0.2694871471052446
  0.9099889947795644

julia> UnitVector(3)(randn(3))
3-element Array{Float64,1}:
  0.30113461573458   
 -0.14635682348334245
  0.9422831970412359 

julia> UnitVector(3)(randn(4))
3-element Array{Float64,1}:
 -0.09987020258309565
 -0.8775482948455398 
  0.4689722090376966 

@tpapp
Copy link
Owner Author

tpapp commented Apr 23, 2019

Ouch, thanks for the catch. Fixing it soon.

StaticVectors is kind of orthogonal; they may have some advantages like compact packing and loop unrolling, and will eventually be implemented, but programming them nicely is challenging.

@tpapp
Copy link
Owner Author

tpapp commented Apr 23, 2019

@cscherrer: this is fixed in #41. I will tag a release once the CI passes.

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