From 119acc49562853a68ee3112c91e93e2ff8ff99d8 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia-Ripoll Date: Thu, 18 Jan 2024 22:03:02 +0100 Subject: [PATCH] Replace C++ with C compiler in Cython --- .gitignore | 3 ++- setup.py | 2 -- src/seemps/state/core.pyx | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7dc2eba0..3032f7ca 100644 --- a/.gitignore +++ b/.gitignore @@ -112,4 +112,5 @@ ipynb_output_filter # benchmark*.json -*.cpp \ No newline at end of file +*.cpp +*.c diff --git a/setup.py b/setup.py index fa72b968..8624345a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ "cdivision": True, # No exception on zero denominator "initializedcheck": False, # We take care of initializing cdef classes and memory views "overflowcheck": False, - "cpp_locals": True, "binding": False, } if sys.platform == "linux": @@ -51,7 +50,6 @@ Extension( name, [file], - language="c++", define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], extra_compile_args=extra_compile_args, include_dirs=[np.get_include()], diff --git a/src/seemps/state/core.pyx b/src/seemps/state/core.pyx index 05059351..329d04dc 100644 --- a/src/seemps/state/core.pyx +++ b/src/seemps/state/core.pyx @@ -1,7 +1,6 @@ import numpy as np cimport numpy as cnp from libc.math cimport sqrt -from libcpp cimport bool MAX_BOND_DIMENSION = 0x7fffffff """Maximum bond dimension for any MPS."""