This happened after some time with one of bigger libraries, presumably hitting large cluster.
The idea is to use sparse array with zeros in lower triangle and Float32, code below works just fine
using SparseArrays
using LinearAlgebra
using Clustering
dist = spzeros(Float32, 10, 10)
for i in 1:10
for j in i+1:1
dist[i, j] = 1
end
end
sdist = LinearAlgebra.Symmetric(dist)
hclusters = hclust(sdist, linkage=:single)
The Symmetric wrapper from LinearAlgebra is to return upper values when accessing bottom triangle.
Stack trace is
This happened after some time with one of bigger libraries, presumably hitting large cluster.
The idea is to use sparse array with zeros in lower triangle and Float32, code below works just fine
The
Symmetric
wrapper from LinearAlgebra is to return upper values when accessing bottom triangle.