Skip to content

Fix plot error when effect size is 0 - #30

Merged
josesho merged 1 commit into
ACCLAB:v0.2.2from
MasonM:fix-unboundlocalerror
Apr 3, 2019
Merged

Fix plot error when effect size is 0#30
josesho merged 1 commit into
ACCLAB:v0.2.2from
MasonM:fix-unboundlocalerror

Conversation

@MasonM

@MasonM MasonM commented Apr 2, 2019

Copy link
Copy Markdown
Contributor

First off, thank you for providing this library! It's very well-designed.

This fixes the following error when running the plotter with a data set that has an effect size of exactly 0 and a type of "median_diff" or "mean_diff":

UnboundLocalError: local variable 'rightmin' referenced before assignment

Reproduction code (I could turn this into a test, but I'm not sure it's worth it):

import pandas as pd
import dabest

df = pd.DataFrame({"one": range(1, 10), "two": range(1, 10)})
dabest.load(df, idx=("one", "two")).median_diff.plot()

This fixes the following error when running the plotter with a data set
that has an effect size of exactly 0 and a type of "median_diff" or "mean_diff":

    UnboundLocalError: local variable 'rightmin' referenced before assignment
@josesho josesho added the bug label Apr 3, 2019
@josesho josesho added this to the v0.2.2 milestone Apr 3, 2019
@josesho

josesho commented Apr 3, 2019

Copy link
Copy Markdown
Member

Hi, thanks for this! I will merge it for v0.2.2 very soon.

@josesho
josesho changed the base branch from master to v0.2.2 April 3, 2019 07:13
@josesho
josesho merged commit eda1733 into ACCLAB:v0.2.2 Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants