Interface SparseNdArray<T,​U extends NdArray<T>>

    • Method Detail

      • getIndices

        LongNdArray getIndices()
        Gets the Indices

        Indices are a A 2-D long array of shape [N, ndims], that specifies the indices of the elements in the sparse array that contain nonzero values (elements are zero-indexed).

        For example, indices=[[1,3], [2,4]] specifies that the elements with indexes of coordinates [1,3] and [2,4] have nonzero values.

        Returns:
        the Indices
      • getValues

        U getValues()
        Gets the values.

        Values are a 1-D array of any type and shape [N], that supplies the values for each element in indices.

        For example, given indices=[[1,3], [2,4]], and values=[18, 3.6] specifies that element [1,3] of the sparse array has a value of 18, and element [2,4] of the sparse array has a value of 3.6.

        Returns:
        the values