Skip to content

Commit

Permalink
Actually fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Aug 25, 2021
1 parent fd98d83 commit 8d819f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions lab/shaping.py
Expand Up @@ -104,10 +104,7 @@ def shape(a, dim: Int, *dims: Int):
a_shape = B.shape(a)
subshape = tuple(a_shape[i] for i in dims)
if LazyShapes.enabled:
# For some reason, CI does not count this line as tested. It, however, is
# certainly tested by `test_shaping.py::test_subshape`...
# TODO: Fix this.
return Shape(*subshape) # pragma: no cover
return Shape(*subshape)
else:
return subshape

Expand Down
2 changes: 2 additions & 0 deletions tests/test_shaping.py
Expand Up @@ -260,7 +260,9 @@ def test_take_tf(check_lazy_shapes):
a = Matrix(3, 4, 5)
ref = Tensor(3)
approx(B.take(a.tf(), ref.tf() > 0), B.take(a.np(), ref.np() > 0))
approx(B.take(a.tf(), ref.np() > 0), B.take(a.np(), ref.np() > 0))
approx(B.take(a.tf(), B.range(tf.int64, 2)), B.take(a.np(), B.range(2)))
approx(B.take(a.tf(), B.range(np.int64, 2)), B.take(a.np(), B.range(2)))


def test_submatrix(check_lazy_shapes):
Expand Down

0 comments on commit 8d819f6

Please sign in to comment.