我正在使用 oct2py 从 python 执行八度函数,我收到以下错误:
oct2PyError:八度评估错误:错误:二进制运算符'*'未通过'复矩阵'操作为'int64 scalar'实现
在 python 中,我只是调用函数:
from oct2py import octave
results = octave.myOctaveFunction(parameters)
在调试 myOctaveFunction 时,我认为错误在代码中:
slc=interpft(slc, OSF*lines, 1);
在哪里:
- slc 是一个复数矩阵,大小 = [241,41](双精度)
- OSF 是一个过采样因子。OSF = 16 (int64)
- lines 是 slc 矩阵的行数。行数 = 241(标量)
- interpft 函数:https ://www.mathworks.com/help/matlab/ref/interpft.html
编辑:详细追溯:
回溯(最近一次通话最后):
File "/home/ezaqui/Papyrus/plugins/org.python.pydev_5.1.2.201606231256/pysrc/_pydevd_bundle/pydevd_exec.py", line 3, in Exec
exec exp in global_vars, local_vars
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/oct2py/dynamic.py", line 96, in __call__
return self._ref().feval(self.name, *inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/oct2py/core.py", line 369, in feval
store_as=store_as, plot_dir=plot_dir)
File "/usr/local/lib/python2.7/dist-packages/oct2py/core.py", line 568, in _feval
raise Oct2PyError(msg)
Oct2PyError: Octave evaluation error:
error: binary operator '*' not implemented for 'int64 scalar' by 'complex matrix' operations