Skip to content

Commit 11e5f21

Browse files
Fix ArrayWrapper inlining to go to pyx only, not pxd
Re-enable ArrayWrapper inlining with the fix that adds ArrayWrappers to top_level_pyx_code instead of top_level_code. This ensures: - ArrayWrappers are only placed in .pyx files (not .pxd files) - No Cython declaration conflicts when projects have their own ArrayWrappers - Projects can now remove their own ArrayWrapper definitions and use autowrap's Benefits for projects using this: - Additional integer array types (Int8-64, UInt8-64) - Extra methods: __init__(size), resize(), size() - Better documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent abfbaa2 commit 11e5f21

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎autowrap/CodeGenerator.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,11 +2134,9 @@ def create_std_cimports(self):
21342134

21352135
self.top_level_code.append(code)
21362136

2137-
# NOTE: ArrayWrapper inlining is disabled because projects like OpenMS
2138-
# provide their own ArrayWrapper implementations in addon files.
21392137
# If numpy is enabled, inline the ArrayWrapper/ArrayView classes
2140-
# if self.include_numpy:
2141-
# self.inline_array_wrappers()
2138+
if self.include_numpy:
2139+
self.inline_array_wrappers()
21422140

21432141
return code
21442142

0 commit comments

Comments
 (0)