Skip to content

Commit d379665

Browse files
authored
Merge pull request #164 from lincc-frameworks/ext-array-copy
Speed up `NestedExtensionArray.copy`
2 parents b8707a9 + a3ce966 commit d379665

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nested_pandas/series/ext_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def __setitem__(self, key, value) -> None:
204204
# Copy will happen later in replace_with_mask() anyway
205205
value = self._box_pa_array(value, pa_type=self._pyarrow_dtype)
206206
else:
207-
# Our replace_with_mask implementation doesm't work with scalars
207+
# Our replace_with_mask implementation doesn't work with scalars
208208
value = pa.array([scalar] * pa.compute.sum(pa_mask).as_py())
209209

210210
if argsort is not None:
@@ -387,7 +387,7 @@ def copy(self) -> Self: # type: ignore[name-defined] # noqa: F821
387387
This implementation returns a shallow copy of the extension array,
388388
because the underlying PyArrow array is immutable.
389389
"""
390-
return type(self)(self._chunked_array)
390+
return type(self)(self._chunked_array, validate=False)
391391

392392
def _formatter(self, boxed: bool = False) -> Callable[[Any], str | None]:
393393
# TODO: make formatted strings more pretty

0 commit comments

Comments
 (0)