c - Cython 中的方法如何在 C 中实现?
问题描述
这可能是关于“C”而不是“Cython”的问题,但我试图了解类在 cython 中的工作方式。
当我在 Cython 中编写课程时:
cdef class Myclass:
def __init__(self, a1, ...):
self.attribute1 = a1
def __cinit__(self, char *ca1,...):
self.c_attribute1 = Ca1
...
我知道它基本上是 a struct
in c。
但是之后:
cdef muFunction(self):
do and return something
对象的私有/本地方法如何?然后可以以C编译速度运行吗?
谢谢你,请随时指出并教我所有我可能错误使用的术语。
解决方案
推荐阅读
- react-native - React-Native:如何知道渲染何时完成
- terraform - Terraform 依赖于其他资源的无效计数参数
- java - Tomcat 已启动且主页正在运行,但我的网页无法正常运行
- python - Keras 负维度大小 Conv2D
- java - 将@XmlValue 读取为字符串而不进行编组/解组
- c# - 未生成信号器/集线器文件
- android - 为什么在添加 CMake 选项后我得到不同的构建变体选项
- api - 如何从 xrp 中获取信息,如 localhost 中的 data api v2
- google-analytics - 如何从谷歌分析中获取/显示网站总访问量?
- kubernetes - 使用 srimzi 在 k8s 上部署后无法将生产者/消费者连接到 kafka 云代理