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

Commit

Permalink
Added diag to ndarray and symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
ifeherva committed Jul 16, 2018
1 parent 89f1ed8 commit 871f510
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,14 @@ def flip(self, *args, **kwargs):
"""
return op.flip(self, *args, **kwargs)

def diag(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`diag`.
The arguments are the same as for :py:func:`diag`, with
this array as data.
"""
return op.diag(self, *args, **kwargs)

def sum(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`sum`.
Expand Down
8 changes: 8 additions & 0 deletions python/mxnet/symbol/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,14 @@ def flip(self, *args, **kwargs):
"""
return op.flip(self, *args, **kwargs)

def diag(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`diag`.
The arguments are the same as for :py:func:`diag`, with
this array as data.
"""
return op.diag(self, *args, **kwargs)

def sum(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`sum`.
Expand Down

0 comments on commit 871f510

Please sign in to comment.