haojin2 commented on a change in pull request #16913: [numpy] add op linalg
solve
URL: https://github.com/apache/incubator-mxnet/pull/16913#discussion_r354585755
##########
File path: tests/python/unittest/test_numpy_op.py
##########
@@ -3412,6 +3412,97 @@ def check_inv(A_inv, data_np):
check_inv(A_inv, data_np)
+@with_seed()
+@use_np
+def test_np_linalg_solve():
+ class TestSolve(HybridBlock):
+ def __init__(self):
+ super(TestSolve, self).__init__()
+
+ def hybrid_forward(self, F, a, b):
+ return F.np.linalg.solve(a, b)
+
+ def check_solve(x, a_np, b_np):
+ try:
+ x_expected = _np.linalg.solve(a_np, b_np)
+ except Exception as e:
+ print(a_np)
+ print(a_np.shape)
+ print(b_np)
+ print(b_np.shape)
+ print(e)
Review comment:
get a better 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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services