Skip to content

Commit de7a467

Browse files
committed
just using todense() to convert for relative error calc
1 parent 8b762a5 commit de7a467

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/check_fuzzy_intersection.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ using PyCall
33
pyimport_conda("llvmlite", "llvmlite==0.33", "numba") # to try to avoid segfaults by getting Numba with LLVM 9 instead of 10
44
const py_umap = pyimport_conda("umap", "umap-learn")
55

6+
# https://github.com/JuliaPy/PyCall.jl/issues/204#issuecomment-192333326
67
PyCall.PyObject(S::SparseMatrixCSC) =
78
pyimport("scipy.sparse")["csc_matrix"]((S.nzval, S.rowval .- 1, S.colptr .- 1), shape=size(S))
89

9-
Base.convert(::Type{SparseMatrixCSC}, o::PyObject) =
10-
SparseMatrixCSC(o.m, o.n, o.indptr .+ 1, p.indices .+ 1, o.data)
1110

1211

1312
g1 = sprand(5000,5000,0.01)

0 commit comments

Comments
 (0)