14. API: SparseVector Objects
14.1. SparseVector Class
- class oracledb.SparseVector(num_dimensions: int, indices: list | array, values: list | array)
Creates and returns a SparseVector object.
The
num_dimensionsparameter is the number of dimensions contained in the vector.The
indicesparameter is the indices (zero-based) of non-zero values in the vector.The
valuesparameter is the non-zero values stored in the vector.See Using SPARSE Vectors for more information.
Added in version 3.0.0.
14.2. SparseVector Attributes
- property SparseVector.indices: array
Returns the indices (zero-based) of non-zero values in the vector.
- property SparseVector.num_dimensions: int
Returns the number of dimensions contained in the vector.
- property SparseVector.values: array
Returns the non-zero values stored in the vector.