TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Intro to writing C-extension for Python

89 点作者 synparb将近 13 年前
Also has some nice numpy specific stuff for scientific code

5 条评论

synparb将近 13 年前
This piece also has some nice numpy specific information for scientific computing.
jnazario将近 13 年前
FWIW you could have done this in far fewer lines of python using a code generator like Cython or Pyrex.<p>that said, learning the intricacies of an extension - and all of the stuff you have to do under the hood like registering handlers, reference counting, cleanup, etc - is a valuable experience.<p>but once you got that done i just recommend you use code generators. it's also a lot easier to maintain.
thepumpkin1979将近 13 年前
omg, I suck at math. am I the only one who got intimidated by the math formula? May be I need a tutorial about C ABI/Python writing wrappers like "foo_sum" and "bar_multi".
评论 #4365271 未加载
zaptheimpaler将近 13 年前
This and Bitey(<a href="https://github.com/dabeaz/bitey" rel="nofollow">https://github.com/dabeaz/bitey</a>) are both on the front page :)
16s将近 13 年前
Boost Python is great for anyone doing C++ Python modules. It's rather simple too.
评论 #4377888 未加载