Skip to content

Commit

Permalink
support build array with list of scalar (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
zen-xu authored Sep 4, 2024
1 parent 343f221 commit 055ea6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pyarrow-stubs/__lib_pxi/array.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mypy: disable-error-code="overload-overlap,misc"
# mypy: disable-error-code="overload-overlap,misc,type-arg"

import datetime as dt

Expand Down Expand Up @@ -173,6 +173,16 @@ def array(
memory_pool: MemoryPool | None = None,
) -> ListArray: ...
@overload
def array(
values: NullableIterable[_Scalar_CoT],
type: None = None,
mask: Mask | None = None,
size: int | None = None,
from_pandas: bool | None = None,
safe: bool = True,
memory_pool: MemoryPool | None = None,
) -> Array[_Scalar_CoT]: ...
@overload
def array(
values: Iterable | SupportArrowArray | SupportArrowDeviceArray,
type: _DataTypeT,
Expand Down
5 changes: 5 additions & 0 deletions pyarrow-stubs/__lib_pxi/table.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ def chunked_array(
type: None = None,
) -> ChunkedArray[scalar.ListScalar]: ...
@overload
def chunked_array(
values: NullableIterable[_Scalar_CoT],
type: None = None,
) -> ChunkedArray[_Scalar_CoT]: ...
@overload
def chunked_array(
values: Iterable | SupportArrowStream | SupportArrowArray,
type: _DataTypeT,
Expand Down

0 comments on commit 055ea6d

Please sign in to comment.