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

Type piracy with cat ? #145

Closed
albop opened this issue Sep 19, 2018 · 3 comments
Closed

Type piracy with cat ? #145

albop opened this issue Sep 19, 2018 · 3 comments

Comments

@albop
Copy link

albop commented Sep 19, 2018

It looks like AA redefines cat on basic Vector types:

julia> using AxisArrays

julia> ll = Array{Array{Symbol,1},1}()
0-element Array{Array{Symbol,1},1}

julia> cat(ll..., dims=1)
ERROR: BoundsError: attempt to access ()
  at index [1]
Stacktrace:
 [1] getindex(::Tuple{}, ::Int64) at ./tuple.jl:24
 [2] _cat at /home/pablo/.julia/packages/AxisArrays/G6pZY/src/combine.jl:20 [inlined]
 [3] #cat#44(::Int64, ::Function) at /home/pablo/.julia/packages/AxisArrays/G6pZY/src/combine.jl:16
 [4] (::getfield(Base, Symbol("#kw##cat")))(::NamedTuple{(:dims,),Tuple{Int64}}, ::typeof(cat)) at ./none:0
 [5] top-level scope at none:0
@albop
Copy link
Author

albop commented Sep 19, 2018

I should have said, this happens on 0.7.

@iamed2
Copy link
Collaborator

iamed2 commented Sep 19, 2018

You're right that it's redefining cat but it's cat(dims=1) that's being called.

@iamed2
Copy link
Collaborator

iamed2 commented Sep 19, 2018

It's a simple tweak, I can fix it quickly.

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

2 participants