# Problem with the calling of Laplacian.jl functions from PyJulia

**URL:** https://discourse.julialang.org/t/problem-with-the-calling-of-laplacian-jl-functions-from-pyjulia/43829
**Category:** Performance
**Tags:** question, package
**Created:** [July 28, 2020, 6:26pm UTC](https://discourse.julialang.org/t/problem-with-the-calling-of-laplacian-jl-functions-from-pyjulia/43829 "2020-07-28T18:26:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Alip](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Alip](https://discourse.julialang.org/u/Alip)
#### Post date: [July 28, 2020, 6:26pm UTC](https://discourse.julialang.org/t/problem-with-the-calling-of-laplacian-jl-functions-from-pyjulia/43829/1 "2020-07-28T18:26:13Z")

</div>

I’m trying to call some functions from the laplacians.jl package by using PyJulia in my python code. It seems that I cannot run the code from Pyjulia because when I use the function directly in the Julia environment it worked. any thoughts or solution about this error?

> > > tree = Laplacians.akpwU(graph)  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > RuntimeError: Julia exception: MethodError: no method matching nnz(::Array{Float64,2})  
> > > Closest candidates are:  
> > > nnz(!Matched::SparseArrays.SparseMatrixCSC) at D:\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.3\SparseArrays\src\sparsematrix.jl:111  
> > > nnz(!Matched::Base.ReshapedArray{T,1,#s627,MI} where MI\<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where #s627\<:SparseArrays.SparseMatrixCSC) where T at D:\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.3\SparseArrays\src\sparsematrix.jl:112  
> > > nnz(!Matched::SparseArrays.SparseVector) at D:\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.3\SparseArrays\src\sparsevector.jl:43  
> > > …  
> > > Stacktrace:  
> > > [1] akpwUsub(::Array{Float64,2}) at C:\Users.julia\packages\Laplacians\K6Pgk\src\akpw.jl:184  
> > > [2] akpwU(::Array{Float64,2}) at C:\Users.julia\packages\Laplacians\K6Pgk\src\akpw.jl:172  
> > > [3] #invokelatest#1 at .\essentials.jl:709 [inlined]  
> > > [4] invokelatest(::Any, ::Any) at .\essentials.jl:708  
> > > [5] \_pyjlwrap\_call(::Function, ::Ptr{PyCall.PyObject\_struct}, ::Ptr{PyCall.PyObject\_struct}) at C:\Users.julia\packages\PyCall\zqDXB\src\callback.jl:28  
> > > [6] pyjlwrap\_call(::Ptr{PyCall.PyObject\_struct}, ::Ptr{PyCall.PyObject\_struct}, ::Ptr{PyCall.PyObject\_struct}) at C:\Users.julia\packages\PyCall\zqDXB\src\callback.jl:49
