You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/10/04 12:09:10 UTC

[GitHub] [incubator-mxnet] NathanYyc opened a new pull request #20633: [API Standardization]API Signature standardize

NathanYyc opened a new pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633


   ## Description ##
   standardize the signatures of MXNet APIs
   
   reference: 
   https://github.com/numpy/numpy/tree/main/numpy/array_api
   ## Checklist ##
   ### Essentials ###
   - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [ ] Code is well-documented
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-988397659


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966865540


   Jenkins CI successfully triggered : [miscellaneous]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-984228144


   @mxnet-bot run ci [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
barry-jin commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r741524623



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -873,7 +873,7 @@ unittest_array_api_standardization() {
     export MXNET_ENABLE_CYTHON=0
     export DMLC_LOG_STACK_TRACE_DEPTH=100
     python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose \
-        array_api_tests/test_type_promotion.py::test_elementwise_function_two_arg_bool_type_promotion

Review comment:
       Please add a new test instead of replacing the existing tests. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966912044


   Jenkins CI successfully triggered : [unix-gpu, miscellaneous]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-985276427


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751050


   @mxnet-bot run ci[miscellaneous]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983273664


   Jenkins CI successfully triggered : [centos-gpu, unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-984228182


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983437052


   Jenkins CI successfully triggered : [centos-gpu, unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982872585


   @mxnet-bot run ci [unix-cpu, unix-gpu, windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982198694


   @mxnet-bot run ci [centos-cpu, miscellaneous, unix-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-984008015


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-988397599


   @mxnet-bot run ci [windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966865925


   Jenkins CI successfully triggered : [website]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751423


   Jenkins CI successfully triggered : [website]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966865515


   @mxnet-bot run ci[miscellaneous], [unix-cpu], [unix-gpu], [website]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983548460


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983169493


   Jenkins CI successfully triggered : [centos-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-984007915


   @mxnet-bot  run ci [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751316






-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966865779






-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966944674


   @mxnet-bot run ci[miscellaneous, website]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983169424


   @mxnet-bot run ci [centos-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-980479359


   @mxnet-bot run ci [centos-gpu, unix-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r721965415



##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must
+        compute the dot product over the last axis. Default: None .
+
+    Returns
+    -------
+    output : ndarray
+        Dot product of `a` and `b`.
+
+    See Also
+    --------
+    dot : Return the dot product without using the complex conjugate of the
+        first argument.
+
+    Examples
+    --------
+    Note that higher-dimensional arrays are flattened!
+
+    >>> a = np.array([[1, 4], [5, 6]])
+    >>> b = np.array([[4, 1], [2, 2]])
+    >>> np.vecdot(a, b)
+    array(30.)
+    >>> np.vecdot(b, a)

Review comment:
       The same here.

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must
+        compute the dot product over the last axis. Default: None .

Review comment:
       ```suggestion
           compute the dot product over the last axis. Default: None.
   ```

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must

Review comment:
       ```suggestion
           (where -1 refers to the last dimension). If None, the function must
   ```

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:

Review comment:
       ```def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:```
   How about adding the same function style in the entire file by giving the type-name explicitly?

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must
+        compute the dot product over the last axis. Default: None .
+
+    Returns
+    -------
+    output : ndarray
+        Dot product of `a` and `b`.
+
+    See Also
+    --------
+    dot : Return the dot product without using the complex conjugate of the
+        first argument.
+
+    Examples
+    --------
+    Note that higher-dimensional arrays are flattened!
+
+    >>> a = np.array([[1, 4], [5, 6]])
+    >>> b = np.array([[4, 1], [2, 2]])
+    >>> np.vecdot(a, b)

Review comment:
       ```suggestion
       >>> np.linalg.vecdot(a, b)
   ```

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a

Review comment:
       ```suggestion
           the shape determined according to Broadcasting. If specified as a
   ```

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -839,7 +889,8 @@ def eigvals(a):
     return _mx_nd_np.linalg.eigvals(a)
 
 
-def eigvalsh(a, UPLO='L'):
+@wrap_data_api_linalg_func
+def eigvalsh(a, upper=False):

Review comment:
       Should Cholesky take a special param `upper=False`? [link](https://github.com/apache/incubator-mxnet/pull/20633/files#diff-ea841d142011d5eecb5db0d91a54f8e60db58da7ae51a02145ecdb4ea50ffb9eR394). According to [link](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html#linalg-cholesky-x-upper-false) , a new one op should have additional param. 

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must
+        compute the dot product over the last axis. Default: None .
+
+    Returns
+    -------
+    output : ndarray
+        Dot product of `a` and `b`.
+
+    See Also
+    --------
+    dot : Return the dot product without using the complex conjugate of the
+        first argument.
+
+    Examples
+    --------
+    Note that higher-dimensional arrays are flattened!
+
+    >>> a = np.array([[1, 4], [5, 6]])
+    >>> b = np.array([[4, 1], [2, 2]])
+    >>> np.vecdot(a, b)
+    array(30.)
+    >>> np.vecdot(b, a)
+    array(30.)
+    >>> 1*4 + 4*1 + 5*2 + 6*2
+    30
+    """
+    return tensordot(a.flatten(), b.flatten(), axis)

Review comment:
       It looks like that tensordot does not exist in the current context. Please use `_mx_nd_np.tensordot(a.flatten(), b.flatten(), axis)`

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:

Review comment:
       ```suggestion
   def vecdot(a: ndarray, b: ndarray, axis: Optional[int]=None) -> ndarray:
   ```

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:

Review comment:
       How about maintaining consistency in this file? the function above should take and return format inexplicitly; without `-> ndarray` annotation. If you want to keep the standard like this: then it could be nice to have all functions changed.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-965935851


   @mxnet-bot run ci[unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966944741


   Jenkins CI successfully triggered : [miscellaneous, website]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751523


   Jenkins CI successfully triggered : [windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966865761






-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-980528472


   @mxnet-bot run ci [centos-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982201045


   Jenkins CI successfully triggered : [unix-gpu, centos-gpu, windows-gpu, windows-cpu, website, miscellaneous, sanity, unix-cpu, centos-cpu, edge, clang]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
barry-jin commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r741524623



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -873,7 +873,7 @@ unittest_array_api_standardization() {
     export MXNET_ENABLE_CYTHON=0
     export DMLC_LOG_STACK_TRACE_DEPTH=100
     python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose \
-        array_api_tests/test_type_promotion.py::test_elementwise_function_two_arg_bool_type_promotion

Review comment:
       Please add a new test instead of replacing the existing tests. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966747904


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966747869


   @mxnet-bot run ci[unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966911975


   @mxnet-bot run ci[miscellaneous, unix-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
barry-jin commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r745021042



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -879,6 +879,23 @@ unittest_array_api_standardization() {
     popd

Review comment:
       Please move `python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose array_api_tests/test_signatures.py` under test_indexing.py. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-933420421


   @barry-jin 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-933420251


   Hey @NathanYyc , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [website, windows-gpu, centos-cpu, sanity, edge, centos-gpu, clang, miscellaneous, unix-cpu, unix-gpu, windows-cpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
barry-jin commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r745240460



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -874,8 +874,25 @@ unittest_array_api_standardization() {
     export DMLC_LOG_STACK_TRACE_DEPTH=100
     python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose \
         array_api_tests/test_type_promotion.py::test_elementwise_function_two_arg_bool_type_promotion
-    python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose array_api_tests/test_creation_functions.py
     python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose array_api_tests/test_indexing.py
+    python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose array_api_tests/test_creation_functions.py

Review comment:
       ```suggestion
       python3 -m pytest --durations=50 --cov-report xml:tests_api.xml --verbose array_api_tests/test_signatures.py
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
barry-jin commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r756370735



##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -535,7 +535,7 @@ def empty_like(prototype, dtype=None, order='C', subok=False, shape=None): # pyl
     if shape is not None:
         raise NotImplementedError("Assigning new shape is not supported at this moment")
     try:
-        dtype = dtype if isinstance(dtype, str) else dtype_list[dtype]
+        dtype = dtype if isinstance(dtype, str) else _np.dtype(dtype).name

Review comment:
       Could you also remove dtype_list (line 526 - 530) above? 

##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -1532,3 +1569,104 @@ def eigh(a, upper=False):
     else:
         UPLO = 'U'
     return _mx_nd_np.linalg.eigh(a, UPLO)
+
+
+@wrap_np_binary_func
+def matmul(a: ndarray, b: ndarray, /, *, out: Optional[ndarray] = None, **kwargs) -> ndarray:
+    r"""Matrix product of two arrays.
+
+    Parameters
+    ----------
+    a, b : ndarray
+        Input arrays, scalars not allowed.
+    out : ndarray, optional
+        A location into which the result is stored.
+        If provided, it must have a shape that matches the signature (n,k),(k,m)->(n,m).
+        If not provided or None, a freshly-allocated array is returned.
+
+    Returns
+    -------
+    y : ndarray
+        The matrix product of the inputs.
+        This is a scalar only when both x1, x2 are 1-d vectors.
+
+    Raises
+    ------
+    MXNetError
+        If the last dimension of a is not the same size as the second-to-last dimension of b.
+        If a scalar value is passed in.
+
+    See Also
+    --------
+    tensordot : Sum products over arbitrary axes.
+    dot : alternative matrix product with different broadcasting rules.
+    einsum : Einstein summation convention.
+
+    .. note::
+

Review comment:
       Could you add note here as matmul in linalg is required by array-api-standard instead of official numpy and add matmul into __all__ (line 31 - 33) 

##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -13363,3 +13965,96 @@ def from_dlpack(x):
     """
     from_dlpack = ndarray_from_dlpack(ndarray)
     return from_dlpack(x)
+
+
+@set_module('mxnet.numpy')
+def matrix_transpose(x: ndarray, /) -> ndarray:
+    """
+    Transposes a matrix (or a stack of matrices) x ..
+
+    Parameters
+    ----------
+    x : ndarray
+        input array having shape (..., M, N) and whose innermost two dimensions form MxN matrices
+

Review comment:
       Add notes as matrix_transpose is not official NumPy operator. 

##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -13363,3 +13965,96 @@ def from_dlpack(x):
     """
     from_dlpack = ndarray_from_dlpack(ndarray)
     return from_dlpack(x)
+
+
+@set_module('mxnet.numpy')
+def matrix_transpose(x: ndarray, /) -> ndarray:
+    """
+    Transposes a matrix (or a stack of matrices) x ..
+
+    Parameters
+    ----------
+    x : ndarray
+        input array having shape (..., M, N) and whose innermost two dimensions form MxN matrices
+
+    Returns
+    -------
+    out : ndarray
+        an array containing the transpose for each matrix and having shape (..., N, M) . The
+        returned array must have the same data type as x .
+    """
+    if x.ndim < 2:
+        raise ValueError("x must be at least 2-dimensional for matrix_transpose")
+    return _mx_nd_np.swapaxes(x, -1, -2)
+
+
+def astype(
+        self: ndarray,
+        /,
+        dtype: Union[str, dtype], # pylint: disable=undefined-variable
+        *,
+        order: Optional[str] = 'K',
+        casting: Optional[str] = 'unsafe',
+        subok: Optional[bool] = True,
+        copy: Optional[bool] = True
+) -> ndarray:  # pylint: disable=arguments-differ, unused-argument, too-many-arguments,
+    """
+    Copy of the array, cast to a specified type.
+
+    Parameters
+    ----------
+    dtype : str or dtype
+        Typecode or data-type to which the array is cast.
+    order : {'C', 'F', 'A', 'K'}, optional
+        Controls the memory layout order of the result.
+        'C' means C order, 'F' means Fortran order, 'A'
+        means 'F' order if all the arrays are Fortran contiguous,
+        'C' order otherwise, and 'K' means as close to the
+        order the array elements appear in memory as possible.
+        Default is 'K'.
+    casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
+        Controls what kind of data casting may occur. Defaults to 'unsafe'
+        for backwards compatibility.
+
+        * 'no' means the data types should not be cast at all.
+        * 'equiv' means only byte-order changes are allowed.
+        * 'safe' means only casts which can preserve values are allowed.
+        * 'same_kind' means only safe casts or casts within a kind,
+        like float64 to float32, are allowed.
+        * 'unsafe' means any data conversions may be done.
+    subok : bool, optional
+        If True, then sub-classes will be passed-through (default), otherwise
+        the returned array will be forced to be a base-class array.
+    copy : bool, optional
+        Default `True`. By default, astype always returns a newly
+        allocated ndarray on the same device. If this is set to
+        `False`, and the dtype requested is the same as the ndarray's
+        dtype, the ndarray is returned instead of a copy.
+
+    Returns
+    -------
+    arr_t : ndarray
+        Unless `copy` is False and the other conditions for returning the input
+        array are satisfied (see description for `copy` input parameter), `arr_t`
+        is a new array of the same shape as the input array with `dtype`.
+
+    Notes
+    -----
+    This function differs from the official `ndarray`'s ``astype`` function in the following
+    aspects:
+        * `order` only supports 'C' and 'K'.
+        * `casting` only supports 'unsafe'.
+        * `subok` only supports ``True``.
+    """
+    if order is not None and order != 'K' and order != 'C':
+        raise ValueError('order must be either \'K\' or \'C\'')
+    if casting != 'unsafe':
+        raise ValueError('casting must be equal to \'unsafe\'')
+    if not subok:
+        raise ValueError('subok must be equal to True')
+    if dtype is None:
+        dtype = _np.float32
+    if not copy and _np.dtype(dtype) == self.dtype:
+        return self
+
+    return _npi.cast(self, dtype=dtype)

Review comment:
       Add new line below. 

##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -13363,3 +13965,96 @@ def from_dlpack(x):
     """
     from_dlpack = ndarray_from_dlpack(ndarray)
     return from_dlpack(x)
+
+
+@set_module('mxnet.numpy')
+def matrix_transpose(x: ndarray, /) -> ndarray:
+    """
+    Transposes a matrix (or a stack of matrices) x ..
+
+    Parameters
+    ----------
+    x : ndarray
+        input array having shape (..., M, N) and whose innermost two dimensions form MxN matrices
+
+    Returns
+    -------
+    out : ndarray
+        an array containing the transpose for each matrix and having shape (..., N, M) . The
+        returned array must have the same data type as x .
+    """
+    if x.ndim < 2:
+        raise ValueError("x must be at least 2-dimensional for matrix_transpose")
+    return _mx_nd_np.swapaxes(x, -1, -2)
+
+
+def astype(
+        self: ndarray,

Review comment:
       Please use x or array as argument here instead of self. 

##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -13363,3 +13965,96 @@ def from_dlpack(x):
     """
     from_dlpack = ndarray_from_dlpack(ndarray)
     return from_dlpack(x)
+
+
+@set_module('mxnet.numpy')
+def matrix_transpose(x: ndarray, /) -> ndarray:
+    """
+    Transposes a matrix (or a stack of matrices) x ..
+
+    Parameters
+    ----------
+    x : ndarray
+        input array having shape (..., M, N) and whose innermost two dimensions form MxN matrices
+
+    Returns
+    -------
+    out : ndarray
+        an array containing the transpose for each matrix and having shape (..., N, M) . The
+        returned array must have the same data type as x .
+    """
+    if x.ndim < 2:
+        raise ValueError("x must be at least 2-dimensional for matrix_transpose")
+    return _mx_nd_np.swapaxes(x, -1, -2)
+
+
+def astype(
+        self: ndarray,
+        /,
+        dtype: Union[str, dtype], # pylint: disable=undefined-variable
+        *,
+        order: Optional[str] = 'K',
+        casting: Optional[str] = 'unsafe',
+        subok: Optional[bool] = True,
+        copy: Optional[bool] = True
+) -> ndarray:  # pylint: disable=arguments-differ, unused-argument, too-many-arguments,
+    """
+    Copy of the array, cast to a specified type.
+
+    Parameters
+    ----------
+    dtype : str or dtype
+        Typecode or data-type to which the array is cast.
+    order : {'C', 'F', 'A', 'K'}, optional
+        Controls the memory layout order of the result.
+        'C' means C order, 'F' means Fortran order, 'A'
+        means 'F' order if all the arrays are Fortran contiguous,
+        'C' order otherwise, and 'K' means as close to the
+        order the array elements appear in memory as possible.
+        Default is 'K'.
+    casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
+        Controls what kind of data casting may occur. Defaults to 'unsafe'
+        for backwards compatibility.
+
+        * 'no' means the data types should not be cast at all.
+        * 'equiv' means only byte-order changes are allowed.
+        * 'safe' means only casts which can preserve values are allowed.
+        * 'same_kind' means only safe casts or casts within a kind,
+        like float64 to float32, are allowed.
+        * 'unsafe' means any data conversions may be done.
+    subok : bool, optional
+        If True, then sub-classes will be passed-through (default), otherwise
+        the returned array will be forced to be a base-class array.
+    copy : bool, optional
+        Default `True`. By default, astype always returns a newly
+        allocated ndarray on the same device. If this is set to
+        `False`, and the dtype requested is the same as the ndarray's
+        dtype, the ndarray is returned instead of a copy.
+
+    Returns
+    -------
+    arr_t : ndarray
+        Unless `copy` is False and the other conditions for returning the input
+        array are satisfied (see description for `copy` input parameter), `arr_t`
+        is a new array of the same shape as the input array with `dtype`.
+
+    Notes
+    -----
+    This function differs from the official `ndarray`'s ``astype`` function in the following

Review comment:
       Add note as astype is array method. Currently we add an operator for it. 

##########
File path: src/api/operator/numpy/np_tensordot_op.cc
##########
@@ -73,8 +73,10 @@ MXNET_REGISTER_API("_npi.tensordot")
     .set_body([](runtime::MXNetArgs args, runtime::MXNetRetValue* ret) {
       if (args[2].type_code() == kDLInt) {
         _npi_tensordot_int_axes(args, ret);
-      } else {
+      } else if (args[2].type_code() == kObjectHandle) {
         _npi_tensordot(args, ret);
+      } else {
+        LOG(FATAL) << "Error";

Review comment:
       Please add complete error message. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-965935900


   Jenkins CI successfully triggered : [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751338


   Jenkins CI successfully triggered : [unix-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-980479374


   Jenkins CI successfully triggered : [unix-gpu, centos-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983548373


   @mxnet-bot run ci [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on a change in pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on a change in pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#discussion_r722384932



##########
File path: python/mxnet/numpy/linalg.py
##########
@@ -67,6 +70,53 @@ def matrix_rank(M, tol=None, hermitian=False):
     return _mx_nd_np.linalg.matrix_rank(M, tol, hermitian)
 
 
+def vecdot(a: ndarray, b, ndarray, axis: Optional[int] =None) -> ndarray:
+    r"""
+    Return the dot product of two vectors.
+    Note that `vecdot` handles multidimensional arrays differently than `dot`:
+    it does *not* perform a matrix product, but flattens input arguments
+    to 1-D vectors first. Consequently, it should only be used for vectors.
+
+    Parameters
+    ----------
+    a : ndarray
+        First argument to the dot product.
+    b : ndarray
+        Second argument to the dot product.
+    axis : axis over which to compute the dot product. Must be an integer on
+        the interval [-N, N) , where N is the rank (number of dimensions) of
+        the shape determined according to Broadcasting . If specified as a
+        negative integer, the function must determine the axis along which
+        to compute the dot product by counting backward from the last dimension
+        (where -1 refers to the last dimension). If None , the function must
+        compute the dot product over the last axis. Default: None .
+
+    Returns
+    -------
+    output : ndarray
+        Dot product of `a` and `b`.
+
+    See Also
+    --------
+    dot : Return the dot product without using the complex conjugate of the
+        first argument.
+
+    Examples
+    --------
+    Note that higher-dimensional arrays are flattened!
+
+    >>> a = np.array([[1, 4], [5, 6]])
+    >>> b = np.array([[4, 1], [2, 2]])
+    >>> np.vecdot(a, b)
+    array(30.)
+    >>> np.vecdot(b, a)

Review comment:
       ```suggestion
       >>> np.linalg.vecdot(b, a)
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751092


   Jenkins CI successfully triggered : [miscellaneous]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-966751493


   @mxnet-bot run ci[windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-980528481


   Jenkins CI successfully triggered : [centos-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983436942


   @mxnet-bot run ci [centos-gpu, unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982872695


   Jenkins CI successfully triggered : [unix-cpu, unix-gpu, windows-gpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982200989


   @mxnet-bot run ci [all]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-982198748


   Jenkins CI successfully triggered : [centos-cpu, unix-gpu, miscellaneous]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-983273601


   @mxnet-bot run ci [centos-gpu, unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] NathanYyc commented on pull request #20633: [API Standardization]API Signature standardize

Posted by GitBox <gi...@apache.org>.
NathanYyc commented on pull request #20633:
URL: https://github.com/apache/incubator-mxnet/pull/20633#issuecomment-985276372


   @mxnet-bot run ci [unix-cpu]


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org