(self, data, rows, cols, shape=None, type_as=None)
| 1741 | return jax.random.permutation(subkey, size) |
| 1742 | |
| 1743 | def coo_matrix(self, data, rows, cols, shape=None, type_as=None): |
| 1744 | # Currently, JAX does not support sparse matrices |
| 1745 | data = self.to_numpy(data) |
| 1746 | rows = self.to_numpy(rows) |
| 1747 | cols = self.to_numpy(cols) |
| 1748 | nx = NumpyBackend() |
| 1749 | coo_matrix = nx.coo_matrix(data, rows, cols, shape=shape, type_as=type_as) |
| 1750 | matrix = nx.todense(coo_matrix) |
| 1751 | return self.from_numpy(matrix) |
| 1752 | |
| 1753 | def issparse(self, a): |
| 1754 | # Currently, JAX does not support sparse matrices |
nothing calls this directly
no test coverage detected