Skip to content

Commit

Permalink
fix recursive __new__ bug (#4196)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Mar 4, 2022
1 parent 2dfff9a commit e18a897
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions torch_geometric/data/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def __len__(self) -> int:
return len(self._mapping)

def __getattr__(self, key: str) -> Any:
if key == '_mapping':
self._mapping = {}
return self._mapping
try:
return self[key]
except KeyError:
Expand Down

0 comments on commit e18a897

Please sign in to comment.