Skip to content

Commit 61bcdff

Browse files
authored
fix column_arrays for array manager (#45001)
1 parent 5ae855d commit 61bcdff

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

pandas/core/internals/array_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ def column_arrays(self) -> list[ArrayLike]:
794794
"""
795795
Used in the JSON C code to access column arrays.
796796
"""
797-
return self.arrays
797+
798+
return [np.asarray(arr) for arr in self.arrays]
798799

799800
def iset(
800801
self, loc: int | slice | np.ndarray, value: ArrayLike, inplace: bool = False

pandas/tests/io/json/test_json_table_schema_ext_dtype.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ def setup_method(self, method):
131131
}
132132
)
133133

134-
def test_build_date_series(self, using_array_manager):
135-
if using_array_manager:
136-
pytest.skip("Segfault for array manager GH44994")
134+
def test_build_date_series(self):
137135

138136
s = Series(self.da, name="a")
139137
s.index.name = "id"
@@ -159,9 +157,7 @@ def test_build_date_series(self, using_array_manager):
159157

160158
assert result == expected
161159

162-
def test_build_decimal_series(self, using_array_manager):
163-
if using_array_manager:
164-
pytest.skip("Segfault for array manager GH44994")
160+
def test_build_decimal_series(self):
165161

166162
s = Series(self.dc, name="a")
167163
s.index.name = "id"
@@ -237,9 +233,7 @@ def test_build_int64_series(self):
237233

238234
assert result == expected
239235

240-
def test_to_json(self, using_array_manager):
241-
if using_array_manager:
242-
pytest.skip("Segfault for array manager GH44994")
236+
def test_to_json(self):
243237

244238
df = self.df.copy()
245239
df.index.name = "idx"

0 commit comments

Comments
 (0)