Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sparse docstring comments #3712

Merged
merged 2 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/cuml/manifold/t_sne.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ class TSNE(Base,
self.sparse_fit = False

@generate_docstring(skip_parameters_heading=True,
X='dense_sparse',
convert_dtype_cast='np.float32')
def fit(self, X, convert_dtype=True, knn_graph=None) -> "TSNE":
"""
Expand Down
1 change: 1 addition & 0 deletions python/cuml/manifold/umap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ class UMAP(Base,
return (None, None), (None, None)

@generate_docstring(convert_dtype_cast='np.float32',
X='dense_sparse',
skip_parameters_heading=True)
def fit(self, X, y=None, convert_dtype=True,
knn_graph=None) -> "UMAP":
Expand Down
6 changes: 4 additions & 2 deletions python/cuml/metrics/pairwise_distances.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ def pairwise_distances(X, Y=None, metric="euclidean", handle=None,

Parameters
----------
X : array-like (device or host) of shape (n_samples_x, n_features)
X : Dense or sparse matrix (device or host) of shape
(n_samples_x, n_features)
Acceptable formats: cuDF DataFrame, NumPy ndarray, Numba device
ndarray, cuda array interface compliant array like CuPy
ndarray, cuda array interface compliant array like CuPy, or
cupyx.scipy.sparse for sparse input

Y : array-like (device or host) of shape (n_samples_y, n_features),\
optional
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/neighbors/nearest_neighbors.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class NearestNeighbors(Base,
self.algo_params = algo_params
self.knn_index = <uintptr_t> 0

@generate_docstring()
@generate_docstring(X='dense_sparse')
def fit(self, X, convert_dtype=True) -> "NearestNeighbors":
"""
Fit GPU index for performing nearest neighbor queries.
Expand Down