Skip to content

Commit

Permalink
Fix numpy incompatiblity when reading files for Planetoid datasets (
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Apr 9, 2023
1 parent 87744e2 commit 8f40846
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Changed

- Fix `numpy` incompatiblity when reading files for `Planetoid` datasets ([#7141](https://github.com/pyg-team/pytorch_geometric/pull/7141))
- Added support for `Data.num_edges` for native `torch.sparse.Tensor` adjacency matrices ([#7104](https://github.com/pyg-team/pytorch_geometric/pull/7104))
- Fixed crash of heterogeneous data loaders if node or edge types are missing ([#7060](https://github.com/pyg-team/pytorch_geometric/pull/7060), [#7087](https://github.com/pyg-team/pytorch_geometric/pull/7087))
- Accelerated attention-based `MultiAggregation` ([#7077](https://github.com/pyg-team/pytorch_geometric/pull/7077))
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/io/planetoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def read_file(folder, prefix, name):
return out

out = out.todense() if hasattr(out, 'todense') else out
out = torch.Tensor(out)
out = torch.from_numpy(out).to(torch.float)
return out


Expand Down

0 comments on commit 8f40846

Please sign in to comment.