Julia Programming Language
How to create a (n-1) dimensional view of a n dimensional array in a general way?
New to Julia
marius311
February 19, 2021, 2:40am
2
using Base.Iterators A[repeated(:,ndims(A)-1)..., 1]
or with
EllipsisNotation.jl
:
A[.., 1]
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
N-dimensional view into an N+1 dimension array
General Usage
15
678
May 26, 2023
Indexing into multidimensional array for general n dimensions
New to Julia
question
2
298
December 29, 2020
Way to slice an array of unknown number of dimensions?
New to Julia
question
15
4466
August 14, 2019
Multi-dimensional array access
General Usage
question
1
465
July 18, 2017
Array with user-defined number of dimensions
General Usage
1
365
October 13, 2018