Skip to content

Commit 6b58521

Browse files
authored
Merge pull request certik#40 from dhermes/explicit-shape-elemental
Using explicit shape for output when shape of input known.
2 parents 667298d + f6f573e commit 6b58521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/best-practices.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Or one can use `explicit-shape` arrays as follows::
418418
function nroot(n, k, x) result(y)
419419
integer, intent(in) :: n, k
420420
real(dp), intent(in) :: x(k)
421-
real(dp) :: y(size(x))
421+
real(dp) :: y(k)
422422
y = x**(1._dp / n)
423423
end function
424424

0 commit comments

Comments
 (0)