Skip to content

[Python][Doc] Incorrect parameter descriptions in SparseCSCMatrix.from_numpy #49302

@chilin0525

Description

@chilin0525

Describe the bug, including details regarding any error messages, version, and platform.

The docstring for SparseCSCMatrix.from_numpy in python/pyarrow/tensor.pxi has incorrect parameter descriptions:

def from_numpy(data, indptr, indices, shape, dim_names=None):
"""
Create arrow::SparseCSCMatrix from numpy.ndarrays
Parameters
----------
data : numpy.ndarray
Data used to populate the sparse matrix.
indptr : numpy.ndarray
Range of the rows,
The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.
indices : numpy.ndarray
Column indices of the corresponding non-zero values.
shape : tuple
Shape of the matrix.
dim_names : list, optional
Names of the dimensions.
"""

  • indptr is described as "Range of the rows" but should be "Range of the columns"
  • indices is described as "Column indices" but should be "Row indices"

Component(s)

Documentation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions