@@ -138,10 +138,8 @@ def column_from_1d_array(array: Any, *, name: str = "") -> Column:
138138 See `dataframe_from_2d_array` for related 2D function.
139139
140140 Only Array-API-compliant 1D arrays are supported.
141- Cross-kind casting is undefined and may vary across implementations.
142- Downcasting is disallowed.
143141
144- The resulting column will have the dtype to the
142+ The resulting column will have the dtype corresponding to the
145143 Array API one:
146144
147145 - 'bool' -> Bool()
@@ -170,22 +168,34 @@ def column_from_1d_array(array: Any, *, name: str = "") -> Column:
170168 ...
171169
172170
173- def dataframe_from_2d_array (array : Any , * , schema : dict [str , DType ]) -> DataFrame :
171+ def dataframe_from_2d_array (array : Any , * , names : Sequence [str ]) -> DataFrame :
174172 """Construct DataFrame from 2D array.
175173
176174 See `column_from_1d_array` for related 1D function.
177175
178176 Only Array-API-compliant 2D arrays are supported.
179- Cross-kind casting is undefined and may vary across implementations.
180- Downcasting is disallowed.
177+
178+ The resulting columns will have the dtype corresponding to the
179+ Array API one:
180+
181+ - 'bool' -> Bool()
182+ - 'int8' -> Int8()
183+ - 'int16' -> Int16()
184+ - 'int32' -> Int32()
185+ - 'int64' -> Int64()
186+ - 'uint8' -> UInt8()
187+ - 'uint16' -> UInt16()
188+ - 'uint32' -> UInt32()
189+ - 'uint64' -> UInt64()
190+ - 'float32' -> Float32()
191+ - 'float64' -> Float64()
181192
182193 Parameters
183194 ----------
184195 array : array
185196 array-API compliant 2D array
186- dtypes : Mapping[str, DType]
187- Dtype of each column. Must be the same length as ``array.shape[1]``.
188- Keys determine column names.
197+ names : Sequence[str]
198+ Names to give columns.
189199
190200 Returns
191201 -------
0 commit comments