Skip to content

Commit e9ae6a3

Browse files
to_array_object: type dtype as str, note possibilities (#213)
* use str in to_array_object * keep dtype, but document accepted types * remove namespace * Fix a typo --------- Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
1 parent b03bb4f commit e9ae6a3

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

spec/API_specification/dataframe_api/column_object.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,21 @@ def to_array_object(self, dtype: Any) -> Any:
695695
696696
Parameters
697697
----------
698-
dtype : Any
698+
dtype : DType
699699
The dtype of the array-API-compliant object to return.
700+
Must be one of:
701+
702+
- Bool()
703+
- Int8()
704+
- Int16()
705+
- Int32()
706+
- Int64()
707+
- UInt8()
708+
- UInt16()
709+
- UInt32()
710+
- UInt64()
711+
- Float32()
712+
- Float64()
700713
701714
Returns
702715
-------

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,21 @@ def to_array_object(self, dtype: Any) -> Any:
823823
824824
Parameters
825825
----------
826-
dtype : Any
826+
dtype : DType
827827
The dtype of the array-API-compliant object to return.
828+
Must be one of:
829+
830+
- Bool()
831+
- Int8()
832+
- Int16()
833+
- Int32()
834+
- Int64()
835+
- UInt8()
836+
- UInt16()
837+
- UInt32()
838+
- UInt64()
839+
- Float32()
840+
- Float64()
828841
829842
Returns
830843
-------

0 commit comments

Comments
 (0)