Slicing Arrays
The default view displays all elements in the array, for instance, [:] for a single-dimension array, [:][:] for a 2D array, and so on.
For example, here is a two-dimensional array containing 400 elements.
Slicing an array allows you to visualize or generate statistics on a sub-portion. To slice, edit the Variables field:
Note that hovering your cursor over the Variables field provides examples of some slice definitions. The general form for a slice definition is:
lower_bound:upper_bound[:stride]
For example, [0:9][0:9] would use only elements 0 through 9 of each dimension, cutting the number of elements used to calculate the statistics to 100.
The default value for stride is 1; that is, show all elements in the range. If a stride of 2 were added to one of the dimensions above, the statistical calculations would use every other element, cutting it to 50.
Slicing an array is reflected in both the Statistics tab and the two plot tabs:
To view or analyze the stats of just the second dimension of the array, you could hold the first dimension steady, for example, [0:0][:]:
In this different 2D array, the slice includes all elements from the first dimension, but only the 10th element from the second dimension.
NOTE: To first edit the data before slicing it and viewing it in the Array View, use the Local Variables or Data View.
Sliced sections are added to the Variables field, along with full arrays:
If you have cast the type to some other shape array in the Local Variables view or Data View before launching the Array View, the edited data is displayed there. For example, editing this array in the Data View is then reflected when the array is added to the Array View:
The new datatype is viewable in a tool tip when you hover over the array in the Variables dropdown:
This tool tip also displays additional information on the array.