ArrayNonzeros¶
Get the indices or optionally n-dimensional index coordinates of the non-zero entries in an array.
By default, this returns a single vector of indices in the flattened array as the first (coord0) output. If flat is disabled, and if the array is n-dimensional (i.e. is a tensor), then for each non-zero entry in the tensor, its n index coordinates are appended to the n coordN output arrays. Thus each coord array is a vector with the same number of elements, which is the total number of non-zeros. Any coordN arrays for N > than the array dimension are None. The nonzeros are generally emitted (scanned out) in row-major a.k.a. C memory order (both in flat and non-flat mode). This only makes a difference if the array is multi-dimensional. In this case, the C / row-major order order means that array elements are scanned in such a way that the last dimension is the fastest varying (i.e., adjacent entries along the last dimension are adjacent in the scan order and a whole row of the last dimension is scanned before the next row is scanned). Thus the next set of entries in the scan order corresponds to the next index in the second-to-last dimension. More Info... Version 1.0.0
Ports/Properties¶
array¶
Array to process.
coord1¶
Coordinate 1 of non-zero entries.
coord2¶
Coordinate 2 of non-zero entries.
coord3¶
Coordinate 3 of non-zero entries.
coord4¶
Coordinate 4 of non-zero entries.
coord5¶
Coordinate 5 of non-zero entries.
coord6¶
Coordinate 6 of non-zero entries.
coord7¶
Coordinate 7 of non-zero entries.
coord8¶
Coordinate 8 of non-zero entries.
coord9¶
Coordinate 9 of non-zero entries.
flat¶
If set, coord0 holds the indices of the non-zero entries in the flattened array. If False, for each non-zero in the original n-dimensional array, its n coordinate indices are emitted into the corresponding coordN ports.
coord0¶
Coordinate 0 of non-zero entries - UNUSED.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.