Skip to content

Commit

Permalink
Don't try to delete from dict when key is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenretel committed Jan 29, 2024
1 parent aaccbc1 commit 8aa183a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bigwig_loader/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def reset_gpu(self) -> None:
"""

self._out = cp.zeros((len(self), 1, 1), dtype=cp.float32)
del self.__dict__["decoder"]
del self.__dict__["memory_bank"]
if "decoder" in self.__dict__:
del self.__dict__["decoder"]
if "memory_bank" in self.__dict__:
del self.__dict__["memory_bank"]

@cached_property
def decoder(self) -> Decoder:
Expand Down

0 comments on commit 8aa183a

Please sign in to comment.