2626
2727from typing import Any , Literal
2828
29- import numpy as np
30- import pandas as pd
29+ import numpy as np # type: ignore[import-not-found]
30+ import pandas as pd # type: ignore[import-not-found,import-untyped]
3131
3232from pyarrow ._compute import CastOptions
3333from pyarrow ._stubs_typing import (
@@ -56,8 +56,7 @@ from .types import BaseExtensionType, DataType, Field, StructType
5656from pyarrow ._stubs_typing import NullableCollection
5757
5858def array (
59- values : NullableCollection
60- | Iterable [Any ]
59+ values : Iterable [Any ]
6160 | SupportsArrowArray
6261 | SupportsArrowDeviceArray
6362 | SupportsPyArrowArray ,
@@ -69,10 +68,7 @@ def array(
6968 memory_pool : MemoryPool | None = None ,
7069) -> ArrayLike : ...
7170def asarray (
72- values : NullableCollection
73- | Iterable [Any ]
74- | SupportsArrowArray
75- | SupportsArrowDeviceArray ,
71+ values : Iterable [Any ] | SupportsArrowArray | SupportsArrowDeviceArray ,
7672 type : Any | None = None ,
7773) -> ArrayLike : ...
7874def nulls (
@@ -238,7 +234,14 @@ class Array(_PandasConvertible):
238234 def __arrow_c_device_array__ (self , requested_schema = None , ** kwargs ) -> Any : ...
239235 @staticmethod
240236 def _import_from_c_device_capsule (schema_capsule , array_capsule ) -> Array : ...
241- def __dlpack__ (self , stream : int | None = None ) -> Any : ...
237+ def __dlpack__ (
238+ self ,
239+ * ,
240+ stream : int | None = None ,
241+ max_version : tuple [int , int ] | None = None ,
242+ dl_device : tuple [int , int ] | None = None ,
243+ copy : bool | None = None ,
244+ ) -> Any : ...
242245 def __dlpack_device__ (self ) -> tuple [int , int ]: ...
243246 @property
244247 def device_type (self ) -> DeviceAllocationType : ...
0 commit comments