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

Fix ndarray assignment issue with basic indexing #10022

Merged
merged 2 commits into from
Mar 8, 2018

Conversation

reminisce
Copy link
Contributor

The following code would throw exception before this fix because the value was not broadcast to the right shape .

data = mx.nd.ones((2, 2))  # data.shape = (2, 2)
value = mx.nd.array([3])  # value.shape = (1,)
data[:] = value  # the value should be broadcast to shape (2, 2) first and then call copyto(data)

@reminisce reminisce requested a review from szha as a code owner March 7, 2018 08:13
@szha szha merged commit 39c0fd8 into apache:master Mar 8, 2018
jinhuang415 pushed a commit to jinhuang415/incubator-mxnet that referenced this pull request Mar 30, 2018
* Fix ndarray assignment issue with basic index

* Uncomment useful code
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* Fix ndarray assignment issue with basic index

* Uncomment useful code
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* Fix ndarray assignment issue with basic index

* Uncomment useful code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants