Primary
Array Slicing ○|Definition|1st|20260105122307-00-⌔
Array slicing
In computer programming, array slicing is an operation that extracts a subset of elements from an array and packages them as another array, possibly in a different dimension from the original.
Common examples of array slicing are extracting a substring from a string of characters, the “ell” in “h ell o”, extracting a row or column from a two-dimensional array, or extracting a vector from a matrix.
Depending on the programming language, an array slice can be made out of non-consecutive elements. Also depending on the language, the elements of the new array may be aliased to (i.e., share memory with) those of the original array.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •