David van Leeuwen
David van Leeuwen
It would, but you have to give a little more context and pointers, because I have no idea what you mean, and the error message is sort-of difficult to parse...
I can see there is a problem, now. So the constructor needs to be changed, then? I don't really understand why the compiler can't figure out the return type of...
Ah thanks, so I should end a constructor with a call to a parent constructor with explicit type parameters, then? I'll try that. (I must say I am still not...
If I run ```julia f(n)::NTuple{n,Int} = tuple(fill(1, n)...) @code_warntype f(1) Variables: #self# n::Int64 Body: begin return (Core.typeassert)((Base.convert)((Core.apply_type)(Main.NTuple, n::Int64, Main.Int)::Type{Tuple{Vararg{Int64,_}}} where _, (Core._apply)(Main.tuple, $(Expr(:invoke, MethodInstance for fill!(::Array{Int64,1}, ::Int64), :(Base.fill!), :($(Expr(:foreigncall, :(:jl_alloc_array_1d),...
I've tried to stabilize the type in the constructor, see https://github.com/davidavdav/NamedArrays.jl/commit/cb253ad48bd26800864a088a63cabfe739b6afbb. The culprit seems to be `dicts` in `function NamedArray{T,N}(array::AbstractArray{T,N}, names::NTuple{N,Vector}, dimnames::NTuple{N, Any}=defaultdimnames(array))`. I still get red type warnings `NamedArrays.NamedArray{Int64,1,Array{Int64,1},_}...
Thanks again, I ended up in the black hole of trying to figure out what constructor is called, and I am reached a dead end (is that possible in a...
Tried to follow your suggestions in https://github.com/davidavdav/NamedArrays.jl/commit/a9bd5fff908073f154431e17c7e6de6d6ac9275f, but I still get type problem `NamedArrays.NamedArray{Int64,1,Array{Int64,1},_} where _`. The call really is with 4th type argument `NTuple{N, OrderedDict{VT,Int}}`. I don't see why...
Allright, it was slightly more difficult than that, but in the end it turned out to be `eltype(VT)` that was needed in the type assertion. If this now works for...
Those are probably what you need for freqtables. OK, I'll have a dig at them.
The `sum` was easy, that was my own code, fixed in c19a721. I have trouble finding out which code actually runs issuing a statement like `y ./ [1, 2, 3]`....