Skip to content

Commit 58346ff

Browse files
committed
Remove doubled check for squareness
1 parent ed42211 commit 58346ff

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/stdlib_linalg.fypp

+1-5
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,7 @@ contains
291291
pure function is_hermitian_${t1[0]}$${k1}$(A) result(res)
292292
${t1}$, intent(in) :: A(:,:)
293293
logical :: res
294-
if (.not. is_square(A)) then
295-
res = .false.
296-
return !nonsquare matrices cannot be Hermitian
297-
end if
298-
res = is_symmetric(A) !real symmetric matrices are Hermitian
294+
res = is_symmetric(A) !symmetry and Hermiticity are equivalent for real matrices
299295
end function is_hermitian_${t1[0]}$${k1}$
300296
#:endfor
301297
#:for k1, t1 in CMPLX_KINDS_TYPES

0 commit comments

Comments
 (0)