yuxihu commented on a change in pull request #13543: Chi_square_check for 
discrete distribution fix
URL: https://github.com/apache/incubator-mxnet/pull/13543#discussion_r238923621
 
 

 ##########
 File path: python/mxnet/test_utils.py
 ##########
 @@ -1915,8 +1915,8 @@ def chi_square_check(generator, buckets, probs, 
nsamples=1000000):
     if continuous_dist:
         sample_bucket_ids = sample_bucket_ids // 2
     obs_freq = np.zeros(shape=len(buckets), dtype=np.int)
-    for i in range(len(buckets)):
-        obs_freq[i] = (sample_bucket_ids == i).sum()
+    for i, _ in enumerate(buckets):
 
 Review comment:
   Looks like you do not need to change this line. You just need i.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to