Skip to content

Commit

Permalink
Merge pull request #665 from 14NGiestas/rvs_normal-issue
Browse files Browse the repository at this point in the history
Fixes issue with `rvs_normal` where it lacks the elemental property
  • Loading branch information
jvdp1 authored Jul 7, 2022
2 parents 78a680a + d4c72ee commit f98f3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/specs/stdlib_stats_distribution_normal.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ Note: the algorithm used for generating normal random variates is fundamentally

### Class

Function
Elemental function (passing both `loc` and `scale`).

### Arguments

`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`.

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

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

`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`.

`loc` and `scale` arguments must be of the same type.

### Return value
Expand Down
2 changes: 2 additions & 0 deletions src/stdlib_stats_distribution_normal.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ contains
#:for k1, t1 in REAL_KINDS_TYPES
impure elemental &
function rvs_norm_${t1[0]}$${k1}$(loc, scale) result(res)
!
! Normal random variate (loc, scale)
Expand All @@ -178,6 +179,7 @@ contains
#:for k1, t1 in CMPLX_KINDS_TYPES
impure elemental &
function rvs_norm_${t1[0]}$${k1}$(loc, scale) result(res)
!
! Normally distributed complex. The real part and imaginary part are &
Expand Down

0 comments on commit f98f3d3

Please sign in to comment.