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 2020/04/24 19:17:16 UTC

[GitHub] [incubator-mxnet] yzhliu commented on a change in pull request #18157: [numpy] fix core dump for tril, triu

yzhliu commented on a change in pull request #18157:
URL: https://github.com/apache/incubator-mxnet/pull/18157#discussion_r414805839



##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -2068,6 +2068,8 @@ def tril(m, k=0):
            [ 7.,  8.,  0.],
            [10., 11., 12.]])
     """
+    if isinstance(m, numeric_types):
+        raise TypeError("tril() missing 1 required positional argument: 'm'")

Review comment:
       I feel it might be better to have more specific error msg saying the it is expected to be at least 2D.
   same for the remains.




----------------------------------------------------------------
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:
users@infra.apache.org