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

getindex slice fails with CartesianIndex for v0.5 #17275

Closed
davidavdav opened this issue Jul 5, 2016 · 0 comments
Closed

getindex slice fails with CartesianIndex for v0.5 #17275

davidavdav opened this issue Jul 5, 2016 · 0 comments

Comments

@davidavdav
Copy link
Contributor

Hello,

In a NamedArrays test I needed cartesian indexing for displaying arrays with ndims()>2. In v0.4 this construction works:

a = rand(2,2,2)
a[:, :, CartesianIndex((1,))]

but in v0.5 (0.5.0-dev+5154) I get

ERROR: MethodError: no method matching _flatten(::Tuple{}, ::Colon, ::Colon, ::CartesianIndex{1})
Closest candidates are:
  _flatten(::Any, ::Integer, ::Any...)
  _flatten(::Any, ::CartesianIndex{N}, ::Any...)
  _flatten(::Any)
 in getindex(::Array{Float64,3}, ::Colon, ::Colon, ::CartesianIndex{1}) at ./abstractarray.jl:701
 in eval(::Module, ::Any) at ./boot.jl:234
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46
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