-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(datatypes): ensure that array construction supports literals and infers their shape from its inputs #8049
fix(datatypes): ensure that array construction supports literals and infers their shape from its inputs #8049
Conversation
5f094be
to
8644eaa
Compare
if isinstance(v, dd.Series): | ||
return v | ||
else: | ||
return dd.from_pandas(pd.Series([v] * length), npartitions=n_partitions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also worth double checking me here, I'm not familiar with dask, so I was mostly just trying to make this not crash, but I'm not sure if setting n_partitions this way makes sense/is the most performant.
BREAKING CHANGE: The `type` argument is removed from `ibis.array`. Ibis will attempt to infer the type of your input as it did before. If you need a specific type, cast the return value of `ibis.array` to a specific array type.
pd.concat and dd.concat can only handle array-likes. If we are given a scalar, we need to convert it to the appropriate Series type.
4ccbb15
to
b9f9bbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
We were previously returning
ArrayColumn
fromibis.array
when any inputs were expressions regardless of their shape. This PR renamesArrayColumn
->Array
and uses the input arguments shapes to determine the output array shape.Fixes #8022.