Skip to content

BUG: fix weightstats quantile for len 1 array - #7047

Closed
brl0 wants to merge 4 commits into
statsmodels:masterfrom
brl0:patch-1
Closed

brl0 wants to merge 4 commits into
statsmodels:masterfrom
brl0:patch-1

Conversation

@brl0

@brl0 brl0 commented Sep 19, 2020

Copy link
Copy Markdown
Contributor
Details

Notes:

  • It is essential that you add a test when making code changes. Tests are not
    needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in master and
    then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can
    verify you changes are well formatted by running
    git diff upstream/master -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows
    using the Windows System for Linux once flake8 is installed in the
    local Linux environment. While passing this test is not required, it is good practice and it help
    improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.

Squeezing a 1D array with only 1 element creates a zero dimensional array/scalar, which then causes an error in quantile because a scalar has no length.
@coveralls

coveralls commented Sep 19, 2020 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 88.356% when pulling 1a10419 on brl0:patch-1 into df1c1a1 on statsmodels:master.

@josef-pkt

Copy link
Copy Markdown
Member

rebased version in #7230 has been merged

@brl0 thanks for the PR and fix

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.

weightstats quantile error with len 1 array

3 participants