-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Submanifold index arrays should be typed #7
Comments
This closes issue chakravala#7 .
The type should not be explicitly declared, since it isn't always going to be I will have to investigate this issue more, could you provide a minimum reproducible example> |
Found it... Was my mistake after all. The code below reproduces the problem: using ComputedFieldTypes
using StaticArrays
using Grassmann
# @basis 1
V = v1
Vec(X) = Chain{V,1,X}
Mat(X) = Chain{V,1, fulltype(Vec(X))}
function Base.rand(::Type{<:Chain{V,1,T}}) where {V, T}
D = ndims(V)
Chain{V,1}(SVector{D,T}((rand(T) for i in 1:ndims(V))...))::Chain{V,1,<:T}
end
A = rand(Mat(Float64))
x = rand(Vec(Float64))
y = A ⋅ x Of course, I didn't intend to define |
I received this error:
Tracking things down, the problem comes from an empty list of indices used in
parity.jl
line 77:V[ind]
is an empty array of typeVector{Any}
, soprod
cannot determine the neutral element. (I am using 1-dimensional manifolds, which is probably a bit of a special case.)I believe the solution is to add explicit
Int
declarations to the array comprehensions in lines 198, 199 ofDirectSum.jl
inDirectSum
:This change resolves the problem for me.
The text was updated successfully, but these errors were encountered: