szha commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453140667



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       @xidulu I see. That makes sense. We do have a flag for determining 
whether the output type should follow numpy convention or not. You can find it 
here:
   
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/util.py#L1076-L1092
   
   It would be great if that convention is observed.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to