弃用警告:当 `op_axes` 为 NULL 时使用 `oa_ndim == 0` 已被弃用
我该如何防止这个异常出现呢?
C:\Anaconda\envs\p33\lib\site-packages\numexpr\necompiler.py:742: DeprecationWarning: using `oa_ndim == 0` when `op_axes` is NULL is deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility
return compiled_ex(*arguments, **kwargs)
这个异常是在我进行以下操作时产生的:
df = pd.DataFrame( np.random.randn(1000,59))
df2=df**2
如果我创建一个更小的数据框,这个异常似乎就不会出现。例如:
df = pd.DataFrame( np.random.randn(1000,10))
我使用的pandas版本是0.13.1,numpy版本是1.8.1。
1 个回答
3
我通过更新numexpr解决了这个问题。我是在命令行中使用Conda来完成这个操作的:
conda update -n p33 numexpr