22
22
STORAGE .COO ]
23
23
24
24
25
- def sparse (values , row_idx , col_idx , nrows , ncols , storage = STORAGE .CSR ):
25
+ def create_sparse (values , row_idx , col_idx , nrows , ncols , storage = STORAGE .CSR ):
26
26
"""
27
27
Create a sparse matrix from it's constituent parts.
28
28
@@ -60,7 +60,7 @@ def sparse(values, row_idx, col_idx, nrows, ncols, storage = STORAGE.CSR):
60
60
values .arr , row_idx .arr , col_idx .arr , storage .value ))
61
61
return out
62
62
63
- def sparse_from_host (values , row_idx , col_idx , nrows , ncols , storage = STORAGE .CSR ):
63
+ def create_sparse_from_host (values , row_idx , col_idx , nrows , ncols , storage = STORAGE .CSR ):
64
64
"""
65
65
Create a sparse matrix from it's constituent parts.
66
66
@@ -90,9 +90,9 @@ def sparse_from_host(values, row_idx, col_idx, nrows, ncols, storage = STORAGE.C
90
90
91
91
A sparse matrix.
92
92
"""
93
- return sparse (to_array (values ), to_array (row_idx ), to_array (col_idx ), nrows , ncols , storage )
93
+ return create_sparse (to_array (values ), to_array (row_idx ), to_array (col_idx ), nrows , ncols , storage )
94
94
95
- def sparse_from_dense (dense , storage = STORAGE .CSR ):
95
+ def create_sparse_from_dense (dense , storage = STORAGE .CSR ):
96
96
"""
97
97
Create a sparse matrix from a dense matrix.
98
98
@@ -115,7 +115,7 @@ def sparse_from_dense(dense, storage = STORAGE.CSR):
115
115
safe_call (backend .get ().af_create_sparse_array_from_dense (c_pointer (out .arr ), dense .arr , storage .value ))
116
116
return out
117
117
118
- def sparse_to_dense (sparse ):
118
+ def create_sparse_to_dense (sparse ):
119
119
"""
120
120
Create a dense matrix from a sparse matrix.
121
121
0 commit comments