Skip to content

Commit

Permalink
Merge pull request #9126 from bashtage/more-future-fixes
Browse files Browse the repository at this point in the history
MAINT: Fixes for pre-release testing
  • Loading branch information
bashtage committed Apr 16, 2024
2 parents a0eca86 + a26169f commit 8556aea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions statsmodels/graphics/tests/test_tsaplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,14 @@ def test_plot_quarter(close_figures):
quarter_plot(dta.unemp.values, dates)

# test with a DatetimeIndex with no freq
dta.set_index(pd.DatetimeIndex(dates, freq="QS-OCT"), inplace=True)
from statsmodels.compat.pandas import PD_LT_2_2_0
FREQ = "QS-Oct" if PD_LT_2_2_0 else "QS-OCT"
dta.set_index(pd.DatetimeIndex(dates, freq=FREQ), inplace=True)
quarter_plot(dta.unemp)

# w freq
# see pandas #6631
dta.index = pd.DatetimeIndex(dates, freq="QS-OCT")
dta.index = pd.DatetimeIndex(dates, freq=FREQ)
quarter_plot(dta.unemp)

# w PeriodIndex
Expand Down
2 changes: 1 addition & 1 deletion statsmodels/tools/tests/test_grouputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def test_combine_indices():
return_labels=True)
uv, ux, u, label = combine_indices((group0, group1), prefix='', sep='.',
return_labels=True)
group_joint = np.array(label)[uv.flat]
group_joint = np.array(label)[uv.squeeze()]
group_joint_expected = np.array(['sector1.region0', 'sector0.region1',
'sector0.region0', 'sector0.region1',
'sector1.region1', 'sector0.region0',
Expand Down

0 comments on commit 8556aea

Please sign in to comment.