Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions autowrap/CodeGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2133,11 +2133,11 @@ def create_std_cimports(self):
code.add(stmt)

self.top_level_code.append(code)

# If numpy is enabled, inline the ArrayWrapper/ArrayView classes
if self.include_numpy:
self.inline_array_wrappers()

return code

def inline_array_wrappers(self):
Expand Down Expand Up @@ -2175,8 +2175,10 @@ def inline_array_wrappers(self):
""")
# Add the wrapper code directly
code.add(wrapper_code_str)

self.top_level_code.append(code)

# Add to top_level_pyx_code so ArrayWrappers go to pyx only, not pxd
# This avoids conflicts when the project already has ArrayWrapper definitions
self.top_level_pyx_code.append(code)

def create_includes(self):
code = Code()
Expand Down