Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-1253] fix control_flow_op #13555

Merged
merged 3 commits into from
Dec 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add test for sparse where op
  • Loading branch information
apeforest committed Dec 10, 2018
commit d0ad62b738c0795944d97f8e37a9a6744c6bdff6
4 changes: 4 additions & 0 deletions tests/nightly/test_large_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def test_where():
res = nd.where(b > 100, a, b)
apeforest marked this conversation as resolved.
Show resolved Hide resolved
assert np.sum(res[-1].asnumpy() == 1) == b.shape[1]

csr_cond = nd.sparse.cast_storage(b < 10, 'csr')
res = nd.sparse.where(csr_cond, a, b)
assert np.sum(res[0].asnumpy() == 1) == b.shape[1]


if __name__ == '__main__':
import nose
Expand Down