Skip to content

Commit e4c7289

Browse files
committed
jsonarray
1 parent d204b83 commit e4c7289

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pandas/tests/extension/json/array.py

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ def __setitem__(self, key, value):
113113
def __len__(self) -> int:
114114
return len(self.data)
115115

116+
def __array__(self, dtype=None):
117+
if dtype is None:
118+
dtype = object
119+
return np.asarray(self.data, dtype=dtype)
120+
116121
@property
117122
def nbytes(self) -> int:
118123
return sys.getsizeof(self.data)

pandas/tests/extension/json/test_json.py

-4
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ def test_unstack(self, data, index):
163163
# this matches otherwise
164164
return super().test_unstack(data, index)
165165

166-
@pytest.mark.xfail(reason="Inconsistent sizes.")
167-
def test_transpose(self, data):
168-
super().test_transpose(data)
169-
170166

171167
class TestGetitem(BaseJSON, base.BaseGetitemTests):
172168
pass

0 commit comments

Comments
 (0)