Skip to content

Commit 2549839

Browse files
committed
cholesky: allocatable -> assumed-shape return value
1 parent 531aba7 commit 2549839

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/stdlib_linalg.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module stdlib_linalg
7474
!> [optional] should the unused half of the return matrix be zeroed out? Default: yes
7575
logical(lk), optional, intent(in) :: other_zeroed
7676
!> Output matrix with Cholesky factors c[n,n]
77-
${rt}$, allocatable :: c(:,:)
77+
${rt}$ :: c(size(a,1),size(a,2))
7878
end function stdlib_linalg_${ri}$_cholesky_fun
7979
#:endfor
8080
end interface chol

src/stdlib_linalg_cholesky.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ submodule (stdlib_linalg) stdlib_linalg_cholesky
158158
!> [optional] should the unused half of the return matrix be zeroed out? Default: yes
159159
logical(lk), optional, intent(in) :: other_zeroed
160160

161-
allocate(c,source=a)
161+
c = a
162162

163163
call stdlib_linalg_${ri}$_cholesky_inplace(c,lower,other_zeroed)
164164

0 commit comments

Comments
 (0)