Skip to content

Commit

Permalink
Merge pull request #46 from JuliaDiffEq/ChrisRackauckas-patch-1
Browse files Browse the repository at this point in the history
Switch to property overloaded PyCall
  • Loading branch information
ChrisRackauckas authored Jun 2, 2019
2 parents c21a964 + 5bc9867 commit a8d9071
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diffeqpy/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ PyCall.PyObject(::typeof(DiffEqBase.solve)) =

function DiffEqBase.numargs(f::PyCall.PyObject)
inspect = PyCall.pyimport("inspect")
haskey(f,:py_func) ? _f = f[:py_func] : _f = f
PyCall.hasproperty(f,:py_func) ? _f = f.py_func : _f = f
if PyCall.pyversion < v"3.0.0"
return length(first(inspect[:getargspec](_f)))
return length(first(inspect.getargspec(_f)))
else
return length(first(inspect[:getfullargspec](_f)))
return length(first(inspect.getfullargspec(_f)))
end
end

0 comments on commit a8d9071

Please sign in to comment.