Closed
Description
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 (#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 julia#7799 (comment)). This is a strong requirement for the subsequent steps. (implemented in elide code marked with@boundscheck(...)
. julia#14474) - 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 #42; 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 julia#13612.
- Flip the switch on the concatenation deprecation (#8599)
- Remove default no-op behavior for (c)transpose (#13171)
- Change change
sub
behaviour toslice
(#16846)
Major 0.6 breaking behavior changes
- Vector transpose returns a covector (Taking vector transposes seriously #42). Implementation in Introduce
RowVector
as the transpose of a vector julia#19670. - Vector conjugation returns lazy wrapper (#20047)
Possible future breaking changes
- Matrix transposition and conjugation return lazy wrappers (#25364)
-
Return slices as views. A first attempt at this was at RFC: Return views from UnitRange indexing of Arrays julia#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 julia#3701. - Should reductions drop dimensions? array reductions (sum, mean, etc.) and dropping dimensions julia#16606
New functionality
- Allow expression of varargs of defined length (#11242). This allows us to take full advantage of RFC: Give AbstractArrays smart and performant indexing behaviors for free julia#10525.
- Ditch special lowering of Ac_mul_Bt, use dispatch on the lazy transpose wrappers instead. (#5332, sunset linalg jazz julia#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). (#15431)
-
Allow any index type in non-scalar 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 julia#12567 (comment)).Int
orAbstractArray
: RFC: Speedier, simpler and more systematic index conversions julia#19730 - Easier creation of immutable arrays with tuples and WIP: add support for working with immutables (#11902) julia#12113.
Other speculative possibilities
- A mutable fixed-size buffer type, which would allow for a Julia-native
Array
definition (#12447); this type could also be used for I/O buffers and string storage. - Base
IndexSet
IntSet
onBitArray
or perhaps any. (#20456)AbstractArray{Bool}
- Rework nonscalar indexing to prevent calling
find
on logical arrays and simply wrap it with anIndexSet
LogicalIndex
instead? (#19730) - Negated indexing with complement
IndexSet
(NegatedIndex type julia#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). (#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 julia#5396 and deprecate (then remove) generalized linear indexing julia#14770). Initial attempt at WIP/RFH: Deprecate generalized linear indexing julia#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). (#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 julia#12226 (comment), Make arrays and ranges hash and compare equal julia#16401)
- Move sparse arrays out of base into a standard package. (#25249)
- Allow nontraditional indices (#16260)
-
@sub
@view
macro (#16564)