Skip to content

Commit c07dfe4

Browse files
brandonwillardtwiecki
authored andcommitted
Use Type.filter in NumbaLinker.output_filter
1 parent b757e7e commit c07dfe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/link/numba/linker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def output_filter(self, var: "Variable", out: Any) -> Any:
1717
if not isinstance(var, np.ndarray) and isinstance(
1818
var.type, pytensor.tensor.TensorType
1919
):
20-
return np.asarray(out, dtype=var.type.dtype)
20+
return var.type.filter(out, allow_downcast=True)
2121

2222
return out
2323

0 commit comments

Comments
 (0)