Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with rvs_normal where it lacks the elemental property #665

Merged
merged 3 commits into from Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/specs/stdlib_stats_distribution_normal.md
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
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