File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 33import numpy as np
44
55
6- try :
7- from numpy ._core .einsumfunc import ( # type: ignore[attr-defined]
8- _find_contraction ,
9- _parse_einsum_input ,
10- )
11- except ModuleNotFoundError :
12- from numpy .core .einsumfunc import ( # type: ignore[no-redef]
13- _find_contraction ,
14- _parse_einsum_input ,
15- )
16-
17-
18- # suppress linting warning by "using" the imports here:
19- __all__ = [
20- "_find_contraction" ,
21- "_parse_einsum_input" ,
22- ]
23-
24-
256numpy_version_tuple = tuple (int (n ) for n in np .__version__ .split ("." )[:2 ])
267numpy_version = np .lib .NumpyVersion (
278 np .__version__
Original file line number Diff line number Diff line change 66from typing import cast
77
88import numpy as np
9+ from numpy ._core .einsumfunc import ( # type: ignore[attr-defined]
10+ _find_contraction ,
11+ _parse_einsum_input ,
12+ )
913from numpy .lib .array_utils import normalize_axis_index , normalize_axis_tuple
1014
1115from pytensor .compile .builders import OpFromGraph
12- from pytensor .npy_2_compat import _find_contraction , _parse_einsum_input
1316from pytensor .tensor import TensorLike
1417from pytensor .tensor .basic import (
1518 arange ,
You can’t perform that action at this time.
0 commit comments