apache/mxnet

Documentaion bug: mxnet.test_utils.assert_almost_equal_with_err doesn't accept threshold as an input

Open

#18,999 创建于 2020年8月24日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)C++ (20,808 star) (6,711 fork)batch import
BugUnclear Error/Docgood first issue

描述

Description

This is a documentation bug. The Parameter section of the documentation of mxnet.test_utils.assert_almost_equal_with_err stated the parameter threshold. But it is not in the siganture and not accepted by the API, and passing it throws exception.

image

Link to the doc: https://mxnet.apache.org/versions/1.6/api/python/docs/api/mxnet/test_utils/index.html#mxnet.test_utils.assert_almost_equal_with_err

Error Message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: assert_almost_equal_with_err() got an unexpected keyword argument 'threshold'

To Reproduce

import mxnet
import numpy as np
a = np.ndarray(shape=(2,2), dtype=float)
b = np.ndarray(shape=(2,2), dtype=float)
mxnet.test_utils.assert_almost_equal_with_err(a,b,threshold=None)

Environment

We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:

curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python

# paste outputs here

OS: ubuntu 18.04 Python: 3.7.6 pip: 20.0.2 numpy: 1.18.5 mxnet: 1.6.0

贡献者指南