hzfan commented on a change in pull request #17717: [Numpy] FFI: Bincount, 
Percentile/Quantile, All/Any
URL: https://github.com/apache/incubator-mxnet/pull/17717#discussion_r390081161
 
 

 ##########
 File path: src/operator/numpy/np_percentile_op-inl.h
 ##########
 @@ -65,6 +66,17 @@ struct NumpyPercentileParam : public 
dmlc::Parameter<NumpyPercentileParam> {
     DMLC_DECLARE_FIELD(q_scalar).set_default(dmlc::optional<double>())
       .describe("inqut q is a scalar");
   }
+  void SetAttrDict(std::unordered_map<std::string, std::string>* dict) {
+    std::ostringstream axis_s, interpolation_s, keepdims_s, q_scalar_s;
+    axis_s << axis;
+    interpolation_s << interpolation;
+    keepdims_s << keepdims;
+    q_scalar_s << q_scalar;
+    (*dict)["axis"] = axis_s.str();
+    (*dict)["interpolation"] = interpolation_s.str();
 
 Review comment:
   Similar to `String2MXNetPercentileType`, we have to 
`MXNetPercentileType2String` here. It can be added in 
`incubator-mxnet/src/api/operator/op_utils.cc`.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to