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

Error with latest StaticArrays #15

Closed
goretkin opened this issue Jun 17, 2019 · 0 comments
Closed

Error with latest StaticArrays #15

goretkin opened this issue Jun 17, 2019 · 0 comments

Comments

@goretkin
Copy link
Contributor

goretkin commented Jun 17, 2019

Using StaticArrays v0.11.0 the line

best_point = dot(weights, simplex)

errors (shown below).

It looks like StaticArrays has made its dot more consistent with Base.LinearAlgebras. I think this would be the analogous not-StaticArrays call

julia> LinearAlgebra.dot([0.5, 0.5], [[1,1], [2,2]])
ERROR: UndefVarError: LinearAlgebra not defined
Stacktrace:
 [1] top-level scope at REPL[7]:1

julia> import LinearAlgebra

julia> LinearAlgebra.dot([0.5, 0.5], [[1,1], [2,2]])
ERROR: DimensionMismatch("x and y are of different lengths!")

Error:

reference distance: Error During Test at /Users/goretkin/.julia/dev/EnhancedGJK/test/runtests.jl:16
  Got exception outside of a @test
  DimensionMismatch("x and y are of different lengths!")
  Stacktrace:
   [1] dot(::Float64, ::StaticArrays.SArray{Tuple{3},Float64,1,3}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.2/LinearAlgebra/src/generic.jl:761
   [2] _vecdot at /Users/goretkin/.julia/packages/StaticArrays/3KEjZ/src/linalg.jl:229 [inlined]
   [3] dot at /Users/goretkin/.julia/packages/StaticArrays/3KEjZ/src/linalg.jl:217 [inlined]
   [4] gjk!(::CollisionCache{GLNormalMesh,StaticArrays.SArray{Tuple{3},Float64,1,3},4,EnhancedGJK.Difference{EnhancedGJK.Tagged{StaticArrays.SArray{Tuple{3},Float32,1,3},Nothing},EnhancedGJK.Tagged{StaticArrays.SArray{Tuple{3},Float64,1,3},Nothing}}}, ::IdentityTransformation, ::IdentityTransformation, ::Int64, ::Float64) at /Users/goretkin/.julia/dev/EnhancedGJK/src/gjk.jl:102
   [5] gjk!(::CollisionCache{GLNormalMesh,StaticArrays.SArray{Tuple{3},Float64,1,3},4,EnhancedGJK.Difference{EnhancedGJK.Tagged{StaticArrays.SArray{Tuple{3},Float32,1,3},Nothing},EnhancedGJK.Tagged{StaticArrays.SArray{Tuple{3},Float64,1,3},Nothing}}}, ::IdentityTransformation, ::IdentityTransformation) at /Users/goretkin/.julia/dev/EnhancedGJK/src/gjk.jl:84

Type details:

typeof(weights) = StaticArrays.SArray{Tuple{4},Float64,1,4}
typeof(simplex) = StaticArrays.SArray{Tuple{4},StaticArrays.SArray{Tuple{3},Float64,1,3},1,4}
dot(a::StaticArrays.StaticArray{Tuple{N},T,1} where T where N, b::StaticArrays.StaticArray{Tuple{N},T,1} where T where N) in StaticArrays at /Users/goretkin/.julia/packages/StaticArrays/3KEjZ/src/linalg.jl:21
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

1 participant