(user_items)
| 157 | |
| 158 | |
| 159 | def check_csr(user_items): |
| 160 | if not isinstance(user_items, scipy.sparse.csr_matrix): |
| 161 | class_name = user_items.__class__.__name__ |
| 162 | start = time.time() |
| 163 | user_items = user_items.tocsr() |
| 164 | warnings.warn( |
| 165 | f"Method expects CSR input, and was passed {class_name} instead. " |
| 166 | f"Converting to CSR took {time.time() - start} seconds", |
| 167 | ParameterWarning, |
| 168 | ) |
| 169 | return user_items |
no outgoing calls
no test coverage detected