Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving function quantity_allclose #7235 #7252

Merged
merged 12 commits into from
Apr 16, 2018
9 changes: 2 additions & 7 deletions astropy/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
except ImportError:
pass

from ..units import allclose as _quantity_allclose # noqa
from ..units import allclose as _quantity_allclose
from ..utils.exceptions import (AstropyDeprecationWarning,
AstropyPendingDeprecationWarning)

Expand Down Expand Up @@ -459,12 +459,7 @@ def assert_quantity_allclose(actual, desired, rtol=1.e-7, atol=None,
This is a :class:`~astropy.units.Quantity`-aware version of
:func:`numpy.testing.assert_allclose`.
"""
import numpy as np
from astropy.units.quantity import _unquantify_allclose_arguments

np.testing.assert_allclose(*_unquantify_allclose_arguments(actual, desired,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this line, which was reinstated because of a comment by @mhvk got deleted again in the sphinx fixes. @pllim can we put this back in your second PR, to fix @cdeil's problem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops. I only saw Tom's comment. Sorry. I'll fix this shortly.

rtol, atol),
**kwargs)
assert _quantity_allclose(actual, desired, rtol=rtol, atol=atol, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astrofrog , like this, correct?


# TODO: This is a workaround to preserve API compatibility for the bugfix
def quantity_allclose(*args, **kwargs):
Expand Down