Skip to content

MAINT: QMCEngine d input validation#13940

Merged
mdhaber merged 2 commits intoscipy:masterfrom
tupui:qmc_dim_val
Apr 27, 2021
Merged

MAINT: QMCEngine d input validation#13940
mdhaber merged 2 commits intoscipy:masterfrom
tupui:qmc_dim_val

Conversation

@tupui
Copy link
Copy Markdown
Member

@tupui tupui commented Apr 26, 2021

As pointed out in #13319, d is not checked when instantiating QMCEngine.

@tupui tupui added scipy.stats maintenance Items related to regular maintenance tasks labels Apr 26, 2021
@tupui tupui added this to the 1.7.0 milestone Apr 26, 2021
@tupui tupui requested a review from mdhaber April 26, 2021 14:09
Comment thread scipy/stats/_qmc.py
with pytest.raises(ValueError, match=r"Maximum supported "
r"dimensionality"):
qmc.Sobol(qmc.Sobol.MAXDIM + 1)
qmc.Sobol(qmc.Sobol.MAXDIM + 1, seed=seed)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated, right? (That's ok, since this PR is so simple - just checking.)

Copy link
Copy Markdown
Member Author

@tupui tupui Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not needed before as the init happened before this validation. Now that super is called first, it's needed (for the case np < 1.17)

Comment thread scipy/stats/_qmc.py Outdated
Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
@mdhaber
Copy link
Copy Markdown
Contributor

mdhaber commented Apr 27, 2021

LGTM thanks @tupui!

@mdhaber mdhaber merged commit 7cfd126 into scipy:master Apr 27, 2021
@tupui tupui deleted the qmc_dim_val branch April 27, 2021 06:06
@tupui
Copy link
Copy Markdown
Member Author

tupui commented Apr 27, 2021

Thanks for the quick review Matt.

patnr added a commit to patnr/scipy that referenced this pull request May 3, 2021
* master: (164 commits)
  DOC: Add Karl Pearson's reference to chi-square test (scipy#13971)
  BLD: fix build warnings for causal/anticausal pointers in ndimage
  MAINT: stats: Fix unused imports and a few other issues related to imports.
  DOC: fix typo
  MAINT: Remove duplicate calculations in sokalmichener
  BUG: spatial: fix weight handling of `distance.sokalmichener`.
  DOC: update Readme (scipy#13910)
  MAINT: QMCEngine d input validation (scipy#13940)
  MAINT: forward port 1.6.3 relnotes
  REL: add PEP 621 (project metadata in pyproject.toml) support
  EHN: signal: make `get_window` supports `general_cosine` and `general_hamming` window functions. (scipy#13934)
  ENH/DOC: pydata sphinx theme polishing (scipy#13814)
  DOC/MAINT: Add copyright notice to qmc.primes_from_2_to (scipy#13927)
  BUG: DOC: signal: fix need argument config and add missing doc link for `signal.get_window`
  DOC: fix subsets docstring (scipy#13926)
  BUG: signal: fix get_window argument handling and add tests. (scipy#13879)
  ENH: stats: add 'alternative' parameter to ansari (scipy#13650)
  BUG: Reactivate conda environment in init
  MAINT: use dict built-in rather than OrderedDict
  Revert "CI: Add nightly release of NumPy in linux workflows (scipy#13876)" (scipy#13909)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Items related to regular maintenance tasks scipy.stats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants