Closed eschnett closed 4 years ago
That method definition is essential for some implementations I'm working on.
Deleting this method is not currently an option.
Using display
instead of @show
seems to work for me.
I wonder in what context you want to treat a vector of chains as a chain. It might be that you are really calling ndims(eltype(x))
, or maybe the(map(ndims, x))
. Or are you really dealing with Chain{V,G,Vector{T}}
, but are using an inside-out internal representation?
The Julia way to handle the latter case would be to introduce a new type
@computed struct VChain{V,G,T}
vchain::Vector{fulltype(VChain{V,G,T})}
end
That's a bit inconvenient at places, since one has to define a certain number of wrapper functions for VChain
, but it avoids this kind of confusion.
(the(xs)
is a function that accepts a non-empty collection of elements, expects all elements to be identical, and returns that element.)
It's called a ChainBundle
, it already has a new type, but this new type is only used if caching is needed, if caching is not needed then it's just simply a Vector{<:Chain}
elements.
It's necessary for me to compute ndims
of the elements of such a Vector
. However, in a future release I might consider using a call like ndims(Manifold(::Vector{<:Chain{V}}))
instead.
Deleting that method would be a breaking change for Adapode
at the moment, but I'll look into changing it for a future release.
This issue has been fixed now, by the way.
I encountered this problem:
The problem seems to be that Grassmann defines (see
multivectors.jl
, line 139) the methodwhich confuses the base library when showing vectors.
I think it's wrong to overload
ndims
for anyVector{T}
. AllVector{T}
are one-dimensional arrays. The corresponding definition forBase.parent
probably also shouldn't be there.This breaks my code since using
@show
is important for debugging for me.