rok commented on a change in pull request #9841:
URL: https://github.com/apache/arrow/pull/9841#discussion_r605329916



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -233,6 +235,41 @@ struct DivideChecked {
   }
 };
 
+struct Exponentiate {
+  template <typename T, typename Arg0, typename Arg1>
+  static enable_if_integer<T> Call(KernelContext* ctx, Arg0 left, Arg1 right) {
+    if (left == 0 && (-INFINITY < right && right < 0)) {
+      ctx->SetStatus(Status::Invalid("divide by zero"));

Review comment:
       I'll make these match numpy.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to