We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e016dc7 commit 15918a6Copy full SHA for 15918a6
pytensor/tensor/subtensor.py
@@ -222,7 +222,7 @@ def as_index_literal(
222
return None
223
224
if isinstance(idx, ScalarConstant):
225
- return cast(int | None, idx.data)
+ return cast(int, idx.data)
226
227
if isinstance(idx, TensorConstant):
228
return cast(int, idx.data.item())
@@ -253,7 +253,7 @@ def get_canonical_form_slice(
253
def get_canonical_form_slice(
254
theslice: ScalarVariable | TensorVariable,
255
length: int | np.integer | ScalarVariable | TensorVariable,
256
-) -> tuple[slice | ScalarVariable, int]: ...
+) -> tuple[ScalarVariable, int]: ...
257
258
259
0 commit comments