Skip to content

Commit d482c34

Browse files
authored
Merge pull request #548 from bashtage/future-pandas
MAINT: Update for future changes in pandas
2 parents 26064e7 + 6acd537 commit d482c34

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

linearmodels/tests/panel/test_between_ols.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def test_2way_cluster(data):
274274
clusters.loc[:, :] = 0
275275
clusters = clusters.astype(np.int32)
276276
for entity in mod.dependent.entities:
277-
clusters.loc[entity, :] = np.random.randint(33, size=(1, 2))
277+
locations = np.random.randint(33, size=(1, 2))
278+
clusters.loc[entity] = locations.astype(clusters.dtypes.iloc[0])
278279

279280
res = mod.fit(cov_type="clustered", clusters=clusters, debiased=False)
280281

linearmodels/tests/panel/test_panel_ols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ def test_repeated_measures_weight():
13761376
res = mod.fit()
13771377
mod = PanelOLS.from_formula("y ~ x + EntityEffects + TimeEffects", df)
13781378
res_un = mod.fit()
1379-
assert res.params[0] != res_un.params[0]
1379+
assert res.params.iloc[0] != res_un.params.iloc[0]
13801380

13811381

13821382
def test_absorbed(absorbed_data):

0 commit comments

Comments
 (0)