Skip to content

Commit a91e865

Browse files
kaushikcfdinducer
authored andcommitted
adds pymbolic.typing
1 parent fd129be commit a91e865

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

pymbolic/typing.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from pymbolic.primitives import Expression
2+
from numbers import Number
3+
from typing import Union
4+
5+
try:
6+
import numpy as np
7+
except ImportError:
8+
BoolT = bool
9+
else:
10+
BoolT = Union[bool, np.bool_]
11+
12+
13+
ScalarT = Union[Number, int, BoolT, float]
14+
ExpressionT = Union[ScalarT, Expression]

0 commit comments

Comments
 (0)