Skip to content

Commit

Permalink
Revert lax_numpy.asclose() behavior to work with lists again. (google…
Browse files Browse the repository at this point in the history
…#2059)

This should be revisited to fix the issue originally addressed in google#2051.
  • Loading branch information
skye committed Jan 24, 2020
1 parent b6dfb8b commit 9aba39e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jax/numpy/lax_numpy.py
Expand Up @@ -314,12 +314,12 @@ def update_numpydoc(docstr, fun, op):

def _wraps(fun, update_doc=True, lax_description=""):
"""Like functools.wraps but works with numpy.ufuncs.
It is important that when wrapping numpy functions the parameters names
It is important that when wrapping numpy functions the parameters names
in the original function and in the JAX version are the same
Parameters:
fun: The function being wrapped
update_doc: whether to transform the numpy docstring to remove references of
parameters that are supported by the numpy version but not the JAX version.
parameters that are supported by the numpy version but not the JAX version.
If False, include the numpy docstring verbatim.
"""
def wrap(op):
Expand Down Expand Up @@ -1021,7 +1021,7 @@ def moveaxis(a, source, destination):

@_wraps(onp.isclose)
def isclose(a, b, rtol=1e-05, atol=1e-08):
a, b = _promote_args("isclose", a, b)
a, b = _promote_args("isclose", asarray(a), asarray(b))
dtype = _dtype(a)
if issubdtype(dtype, inexact):
if issubdtype(dtype, complexfloating):
Expand Down

0 comments on commit 9aba39e

Please sign in to comment.