Skip to content

Commit 62e8b6c

Browse files
authored
docs(api): deprecate to_array in favor of as_scalar in docstring (#10508)
## Description of changes While reviewing the remaining table expression methods that needed examples, I noticed that [`to_array`](https://ibis-project.org/reference/expression-tables#ibis.expr.types.relations.Table.to_array) did not include the deprecation docstring. The added deprecation note is similar to that of [`dropna`](https://ibis-project.org/reference/expression-tables#ibis.expr.types.relations.Table.dropna) and [`relabel`](https://ibis-project.org/reference/expression-tables#ibis.expr.types.relations.Table.relabel).
1 parent d11a292 commit 62e8b6c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ibis/expr/types/relations.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,13 +1812,8 @@ def difference(self, table: Table, *rest: Table, distinct: bool = True) -> Table
18121812

18131813
@deprecated(as_of="9.0", instead="use table.as_scalar() instead")
18141814
def to_array(self) -> ir.Column:
1815-
"""View a single column table as an array.
1815+
"""Deprecated - use `as_scalar` instead."""
18161816

1817-
Returns
1818-
-------
1819-
Value
1820-
A single column view of a table
1821-
"""
18221817
schema = self.schema()
18231818
if len(schema) != 1:
18241819
raise com.ExpressionError(

0 commit comments

Comments
 (0)