Skip to content

Commit

Permalink
fixed coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rauber committed Aug 14, 2020
1 parent ac9b7f1 commit 7365808
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eagerpy/tensor/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def __getitem__(self: TensorType, index: Any) -> TensorType:
for i in range(len(index)):
t = index[i]
if int64:
t = tf.cast(t, tf.int64)
t = tf.cast(t, tf.int64) # pragma: no cover
assert t.ndim == len(shape)
tiling = []
for b, k in zip(shape, t.shape):
Expand All @@ -551,7 +551,7 @@ def __getitem__(self: TensorType, index: Any) -> TensorType:
elif k == b:
tiling.append(1)
else:
raise ValueError(
raise ValueError( # pragma: no cover
f"{tuple(t.shape)} cannot be broadcasted to {shape}"
)
index[i] = tf.tile(t, tiling)
Expand Down

0 comments on commit 7365808

Please sign in to comment.