Similar to sparse.COO.__repr__, but without the redundant shape/dtype.
(array)
| 301 | |
| 302 | |
| 303 | def inline_sparse_repr(array): |
| 304 | """Similar to sparse.COO.__repr__, but without the redundant shape/dtype.""" |
| 305 | sparse_array_type = array_type("sparse") |
| 306 | assert isinstance(array, sparse_array_type), array |
| 307 | return f"<{type(array).__name__}: nnz={array.nnz:d}, fill_value={array.fill_value}>" |
| 308 | |
| 309 | |
| 310 | def inline_variable_array_repr(var, max_width): |
no test coverage detected
searching dependent graphs…