[ILNumerics Core Module]
Namespace: ILNumerics.Core.Arrays
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Parameters
- d0
- Type: ILNumericsBaseArray
Range specification for dimension #0. - d1
- Type: ILNumericsBaseArray
Range specification for dimension #1. - d2
- Type: ILNumericsBaseArray
Range specification for dimension #2. - d3
- Type: ILNumericsBaseArray
Range specification for dimension #3.
Return Value
Type: RetTNew array with parts of this array as specified by d0...d3.
Exception | Condition |
---|---|
IndexOutOfRangeException | if the range provided in a specifier d0,... addresses a non existing element. |
NotSupportedException | if any of d0,... attempts to use an indexing feature which is not supported in the current ArrayStyle mode. For example, if d0 was provided as newaxis while being in ILNumericsV4 mode. |
This method considers the given dimensional range specifiers to extract a subarray from this array. Both indexing styles: numpy and Matlab® indexing (ILNumericsV4) are supported. For such indexing features specific to one or the other style the current setting of ArrayStyle is considered. For example, in ILNumericsV4 array style (default) the last given dimension specifier may refer to elements inside merged, trailing, unspecified dimensions of this array (and not only inside this dimension) in the same manner as the 'linear indexing' feature known from Matlab®, Octave, ILNumerics version 4 et al.
For simple dimension specifiers d0,... the subarray creation is often optimized to be fast and efficient, often without requiring new memory for copying elements. Note, that the array returned may use the same element storage as this array in this case. Only when trying to modify either one of this array or the subarray a copy will be made. More complex subarray specifications may require iterating and copying addressed elements into new memory.
The setting MinNumberOfArrayDimensions (as controlled by ArrayStyle) is respected for the array returned.
[ILNumerics Core Module]