Skip to content

Commit

Permalink
remove assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
aerubanov authored and brandonwillard committed Jan 12, 2022
1 parent 528ee54 commit 51792fe
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions tests/tensor/test_sharedvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,10 @@ def test_specify_shape(self):
topo_cst[0].op == aesara.compile.function.types.deep_copy_op

# Test that we can take the grad.
if aesara.sparse.enable_sparse and isinstance(
x1_specify_shape.type, aesara.sparse.SparseType
):
# SparseVariable don't support sum for now.
assert not hasattr(x1_specify_shape, "sum")
else:
shape_grad = aesara.gradient.grad(x1_specify_shape.sum(), x1_shared)
shape_constant_fct_grad = aesara.function([], shape_grad)
# aesara.printing.debugprint(shape_constant_fct_grad)
shape_constant_fct_grad()
shape_grad = aesara.gradient.grad(x1_specify_shape.sum(), x1_shared)
shape_constant_fct_grad = aesara.function([], shape_grad)
# aesara.printing.debugprint(shape_constant_fct_grad)
shape_constant_fct_grad()

# Test that we can replace with values of the different shape
# but that will raise an error in some case, but not all
Expand Down

0 comments on commit 51792fe

Please sign in to comment.