Skip to content

Commit

Permalink
Small fixes after PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico authored and Michael Osthege committed May 24, 2021
1 parent 9b4aa82 commit 342c960
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions aesara/graph/callcache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import pickle
from typing import Callable, Dict, NoReturn, Optional, Tuple
from typing import Callable, Dict, Optional, Tuple


_logger = logging.getLogger("aesara.graph.callcache")
Expand All @@ -17,7 +17,7 @@ def __init__(self, filename: Optional[str] = None):
except OSError:
self.cache: Dict = {}

def persist(self, filename: Optional[str] = None) -> NoReturn:
def persist(self, filename: Optional[str] = None) -> None:
"""
Cache "filename" as a pickle file
"""
Expand Down Expand Up @@ -47,7 +47,7 @@ def call(self, fn: Callable, args: Tuple = (), key: Optional[Tuple] = None):
_logger.debug("cache hit %i", len(self.cache))
return self.cache[key]

def __del__(self) -> NoReturn:
def __del__(self) -> None:
try:
if self.filename:
self.persist()
Expand Down
4 changes: 2 additions & 2 deletions aesara/tensor/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ def get_scalar_constant_value(
Parameters
----------
orig_v :
orig_v : int, float, np.ndarray, Constant or None
The variable `v` where to find the constant scalar(0-D).
elemwise : bool
If False, we won't try to go into elemwise. So this call is faster.
But we still investigate in Second Elemwise (as this is a substitute
Expand Down

0 comments on commit 342c960

Please sign in to comment.