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

map(f,x::DNDSparse) produces wrong parametric type if f changes value type #315

Open
gkappler opened this issue Dec 10, 2019 · 1 comment

Comments

@gkappler
Copy link

A = ndsparse((numid=1:10,), (a=1:10,b=1:10); chunks=2)
B = map(v->v.a+1,A)

seems to work, but assigns wrong type parameter typeof(B)

JuliaDB.DNDSparse{NamedTuple{(:numid,),Tuple{Int64}},NamedTuple{(:a, :b),Tuple{Int64,Int64}}}

which makes

C = filter(isodd, B)

fail with

ERROR: column a not found.
@gkappler
Copy link
Author

gkappler commented Dec 10, 2019

I investigated a bit and think the minor fix in pull request #316 suffices.

typeof(B) in the example is now

JuliaDB.DNDSparse{NamedTuple{(:numid,),Tuple{Int64}},Int64}

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