(self, a)
| 2290 | return getattr(a, "is_sparse", False) or getattr(a, "is_sparse_csr", False) |
| 2291 | |
| 2292 | def tocsr(self, a): |
| 2293 | # Versions older than 1.9 do not support CSR tensors. PyTorch 1.9 and 1.10 offer a very limited support |
| 2294 | return self.todense(a) |
| 2295 | |
| 2296 | def eliminate_zeros(self, a, threshold=0.0): |
| 2297 | if self.issparse(a): |