haojin2 commented on a change in pull request #18020: [Numpy] Add op
linalg.matrix_rank
URL: https://github.com/apache/incubator-mxnet/pull/18020#discussion_r407018468
##########
File path: python/mxnet/symbol/numpy/linalg.py
##########
@@ -23,7 +23,40 @@
from . import _internal as _npi
__all__ = ['norm', 'svd', 'cholesky', 'qr', 'inv', 'det', 'slogdet', 'solve',
'tensorinv', 'tensorsolve',
- 'pinv', 'eigvals', 'eig', 'eigvalsh', 'eigh', 'lstsq']
+ 'pinv', 'eigvals', 'eig', 'eigvalsh', 'eigh', 'lstsq',
'matrix_rank']
+
+
+def matrix_rank(M, tol=None, hermitian=False):
+ """
+ Return matrix rank of array using SVD method
+
+ Rank of the array is the number of singular values of the array that are
+ greater than `tol`.
+
+ Parameters
+ M : {(M,), (..., M, N)} symbol
Review comment:
`_Symbol`, same for below.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services