-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy patharrays.pyi
More file actions
141 lines (110 loc) · 3.13 KB
/
Copy patharrays.pyi
File metadata and controls
141 lines (110 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright the Vortex contributors
from typing import final
import numpy as np
import pandas as pd
import polars as pl
import pyarrow as pa
from .dtype import DType, PType
from .expr import Expr
from .scalar import Scalar, ScalarPyType
from .serde import ArrayContext
class Array:
def __lt__(self, other: Array) -> Array: ...
def __le__(self, other: Array) -> Array: ...
def __gt__(self, other: Array) -> Array: ...
def __ge__(self, other: Array) -> Array: ...
def __len__(self) -> int: ...
@staticmethod
def from_arrow(
obj: pa.Array[pa.Scalar[pa.DataType]] | pa.ChunkedArray[pa.Scalar[pa.DataType]] | pa.Table,
) -> Array: ...
@staticmethod
def from_range(obj: range, *, dtype: DType | None = None) -> Array: ...
def to_arrow_array(self) -> pa.Array[pa.Scalar[pa.DataType]]: ...
@property
def id(self) -> str: ...
@property
def nbytes(self) -> int: ...
@property
def dtype(self) -> DType: ...
def filter(self, mask: Array) -> Array: ...
def scalar_at(self, index: int) -> Scalar: ...
def take(self, indices: Array) -> Array: ...
def slice(self, start: int, end: int) -> Array: ...
def display_tree(self) -> str: ...
def to_arrow_table(self) -> pa.Table: ...
def to_numpy(self, *, zero_copy_only: bool = True) -> np.ndarray: ...
def to_pandas(self) -> pd.DataFrame: ...
def to_polars_dataframe(self) -> pl.DataFrame: ...
def to_polars_series(self) -> pl.Series: ...
def to_pylist(self) -> list[ScalarPyType]: ...
def serialize(self, ctx: ArrayContext) -> bytes: ...
def apply(self, expr: Expr) -> Array: ...
class NativeArray(Array): ...
class PythonArray(Array):
def __init__(self, len: int, dtype: DType) -> None: ...
@final
class NullArray(Array): ...
@final
class BoolArray(Array): ...
@final
class PrimitiveArray(Array):
@property
def ptype(self) -> PType: ...
@final
class DecimalArray(Array):
@property
def precision(self) -> int: ...
@property
def scale(self) -> int: ...
@final
class VarBinArray(Array): ...
@final
class VarBinViewArray(Array): ...
@final
class StructArray(Array):
def field(self, name: str) -> Array: ...
def names(self) -> list[str]: ...
@final
class ListArray(Array): ...
@final
class FixedSizeListArray(Array): ...
@final
class ExtensionArray(Array): ...
@final
class ConstantArray(Array):
def scalar(self) -> Scalar: ...
@final
class ChunkedArray(Array):
def chunks(self) -> list[Array]: ...
@final
class ByteBoolArray(Array): ...
@final
class SequenceArray(Array): ...
@final
class SparseArray(Array): ...
@final
class AlpArray(Array): ...
@final
class AlpRdArray(Array): ...
@final
class DateTimePartsArray(Array): ...
@final
class DictArray(Array): ...
@final
class FsstArray(Array): ...
@final
class RunEndArray(Array): ...
@final
class ZigZagArray(Array):
@staticmethod
def encode(array: Array) -> Array: ...
@final
class FastLanesBitPackedArray(Array):
@property
def bit_width(self) -> int: ...
@final
class FastLanesDeltaArray(Array): ...
@final
class FastLanesFoRArray(Array): ...