I managed to isolate the problem with the help of your comments. Within one of my self-written modules I had a function of this form
function identity(dim::Int64)::Matrix{Float64}
# something
end
and managed to overwrite it with accidentally with Base.identity at another place in the code. That’s why it was comparing matrices in the end…
Thank you for your help and dealing with my stupidity
![]()