Skip to content

Commit

Permalink
Suppress pytype error (jax-ml#2974)
Browse files Browse the repository at this point in the history
pytype gets confused otherwise:
```
File ".../pxla.py", line 244, in _as_slice_indices: bad option in return type [bad-return-type]
           Expected: Tuple[Tuple[int, ...], Tuple[int, ...], Tuple[int, ...]]
  Actually returned: Tuple[Tuple[Union[Tuple[Union[int, slice], ...], slice], ...], tuple, Tuple[int, ...]]
```
  • Loading branch information
skye authored May 5, 2020
1 parent b1bc841 commit 25a0c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jax/interpreters/pxla.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _as_slice_indices(arr: xla.DeviceArray, idx: Index) -> Tuple[
start_indices[dim] = sub_idx.start
limit_indices[dim] = sub_idx.stop

return tuple(start_indices), tuple(limit_indices), tuple(removed_dims)
return tuple(start_indices), tuple(limit_indices), tuple(removed_dims) # type: ignore


def shard_aval(size, aval):
Expand Down

0 comments on commit 25a0c3b

Please sign in to comment.