I am trying to generate a graph G by taking maxof SparseArrays.SparseMatrixCSC{Float64, Int64}
and LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}
But it throws me an error when I do
G = max(A, A’); # undirected version of graph
My original code is:
Pkg.add(“MAT”)
Pkg.build(“MAT”)
Pkg.add(“PyPlot”)
Pkg.build(“PyPlot”)
Pkg.add(“MatrixNetworks”)
Pkg.build(“MatrixNetworks”)
Pkg.add(“PyCall”)
Pkg.build(“PyCall”)
using MatrixNetworks
using MAT
using PyPlot
using PyCall
data = matread(“data/neuronal.mat”);
A = data[“A”];
G = max(A, A’);
It runs fine till A, but throws error at G. Don’t know how to solve it.
I tried import Base: isless but no help.
This is the error:
MethodError: no method matching isless(::LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}, ::SparseArrays.SparseMatrixCSC{Float64, Int64})
Closest candidates are:
isless(::Any, ::Missing) at missing.jl:88
isless(::Missing, ::Any) at missing.jl:87
isless(::Any, ::PyObject) at C:\Users\Manish.julia\packages\PyCall\ygXW2\src\pyoperators.jl:76
…
Stacktrace:
[1] max(x::SparseArrays.SparseMatrixCSC{Float64, Int64}, y::LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}})
@ Base .\operators.jl:480
[2] top-level scope
@ In[29]:1
[3] eval
@ .\boot.jl:368 [inlined]
[4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1428