File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 15
15
- checkout
16
16
- run : .circleci/setup_env.sh
17
17
- run : |
18
- sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
19
18
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH \
20
19
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD \
21
20
ci/run_tests.sh
Original file line number Diff line number Diff line change @@ -1606,7 +1606,10 @@ def construct_1d_object_array_from_listlike(values: Collection) -> np.ndarray:
1606
1606
"""
1607
1607
# numpy will try to interpret nested lists as further dimensions in np.array(),
1608
1608
# hence explicitly making a 1D array using np.fromiter
1609
- return np .fromiter (values , dtype = "object" , count = len (values ))
1609
+ result = np .empty (len (values ), dtype = "object" )
1610
+ for i , obj in enumerate (values ):
1611
+ result [i ] = obj
1612
+ return result
1610
1613
1611
1614
1612
1615
def maybe_cast_to_integer_array (arr : list | np .ndarray , dtype : np .dtype ) -> np .ndarray :
Original file line number Diff line number Diff line change @@ -1637,7 +1637,7 @@ def test_from_arrow_respecting_given_dtype():
1637
1637
1638
1638
def test_from_arrow_respecting_given_dtype_unsafe ():
1639
1639
array = pa .array ([1.5 , 2.5 ], type = pa .float64 ())
1640
- with pytest . raises (pa .ArrowInvalid , match = "Float value 1.5 was truncated" ):
1640
+ with tm . external_error_raised (pa .ArrowInvalid ):
1641
1641
array .to_pandas (types_mapper = {pa .float64 (): ArrowDtype (pa .int64 ())}.get )
1642
1642
1643
1643
Original file line number Diff line number Diff line change 5
5
6
6
from pandas ._config import using_string_dtype
7
7
8
+ from pandas .compat import HAS_PYARROW
9
+
8
10
from pandas import (
9
11
DataFrame ,
10
12
date_range ,
@@ -168,7 +170,9 @@ def test_excel_options(fsspectest):
168
170
assert fsspectest .test [0 ] == "read"
169
171
170
172
171
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string) fastparquet" )
173
+ @pytest .mark .xfail (
174
+ using_string_dtype () and HAS_PYARROW , reason = "TODO(infer_string) fastparquet"
175
+ )
172
176
def test_to_parquet_new_file (cleared_fs , df1 ):
173
177
"""Regression test for writing to a not-yet-existent GCS Parquet file."""
174
178
pytest .importorskip ("fastparquet" )
Original file line number Diff line number Diff line change 7
7
import numpy as np
8
8
import pytest
9
9
10
- from pandas ._config import using_string_dtype
11
-
12
10
from pandas .compat .pyarrow import pa_version_under17p0
13
11
14
12
from pandas import (
@@ -196,7 +194,6 @@ def test_to_csv_compression_encoding_gcs(
196
194
tm .assert_frame_equal (df , read_df )
197
195
198
196
199
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string) fastparquet" )
200
197
def test_to_parquet_gcs_new_file (monkeypatch , tmpdir ):
201
198
"""Regression test for writing to a not-yet-existent GCS Parquet file."""
202
199
pytest .importorskip ("fastparquet" )
You can’t perform that action at this time.
0 commit comments