Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix column_arrays for array manager #45001

Merged
merged 6 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pandas/core/internals/array_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,8 @@ def column_arrays(self) -> list[ArrayLike]:
"""
Used in the JSON C code to access column arrays.
"""
return self.arrays

return [np.asarray(arr) for arr in self.arrays]

def iset(
self, loc: int | slice | np.ndarray, value: ArrayLike, inplace: bool = False
Expand Down
12 changes: 3 additions & 9 deletions pandas/tests/io/json/test_json_table_schema_ext_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ def setup_method(self, method):
}
)

def test_build_date_series(self, using_array_manager):
if using_array_manager:
pytest.skip("Segfault for array manager GH44994")
def test_build_date_series(self):

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

assert result == expected

def test_build_decimal_series(self, using_array_manager):
if using_array_manager:
pytest.skip("Segfault for array manager GH44994")
def test_build_decimal_series(self):

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

assert result == expected

def test_to_json(self, using_array_manager):
if using_array_manager:
pytest.skip("Segfault for array manager GH44994")
def test_to_json(self):

df = self.df.copy()
df.index.name = "idx"
Expand Down