You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using LinearAlgebra
using TensorOperations
functiong(F)
return@tensor F[i, j] * F[i, j]
end
A =rand(7, 7)
g(A)
# => works great
H =Hermitian(A)
g(H)
# => ERROR: MethodError: no method matching Strided.UnsafeStridedView(::Hermitian{Float64,Array{Float64,2}})
A similar error (ERROR: MethodError: no method matching Strided.UnsafeStridedView(::Symmetric{Float64,Array{Float64,2}})) is thrown for Symmetric matrices.
Of course, it works with H.data, which points to the original matrix, but then we are not using any symmetry:
g(H.data)
# => works fine, but that's not the same thing
Hermitian/Symmetric are simple wrappers, basically, and there are some challenges concerning supporting them:
pointer(H)
# => ERROR: conversion to pointer not defined for Hermitian{Float64,Array{Float64,2}}strides(H)
# => ERROR: MethodError: no method matching strides(::Hermitian{Float64,Array{Float64,2}})
How could Hermitian/Symmetric be supported?
The text was updated successfully, but these errors were encountered:
I'm having trouble using
Hermitian
orSymmetric
matrices (defined in the LinearAlgebra package). Here is an MWE:A similar error (
ERROR: MethodError: no method matching Strided.UnsafeStridedView(::Symmetric{Float64,Array{Float64,2}})
) is thrown forSymmetric
matrices.Of course, it works with
H.data
, which points to the original matrix, but then we are not using any symmetry:Hermitian
/Symmetric
are simple wrappers, basically, and there are some challenges concerning supporting them:How could
Hermitian
/Symmetric
be supported?The text was updated successfully, but these errors were encountered: