Skip to content

Commit

Permalink
Merge pull request statsmodels#1895 from josef-pkt/BUG_multicomp_pand…
Browse files Browse the repository at this point in the history
…as_1890

Bug multicomp pandas asarray
  • Loading branch information
josef-pkt committed Aug 16, 2014
2 parents 287d7d6 + c8bde0f commit f1eee6b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion statsmodels/sandbox/stats/multicomp.py
Expand Up @@ -784,7 +784,7 @@ class MultiComparison(object):

def __init__(self, data, groups, group_order=None):
self.data = np.asarray(data)
self.groups = np.asarray(groups)
self.groups = groups = np.asarray(groups)

# Allow for user-provided sorting of groups
if group_order is None:
Expand Down
12 changes: 12 additions & 0 deletions statsmodels/stats/tests/test_pairwise.py
Expand Up @@ -227,6 +227,18 @@ def test_table_names_custom_group_order(self):
assert_((first_group, second_group) == expected_order[i - 1])


class TestTuckeyHSD2Pandas(TestTuckeyHSD2):

@classmethod
def setup_class(self):
super(TestTuckeyHSD2Pandas, self).setup_class()

import pandas
self.endog = pandas.Series(self.endog)
# we are working with bytes on python 3, not with strings in this case
self.groups = pandas.Series(self.groups, dtype=object)


class TestTuckeyHSD2s(CheckTuckeyHSDMixin):
@classmethod
def setup_class(self):
Expand Down

0 comments on commit f1eee6b

Please sign in to comment.