(self, a, threshold=0.0)
| 1334 | return csr_matrix(a) |
| 1335 | |
| 1336 | def eliminate_zeros(self, a, threshold=0.0): |
| 1337 | if threshold > 0: |
| 1338 | if self.issparse(a): |
| 1339 | a.data[self.abs(a.data) <= threshold] = 0 |
| 1340 | else: |
| 1341 | a[self.abs(a) <= threshold] = 0 |
| 1342 | if self.issparse(a): |
| 1343 | a.eliminate_zeros() |
| 1344 | return a |
| 1345 | |
| 1346 | def todense(self, a): |
| 1347 | if self.issparse(a): |
nothing calls this directly
no test coverage detected