Closed
Description
openedon Sep 15, 2015
This issue supersedes the 0.4 work towards array nirvana (#7941), and will tracks the issues we aim to complete during 0.5 and beyond — now updated through work on 0.7. This is an umbrella issue and will track specific tasks in other issues. Please feel free to add things that I've missed.
Required underlying technologies
- Julia native bounds checking and removal (extensible bounds checking removal #7799). Several tries have been made at this, but I believe the current plan of action is to make
@inbounds
elide code blocks hidden within an@boundscheck
macro, propagating down only one level of inlining (extensible bounds checking removal #7799 (comment)). This is a strong requirement for the subsequent steps. (implemented in elide code marked with@boundscheck(...)
. #14474) - ReshapedArrays (WIP: ReshapedArrays #10507). Requires better performance: https://groups.google.com/d/msg/julia-dev/7M5qzmXIChM/kOTlGSIvAwAJ
Major 0.5 breaking behavior changes
- Drop dimensions indexed by a scalar (Taking vector transposes seriously #4774 (comment); more generally, APL-style slicing where the rank of a slice is the sum of the ranks of the indexes, see below). PR at RFC: Drop dimensions indexed by scalars #13612.
- Flip the switch on the concatenation deprecation (WIP: Make [a, b] non-concatenating #8599)
- Remove default no-op behavior for (c)transpose (Make (c)transpose less error-prone #13171)
- Change change
sub
behaviour toslice
(Change sub behaviour to match getindex, possibly rename. #16846)
Major 0.6 breaking behavior changes
- Vector transpose returns a covector (Taking vector transposes seriously #4774 (comment)). Implementation in Introduce
RowVector
as the transpose of a vector #19670. - Vector conjugation returns lazy wrapper (Added
ConjArray
wrapper type for conjugate array views #20047)
Possible future breaking changes
- Matrix transposition and conjugation return lazy wrappers (adjoint/transpose transcend material concerns #25364)
-
Return slices as views. A first attempt at this was at RFC: Return views from UnitRange indexing of Arrays #9150. Still unclear whether the possible performance changes are consistent and large enough to be worth the breakage.See range indexing should produce a subarray, not a copy #3701. - Should reductions drop dimensions? array reductions (sum, mean, etc.) and dropping dimensions #16606
New functionality
- Allow expression of varargs of defined length (NTuples made me sad (so I nixed them) #11242). This allows us to take full advantage of RFC: Give AbstractArrays smart and performant indexing behaviors for free #10525.
- Ditch special lowering of Ac_mul_Bt, use dispatch on the lazy transpose wrappers instead. (A_mul_B and all that jazz #5332, sunset linalg jazz #25217)
- Dimensions indexed by multidimensional arrays add dimensions (full APL-style: the dimensionality of the result is the sum of the dimensionalities of the indices). (APL indexing #15431)
-
Allow any index type in non-scalar indexing (RFC: Allow any index type in nonscalar indexing #12567).Tighten scalar indexing to indicesMore systematic conversion of indices such that any index type can be converted into an<: Integer
and widen non scalar indexing to<: Union{Number, AbstractArray, Colon}
(RFC: Allow any index type in nonscalar indexing #12567 (comment)).Int
orAbstractArray
: RFC: Speedier, simpler and more systematic index conversions #19730 - Easier creation of immutable arrays with tuples and WIP: add support for working with immutables (#11902) #12113.
Other speculative possibilities
- A mutable fixed-size buffer type, which would allow for a Julia-native
Array
definition (Introduce Buffer type and make Array an abstraction on top of it #12447); this type could also be used for I/O buffers and string storage. - Base
IndexSet
IntSet
onBitArray
or perhaps any. (Refactor IntSets #20456)AbstractArray{Bool}
- Rework nonscalar indexing to prevent calling
find
on logical arrays and simply wrap it with anIndexSet
LogicalIndex
instead? (RFC: Speedier, simpler and more systematic index conversions #19730) - Negated indexing with complement
IndexSet
(NegatedIndex type #1032) or specialNot
type? (Perhaps in a package: https://github.com/mbauman/InvertedIndices.jl) - Deprecate the linearization of trailing dimensions when more than one index is provided (partial linear indexing). (RFC: Deprecate partial linear indexing #20079)
-
Only allow indexing into N-dimensional arrays with 1 or N indices, deprecating "partial" indexing and trailing singleton dimensions (Omitted and additionally indexed dimensions in getindex #5396 and deprecate (then remove) generalized linear indexing #14770). Initial attempt at WIP/RFH: Deprecate generalized linear indexing #20040.Only allow linear indexing when there is exactly one index provided. Only allow omitting indices (using less than N indices in an N-dimensional array) when all omitted dimensions are of length 1. Only allow trailing indices (more than N indices) when all indices are 1 (singletons). (Completely remove partial linear indexing #21750) - Find alternate syntax for typed arrays – indexing into a type (
T[...]
) is kind of a bad pun. This syntax is especially bad since some variations are parsed as indexing into a type while others are parsed as special forms (typed hvcat, typed comprehensions) - Change hashing to run-length encoding of the diff of arrays, which would allow integer ranges and arrays to hash as equal again. (Hashing integer ranges #12226 (comment), Make arrays and ranges hash and compare equal #16401)
- Move sparse arrays out of base into a standard package. (move SparseArrays to stdlib #25249)
- Allow nontraditional indices (Support for 0-indexed and arbitrary-indexed arrays #16260)
-
@sub
@view
macro (Create@view
macro for creating SubArrays via indexing. #16564)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment