Skip to content

Commit f98f3d3

Browse files
authored
Merge pull request #665 from 14NGiestas/rvs_normal-issue
Fixes issue with `rvs_normal` where it lacks the elemental property
2 parents 78a680a + d4c72ee commit f98f3d3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/specs/stdlib_stats_distribution_normal.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ Note: the algorithm used for generating normal random variates is fundamentally
3030

3131
### Class
3232

33-
Function
33+
Elemental function (passing both `loc` and `scale`).
3434

3535
### Arguments
3636

37-
`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`.
38-
3937
`loc`: optional argument has `intent(in)` and is a scalar of type `real` or `complex`.
4038

4139
`scale`: optional argument has `intent(in)` and is a scalar of type `real` or `complex`.
4240

41+
`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`.
42+
4343
`loc` and `scale` arguments must be of the same type.
4444

4545
### Return value

src/stdlib_stats_distribution_normal.fypp

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ contains
160160

161161

162162
#:for k1, t1 in REAL_KINDS_TYPES
163+
impure elemental &
163164
function rvs_norm_${t1[0]}$${k1}$(loc, scale) result(res)
164165
!
165166
! Normal random variate (loc, scale)
@@ -178,6 +179,7 @@ contains
178179

179180

180181
#:for k1, t1 in CMPLX_KINDS_TYPES
182+
impure elemental &
181183
function rvs_norm_${t1[0]}$${k1}$(loc, scale) result(res)
182184
!
183185
! Normally distributed complex. The real part and imaginary part are &

0 commit comments

Comments
 (0)