Class/Object

org.apache.mxnet

SparseNDArray

Related Docs: object SparseNDArray | package mxnet

Permalink

class SparseNDArray extends NDArray

Sparse NDArray is the child class of NDArray designed to hold the Sparse format

Currently, Rowsparse and CSR typed NDArray is supported. Most of the Operators will convert Sparse NDArray to dense. Basic operators like add will have optimization for sparse operattions

Linear Supertypes
NDArray, NativeResource, WarnIfNotDisposed, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparseNDArray
  2. NDArray
  3. NativeResource
  4. WarnIfNotDisposed
  5. AutoCloseable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def %(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  4. def %(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  5. def %=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  6. def %=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  7. def *(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  8. def *(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  9. def **(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  10. def **(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  11. def **=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  12. def **=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  13. def *=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  14. def *=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  15. def +(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  16. def +(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  17. def +=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  18. def +=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  19. def -(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  20. def -(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  21. def -=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  22. def -=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  23. def /(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  24. def /(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  25. def /=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  26. def /=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  27. def <(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  28. def <(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  29. def <=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  30. def <=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  31. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  32. def >(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  33. def >(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  34. def >=(other: MX_PRIMITIVE_TYPE): NDArray

    Permalink
    Definition Classes
    NDArray
  35. def >=(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  36. def T: NDArray

    Permalink
    Definition Classes
    NDArray
  37. def asInContext(context: Context): NDArray

    Permalink

    Return an NDArray that lives in the target context.

    Return an NDArray that lives in the target context. If the array is already in that context, self is returned. Otherwise, a copy is made.

    context

    The target context we want the return value to live in.

    returns

    A copy or self as an NDArray that lives in the target context.

    Definition Classes
    NDArray
  38. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  39. def asType(dtype: DType.DType): NDArray

    Permalink

    Return a copied numpy array of current array with specified type.

    Return a copied numpy array of current array with specified type.

    dtype

    Desired type of result array.

    returns

    A copy of array content.

    Definition Classes
    NDArray
  40. def at(idx: Int): NDArray

    Permalink

    Return a sub NDArray that shares memory with current one.

    Return a sub NDArray that shares memory with current one. the first axis will be rolled up, which causes its shape different from slice(i, i+1)

    idx

    index of sub array.

    Definition Classes
    SparseNDArrayNDArray
  41. val bytesAllocated: Long

    Permalink

    Off-Heap Bytes Allocated for this object

    Off-Heap Bytes Allocated for this object

    Definition Classes
    NDArray → NativeResource
  42. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def close(): Unit

    Permalink
    Definition Classes
    NativeResource → AutoCloseable
  44. def context: Context

    Permalink

    Get context of current NDArray.

    Get context of current NDArray.

    returns

    The context of current NDArray.

    Definition Classes
    NDArray
  45. def copy(): NDArray

    Permalink

    Clone the current array

    Clone the current array

    returns

    the copied NDArray in the same context

    Definition Classes
    NDArray
  46. def copyTo(ctx: Context): NDArray

    Permalink

    Copy the content of current array to a new NDArray in the context.

    Copy the content of current array to a new NDArray in the context.

    ctx

    Target context we want to copy data to.

    returns

    The copy target NDArray

    Definition Classes
    NDArray
  47. def copyTo(other: NDArray): NDArray

    Permalink

    Copy the content of current array to other.

    Copy the content of current array to other.

    other

    Target NDArray or context we want to copy data to.

    returns

    The copy target NDArray

    Definition Classes
    NDArray
  48. val creationTrace: Option[Array[StackTraceElement]]

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  49. def dispose(): Unit

    Permalink

    Release the native memory.

    Release the native memory.
    The NDArrays it depends on will NOT be disposed.
    The object shall never be used after it is disposed.

    Definition Classes
    NDArray → NativeResource
  50. def disposeDeps(): NDArray

    Permalink

    Dispose all NDArrays who help to construct this array.

    Dispose all NDArrays who help to construct this array.
    e.g. (a * b + c).disposeDeps() will dispose a, b, c (including their deps) and a * b

    returns

    this NDArray

    Definition Classes
    NDArray
  51. def disposeDepsExcept(arrs: NDArray*): NDArray

    Permalink

    Dispose all NDArrays who help to construct this array, excepts those in the arguments.

    Dispose all NDArrays who help to construct this array, excepts those in the arguments.
    e.g. (a * b + c).disposeDepsExcept(a, b) will dispose c and a * b. Note that a, b's dependencies will not be disposed either.

    arrs

    array of NDArrays

    returns

    this array

    Definition Classes
    NDArray
  52. def dtype: DType.DType

    Permalink

    Get data type of current NDArray.

    Get data type of current NDArray.

    returns

    class representing type of current ndarray

    Definition Classes
    NDArray
  53. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  54. def equals(o: Any): Boolean

    Permalink
    Definition Classes
    NDArray → AnyRef → Any
  55. def finalize(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed → AnyRef
  56. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  57. def getData: NDArray

    Permalink

    Get the Data portion from a Row Sparse NDArray

    Get the Data portion from a Row Sparse NDArray

    returns

    NDArray

  58. def getIndices: NDArray

    Permalink

    Get the indice Array

    Get the indice Array

    returns

    NDArray

  59. def getIndptr: NDArray

    Permalink

    Get the indptr Array from a CSR NDArray

    Get the indptr Array from a CSR NDArray

    returns

    NDArray

  60. def hashCode(): Int

    Permalink
    Definition Classes
    NDArray → AnyRef → Any
  61. def internal: NDArrayInternal

    Permalink
    Definition Classes
    NDArray
  62. def isDisposed: Boolean

    Permalink
    Definition Classes
    NativeResource → WarnIfNotDisposed
  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. def isSparse: Boolean

    Permalink

    check if NDArray is SparseNDArray

    check if NDArray is SparseNDArray

    returns

    Boolean

    Definition Classes
    NDArray
  65. def logDisposeWarning(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  66. def nativeAddress: CPtrAddress

    Permalink

    native Address associated with this object

    native Address associated with this object

    Definition Classes
    NDArray → NativeResource
  67. def nativeDeAllocator: (CPtrAddress) ⇒ Int

    Permalink

    Function Pointer to the NativeDeAllocator of nativeAddress

    Function Pointer to the NativeDeAllocator of nativeAddress

    Definition Classes
    NDArray → NativeResource
  68. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  69. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  70. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  71. val ref: NativeResourceRef

    Permalink

    Call NativeResource.register to get the reference

    Call NativeResource.register to get the reference

    Definition Classes
    NDArray → NativeResource
  72. def register(): NativeResourceRef

    Permalink

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    returns

    NativeResourceRef that tracks reachability of this object using PhantomReference

    Definition Classes
    NativeResource
  73. def reshape(dims: Shape): NDArray

    Permalink

    Return a reshaped NDArray that shares memory with current one.

    Return a reshaped NDArray that shares memory with current one.

    dims

    New shape.

    returns

    a reshaped NDArray that shares memory with current one.

    Definition Classes
    NDArray
  74. def reshape(dims: Array[Long], reverse: Option[Boolean] = None): NDArray

    Permalink

    Return a reshaped NDArray that shares memory with current one.

    Return a reshaped NDArray that shares memory with current one.

    dims

    New shape.

    reverse

    whether to inplace reshape

    returns

    a reshaped NDArray that shares memory with current one.

    Definition Classes
    NDArray
  75. def reshape(dims: Array[Int]): NDArray

    Permalink

    Return a reshaped NDArray that shares memory with current one.

    Return a reshaped NDArray that shares memory with current one.

    dims

    New shape.

    returns

    a reshaped NDArray that shares memory with current one.

    Definition Classes
    NDArray
  76. def serialize(): Array[Byte]

    Permalink
    Definition Classes
    NDArray
  77. def set(other: Array[Double]): NDArray

    Permalink
    Definition Classes
    NDArray
  78. def set(other: Array[Float]): NDArray

    Permalink
    Definition Classes
    NDArray
  79. def set(other: NDArray): NDArray

    Permalink
    Definition Classes
    NDArray
  80. def set(value: MX_PRIMITIVE_TYPE): NDArray

    Permalink

    Set the values of the NDArray

    Set the values of the NDArray

    value

    Value to set

    returns

    Current NDArray

    Definition Classes
    NDArray
  81. def shape: Shape

    Permalink

    Get shape of current NDArray.

    Get shape of current NDArray.

    returns

    an array representing shape of current ndarray

    Definition Classes
    NDArray
  82. def size: Int

    Permalink
    Definition Classes
    NDArray
  83. def slice(start: Int, end: Int): NDArray

    Permalink

    Return a sliced NDArray that shares memory with current one.

    Return a sliced NDArray that shares memory with current one. NDArray only support continuous slicing on axis 0

    start

    Starting index of slice.

    returns

    a sliced NDArray that shares memory with current one.

    Definition Classes
    SparseNDArrayNDArray
  84. def slice(i: Int): NDArray

    Permalink

    Return a sliced NDArray at the ith position of axis0

    Return a sliced NDArray at the ith position of axis0

    returns

    a sliced NDArray that shares memory with current one.

    Definition Classes
    NDArray
  85. def slice(range: (Int, Int)): NDArray

    Permalink
    Definition Classes
    NDArray
  86. lazy val sparseFormat: SparseFormat.SparseFormat

    Permalink
    Definition Classes
    NDArray
  87. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  88. def toArray: Array[Float]

    Permalink

    Return a copied flat java array of current array (row-major).

    Return a copied flat java array of current array (row-major).

    returns

    A copy of array content.

    Definition Classes
    SparseNDArrayNDArray
  89. def toDense: NDArray

    Permalink

    Convert a SparseNDArray to dense NDArray

    Convert a SparseNDArray to dense NDArray

    returns

    NDArray

  90. def toFloat64Array: Array[Double]

    Permalink

    Return a copied flat java array of current array (row-major) with datatype as Float64/Double.

    Return a copied flat java array of current array (row-major) with datatype as Float64/Double.

    returns

    A copy of array content.

    Definition Classes
    NDArray
  91. def toFloat64Scalar: Double

    Permalink
    Definition Classes
    NDArray
  92. def toScalar: Float

    Permalink

    Return a CPU scalar(float) of current ndarray.

    Return a CPU scalar(float) of current ndarray. This ndarray must have shape (1,)

    returns

    The scalar representation of the ndarray.

    Definition Classes
    NDArray
  93. def toSparse(sfOption: Option[SparseFormat.SparseFormat] = None): SparseNDArray

    Permalink

    Convert a NDArray to SparseNDArray

    Convert a NDArray to SparseNDArray

    sfOption

    the target sparse type

    returns

    SparseNDArray

    Definition Classes
    NDArray
  94. def toString(): String

    Permalink

    Visualize the internal structure of NDArray

    Visualize the internal structure of NDArray

    returns

    String that show the structure

    Definition Classes
    SparseNDArrayNDArray → AnyRef → Any
  95. def tracingEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  96. def unary_-(): NDArray

    Permalink
    Definition Classes
    NDArray
  97. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  100. def waitToRead(): Unit

    Permalink

    Block until all pending writes operations on current NDArray are finished.

    Block until all pending writes operations on current NDArray are finished. This function will return when all the pending writes to the current NDArray finishes. There can still be pending read going on when the function returns.

    Definition Classes
    NDArray
  101. val writable: Boolean

    Permalink

    whether the NDArray is writable

    whether the NDArray is writable

    Definition Classes
    SparseNDArrayNDArray

Inherited from NDArray

Inherited from NativeResource

Inherited from WarnIfNotDisposed

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped