docs: undefined to_sparse() function
- Dominant language
- Python
- Stars
- 8
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
In the code snippet below `This second example is about loading the dataset as a GNN with random data and classes:`
```python
import random
from torch_geometric.utils import from_networkx
import numpy as np
def to_torch_randomdata(dataset, features, classes):
for d in dataset:
G = d["graph"]
for n in G.nodes():
G.nodes[n]['features'] = list(np.random.rand(features).astype(np.float32))
G.nodes[n]['classes'] = random.randint(0,classes - 1)
gnn = from_networkx(G)
gnn = to_sparse(gnn)
yield {"name": d["name"], "gnn": gnn}
dataset = to_torch_randomdata(load_dataset(""), 10, 2)
```
The function `to_sparse` is undefined.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.