haojin2 commented on a change in pull request #10557: [MXNET-322] Elemwise_mul(row_sparse, dense) = row_sparse on CPU URL: https://github.com/apache/incubator-mxnet/pull/10557#discussion_r182510261
########## File path: tests/python/unittest/test_sparse_operator.py ########## @@ -322,17 +322,15 @@ def lt(l, r): def le(l, r): return check_all(l, r, lambda a, b: a <= b) - def least_sparse(lstype, rstype): - if lstype == 'default' and rstype == 'default': + def elemwise_mul_stype(lstype, rstype): + if lstype == rstype: + return lstype + elif lstype == 'default' and rstype == 'row_sparse': + return 'row_sparse' + elif rstype == 'default' and lstype == 'row_sparse': Review comment: just a nit, will "elif lstype == 'row_sparse' and rstype == 'default'" easier to read? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services