Skip to content

Commit b136fe0

Browse files
committed
Remove iostream include for C backend
1 parent 7b0a392 commit b136fe0

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
@@ -479,9 +479,7 @@ def c_support_code(self, **kwargs):
479479
return blas_header_text() + mod_str
480480

481481
def c_headers(self, **kwargs):
482-
# std.cout doesn't require the '%' symbol to print stuff...
483-
# so it works much better with python's string-substitution stuff.
484-
return ["<iostream>", "<time.h>", "<sys/time.h>"]
482+
return ["<time.h>", "<sys/time.h>"]
485483

486484
def c_libraries(self, **kwargs):
487485
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)