Skip to content

create.density.df: honor the n argument - #4282

Draft
madhavzanwar wants to merge 1 commit into
PecanProject:developfrom
madhavzanwar:GH-4279-create-density-df-ignores-n
Draft

madhavzanwar wants to merge 1 commit into
PecanProject:developfrom
madhavzanwar:GH-4279-create-density-df-ignores-n

Conversation

@madhavzanwar

Copy link
Copy Markdown
Contributor

Description

create.density.df() documented n as the number of points but never used it: the two samps branches hard-coded n = 1000 and the distribution branch relied on the pr.dens() default. n is now passed through in all three places. The default (n = 1000) is unchanged, so existing callers (plots.R uses the default) behave as before.

Adds a test with n = 50 for samples, zero-bounded samples (50 + the extra point at 0) and a named distribution; it fails on develop and passes with the fix. Adds NEWS.md and CHANGELOG.md entries.

Motivation and Context

Fixes #4279

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create.density.df() ignores its n argument

1 participant