Skip to content

Commit a1e8d74

Browse files
committed
remove warnings
1 parent 237c964 commit a1e8d74

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pandas/core/arrays/integer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ def _coerce_to_ndarray(self):
334334

335335
# TODO(jreback) make this better
336336
data = self._data.astype(object)
337-
data[self._mask] = self._na_value
337+
mask = np.array(self._mask, copy=False)
338+
data[mask] = self._na_value
338339
return data
339340

340341
__array_priority__ = 1000 # higher than ndarray so ops dispatch to us
@@ -563,6 +564,7 @@ def cmp_method(self, other):
563564
else:
564565
mask = self._mask | mask
565566

567+
mask = np.array(mask, copy=False)
566568
result[mask] = op_name == 'ne'
567569
return result
568570

pandas/tests/arrays/mask/test_pyarrow_bool.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
import pytest
33

44
import pandas as pd
5-
from pandas.core.arrays.mask._pyarrow import ( # isort:skip
6-
ArrowBoolArray, ArrowBoolDtype)
75
from pandas.tests.extension import base
86
import pandas.util.testing as tm
97

108
pytest.importorskip('pyarrow', minversion="0.10.0")
119

10+
from pandas.core.arrays.mask._pyarrow import ( # isort:skip
11+
ArrowBoolArray, ArrowBoolDtype)
12+
1213

1314
@pytest.fixture
1415
def dtype():

0 commit comments

Comments
 (0)