From 2c405c523deb80a072d27aa6fa84c5af28b91508 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Mon, 24 Jan 2022 17:13:40 +0300 Subject: [PATCH] change type check --- aesara/tensor/type.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aesara/tensor/type.py b/aesara/tensor/type.py index 37324ee92c..28e55c3b9a 100644 --- a/aesara/tensor/type.py +++ b/aesara/tensor/type.py @@ -315,9 +315,7 @@ def is_super(self, otype): return False def convert_variable(self, var): - if self.is_super(var.type) and not isinstance( - var.type, aesara.sparse.SparseType - ): + if self.is_super(var.type) and isinstance(var.type, DenseTensorType): # `var.type` is at least as specific as `self`, so we return # `var` as-is return var