Skip to content

Commit 5cfb0f8

Browse files
fix numpy test setup
1 parent f76bbc8 commit 5cfb0f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/tests/extension/test_numpy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ def allow_in_pandas(monkeypatch):
7777
@pytest.fixture
7878
def data(allow_in_pandas, dtype):
7979
if dtype.numpy_dtype == "object":
80-
return pd.Series([(i,) for i in range(100)])._values
81-
return NumpyExtensionArray(np.arange(1, 101, dtype=dtype._dtype))
80+
arr = pd.Series([(i,) for i in range(100)])._values
81+
else:
82+
arr = np.arange(1, 101, dtype=dtype._dtype)
83+
return NumpyExtensionArray(arr)
8284

8385

8486
@pytest.fixture

0 commit comments

Comments
 (0)