cython lambda1与< lambda> [英] cython lambda1 vs. <lambda>

查看:138
本文介绍了cython lambda1与< lambda>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现在我的PC上,某种方法表示为< cyfunction< lambda>。在0x06DD02A0> 上,而在CentOS服务器上,它是< cyfunction lambda1在0x1df3050> 上。我相信这是使用其他软件包导致非常模糊的下游错误的原因。

I have found out that on my PC, a certain method is represented as <cyfunction <lambda> at 0x06DD02A0>, while on a CentOS server, it's <cyfunction lambda1 at 0x1df3050>. I believe this is the cause for a very obscure downstream error with a different package.

为什么不同?它是什么意思?我可以将一个转向另一个吗?

Why is it different? What is its meaning? Can I turn one to the other?

详细信息:在查看 pandas.algos._return_false <时,我会看到此信息。 / code>。 PC和服务器都具有python 2.7.6,相同版本的pandas(0.14.1)和cython 0.20.2。 PC运行的是Win 7,服务器是CentOS 6.5。

Details: I see this when looking at pandas.algos._return_false. Both PC and server has python 2.7.6, same version of pandas (0.14.1), and cython 0.20.2. The PC is running Win 7, server is CentOS 6.5.

推荐答案

熊猫随附了针对Cython 0.17.2预编译的Cython文件。 < lambda> 变体较新,因此可能是针对系统的Cython版本进行编译的。

Pandas ship with their Cython files precompiled against Cython 0.17.2. The <lambda> variant is newer than that, so was probably compiled against the system's Cython version.

您应该避免依赖于此。甚至不一致!例如,即使在Cython 0.20.2上,错误也倾向于使用 lambdaN 格式!

You should probably avoid depending on this. It's not even consistent! Errors, for example, tend to use the lambdaN form even on Cython 0.20.2!

依赖于此,标准化版本:要么在任何地方使用Pandas的预编译源,要么在任何地方自己编译。

If you have to depend on this, standardise on a version: either use Pandas' precompiled sources everywhere or compile them yourself everywhere.

为了使用系统Python编译Pandas,请运行 python setup.py clean 删除预构建的 .c 文件。

In order to compile Pandas with the system Python, run python setup.py clean to remove the prebuilt .c files.

这篇关于cython lambda1与&lt; lambda&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆