Skip to content

Commit b01dec1

Browse files
committed
use str in to_array_object
1 parent e60739c commit b01dec1

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

spec/API_specification/dataframe_api/column_object.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,14 +701,26 @@ def fill_null(self: Column[DType], value: Scalar, /) -> Column[DType]:
701701
"""
702702
...
703703

704-
def to_array_object(self, dtype: Any) -> Any:
704+
def to_array_object(self, dtype: str) -> Any:
705705
"""
706706
Convert to array-API-compliant object.
707707
708708
Parameters
709709
----------
710-
dtype : Any
710+
dtype : str
711711
The dtype of the array-API-compliant object to return.
712+
713+
- bool
714+
- int8
715+
- int16
716+
- int32
717+
- int64
718+
- uint8
719+
- uint16
720+
- uint32
721+
- uint64
722+
- float32
723+
- float64
712724
713725
Returns
714726
-------

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,14 +817,26 @@ def fill_null(
817817
"""
818818
...
819819

820-
def to_array_object(self, dtype: Any) -> Any:
820+
def to_array_object(self, dtype: str) -> Any:
821821
"""
822822
Convert to array-API-compliant object.
823823
824824
Parameters
825825
----------
826-
dtype : Any
827-
The dtype of the array-API-compliant object to return.
826+
dtype : str
827+
The dtype of the array-API-compliant object to return:
828+
829+
- bool
830+
- int8
831+
- int16
832+
- int32
833+
- int64
834+
- uint8
835+
- uint16
836+
- uint32
837+
- uint64
838+
- float32
839+
- float64
828840
829841
Returns
830842
-------

0 commit comments

Comments
 (0)