Skip to content

Commit

Permalink
chore: remove junky handling of array inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jan 20, 2024
1 parent 3cddbe7 commit 5f094be
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ibis/expr/types/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,14 +1070,4 @@ def array(values: Iterable[V], type: str | dt.DataType | None = None) -> ArrayVa
│ [3, 42] │
└──────────────────────┘
"""
if any(isinstance(value, Value) for value in values):
return ops.Array(values).to_expr()
else:
try:
return literal(list(values), type=type)
except com.IbisTypeError as e:
raise com.IbisTypeError(
"Could not create an array scalar from the values provided "
"to `array`. Ensure that all input values have the same "
"Python type, or can be casted to a single Python type."
) from e
return ops.Array(values).to_expr()

0 comments on commit 5f094be

Please sign in to comment.