Skip to content

Commit

Permalink
Restore matmul to top-level namespace and add more NumPy overrides (#374
Browse files Browse the repository at this point in the history
)

* add np.not_equal and np.isclose

* add additional numpy overrides

* update docs
  • Loading branch information
rsokl authored Apr 3, 2021
1 parent f91410e commit 97e740f
Show file tree
Hide file tree
Showing 6 changed files with 451 additions and 16 deletions.
44 changes: 44 additions & 0 deletions docs/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,50 @@ This is a record of all past mygrad releases and what went into them,
in reverse chronological order. All previous releases should still be available
on pip.

.. _v2.0.1:

------------------
2.0.1 - 2021-04-03
------------------

Bug Fixes
---------

- :func:`~mygrad.matmul` and :func:`~mygrad.multi_matmul` were missing from the top-level namespace

New Functions
-------------
The following non-differentiable NumPy functions now work on mygrad tensors (and return ndarrays).
Aliases of these are available at the top-level namespace of ``mygrad``

- np.isnan
- np.isfinite
- np.isinf
- np.isnat
- np.signbit
- np.logical_not
- np.logical_and
- np.logical_or
- np.logical_xor
- np.greater
- np.greater_equal
- np.less
- np.less_equal
- np.equal
- np.not_equal
- np.floor_divide
- np.remainder
- np.mod
- np.fmod
- np.divmod
- np.rint
- np.sign
- np.floor
- np.ceil
- np.trunc
- np.isclose


.. _v2.0.0:

------------------
Expand Down
12 changes: 11 additions & 1 deletion src/mygrad/math/misc/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@

from .ops import Abs, Cbrt, Maximum, Minimum, Sqrt

__all__ = ["abs", "absolute", "cbrt", "clip", "sqrt", "maximum", "minimum"]
__all__ = [
"abs",
"absolute",
"cbrt",
"clip",
"sqrt",
"maximum",
"minimum",
"matmul",
"multi_matmul",
]


@ufunc_creator(Abs)
Expand Down
Loading

0 comments on commit 97e740f

Please sign in to comment.