提交 0cbf8557 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Add type annotations to aesara.tensor.subtensor.as_index_constant

上级 470c4724
......@@ -111,7 +111,9 @@ def indices_from_subtensor(
)
def as_index_constant(a):
def as_index_constant(
a: Optional[Union[slice, int, np.integer, Variable]]
) -> Optional[Union[Variable, slice]]:
r"""Convert Python literals to Aesara constants--when possible--in `Subtensor` arguments.
This will leave `Variable`\s untouched.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论