not a Python function
- 主要言語
- Julia
- スター
- 1.5k
- フォーク
- 186
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
sorry if i'm being dumb about this, but functions with multiple input arguments don't seem to be recognized as functions:
```
julia> using PyCall
julia> @pyimport scipy.optimize as so
julia> so.curve_fit((x,m,b)->m*x+b, 1:10, 2:2:20)
ERROR: PyError (:PyObject_Call)
TypeError(' is not a Python function',)
File "/home/arthurb/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 604, in curve_fit
args, varargs, varkw, defaults = _getargspec(f)
File "/home/arthurb/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/scipy/_lib/_util.py", line 289, in getargspec_no_self
argspec = inspect.getargspec(func)
File "/home/arthurb/.julia/v0.4/Conda/deps/usr/lib/python2.7/inspect.py", line 816, in getargspec
raise TypeError('{!r} is not a Python function'.format(func))
[inlined code] from /home/arthurb/.julia/v0.4/PyCall/src/exception.jl:81
in pycall at /home/arthurb/.julia/v0.4/PyCall/src/PyCall.jl:356
in call at /home/arthurb/.julia/v0.4/PyCall/src/PyCall.jl:372
julia> so.newton(x -> cos(x) - x, 1)
0.7390851332151607
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Reproduce the scipy.optimize.curve_fit example and compare it with the working newton call. Start in PyCall/src/PyCall.jl around pycall and call, using the traceback locations as context. Done means Julia anonymous functions with multiple arguments work with Python code that inspects its callable signature, with regression coverage for this example.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- julia, python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100