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
ARROW-16865: [C++][Python] Implement cumulative product, max, and min compute functions #13412
Conversation
|
Thanks for doing this. Will you add unit tests and update related documents? |
You may consider converting it to draft if this PR is not ready for review now. |
static constexpr char const kTypeName[] = "CumulativeMinOptions"; | ||
static CumulativeMinOptions Defaults() { return CumulativeMinOptions(); } | ||
|
||
const bool is_minmax = true; |
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.
nit: it might be more idiomatic to have this as constexpr static bool
, then below use if (OptionsType::is_minmax)
arr, start=strt, skip_nulls=skip_nulls) | ||
# Add `start` offset to expected array before comparing | ||
expected = pc.multiply(expected_arrays[i], strt) | ||
np.testing.assert_array_almost_equal(result.to_numpy( |
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.
Are we converting to NumPy here because Arrow doesn't have an approx equals?
Closing because it has been untouched for a while, in case it's still relevant feel free to reopen and move it forward 👍 |
Creating new compute functions to perform cumulative product, max, and min on a given array.