小编Mak*_*ans的帖子

numpy AttributeError:使用theano模块'numpy.core.multiarray'没有属性_get_ndarray_c_version

我正在运行这个简单的示例:

import theano
x = theano.tensor.dscalar()
f = theano.function([x], 2*x)
f(4)
Run Code Online (Sandbox Code Playgroud)

我得到:

AttributeError: ('The following error happened while compiling the node', Elemwise{mul,no_inplace}(TensorConstant{2.0}, <TensorType(float64, scalar)>), '\n', "module 'numpy.core.multiarray' has no attribute '_get_ndarray_c_version'")
Run Code Online (Sandbox Code Playgroud)

我虽然一定是一个小错误,所以我尝试更新,但据我所知我拥有最新版本:

import numpy

numpy.version.version
'1.16.2'
Run Code Online (Sandbox Code Playgroud)

我正在spyder中运行所有这些,但这似乎无关紧要,因为我在python解释器中遇到了相同的错误

python numpy theano

6
推荐指数
1
解决办法
2989
查看次数

标签 统计

numpy ×1

python ×1

theano ×1