Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

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

@DNXie

Description

@DNXie

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions