Skip to content

Commit 5ffe17a

Browse files
maresblucianopaz
authored andcommitted
Remove iostream include for C backend
1 parent 5229feb commit 5ffe17a

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

pytensor/link/c/cmodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def __init__(self, name=None):
157157

158158
self.support_code = []
159159
self.functions = []
160-
self.includes = ["<Python.h>", "<iostream>", '"pytensor_mod_helper.h"']
160+
self.includes = ["<Python.h>", '"pytensor_mod_helper.h"']
161161
self.init_blocks = []
162162

163163
def print_methoddef(self, stream):

pytensor/tensor/blas.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,7 @@ def c_support_code(self, **kwargs):
472472
return blas_header_text() + mod_str
473473

474474
def c_headers(self, **kwargs):
475-
# std.cout doesn't require the '%' symbol to print stuff...
476-
# so it works much better with python's string-substitution stuff.
477-
return ["<iostream>"]
475+
return []
478476

479477
def c_libraries(self, **kwargs):
480478
return ldflags()

pytensor/tensor/special.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def infer_shape(self, fgraph, node, shape):
294294
return shape
295295

296296
def c_headers(self, **kwargs):
297-
return ["<iostream>", "<cmath>"]
297+
return ["<cmath>"]
298298

299299
def c_support_code_apply(self, node: Apply, name: str) -> str:
300300
"""Needed to define NPY_RAVEL_AXIS"""

0 commit comments

Comments
 (0)