Cansome告诉我这个cython代码是怎么回事。完整的代码可以看出:有人能告诉我这个c代码在干什么吗?
https://github.com/scipy/scipy/blob/master/scipy/spatial/ckdtree.pyx
# this is the standard trick for variable-size arrays:
# malloc sizeof(nodeinfo)+self.m*sizeof(double) bytes.
cdef struct nodeinfo:
innernode* node
double side_distances[0]
这不是OP的代码。这是scipy。我不明白你为什么推荐使用另一种数据结构。 Cython是一种用Python语法编写C代码的方法。狂野! +1 – 2011-04-29 21:35:46
你是对的@大卫。我不应该建议我不熟悉的语言 - 建议(有点)删除。 – pmg 2011-04-29 21:39:53