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

[numpy] operator ravel, derive from reshape #16016

Merged
merged 1 commit into from Sep 16, 2019

Conversation

tingying2020
Copy link
Contributor

Numpy operator ravel which is the same as reshape(x, -1).

@haojin2

@karan6181
Copy link
Contributor

@mxnet-label-bot add [Numpy, Operator, pr-awaiting-review]

@marcoabreu marcoabreu added Numpy Operator pr-awaiting-review PR is waiting for code review labels Aug 28, 2019
(1, 2, 3),
(3, 0),
(1, 0, 2)
]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply do

for shape in [(), (2,), (2, 2), (1, 2, 3), (3, 0), (1, 0, 2)]:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

Copy link
Contributor

@haojin2 haojin2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

python/mxnet/ndarray/numpy/_op.py Outdated Show resolved Hide resolved
@sxjscience
Copy link
Member

sxjscience commented Sep 15, 2019

@tingying2020 Would you rebase the code? I will merge after that.

* it is the same as reshape(x, -1)

* register reshape with prefix _npi_

* fix format error

* edit examples in doc

* fix error in review

* add out in wrapper

* remove out

* test data type and add order

* change order check

* remove redundant test and add docstring about order
@tingying2020
Copy link
Contributor Author

tingying2020 commented Sep 16, 2019

@tingying2020 Would you rebase the code? I will merge after that.

Rebased.

@tingying2020 tingying2020 reopened this Sep 16, 2019
@sxjscience sxjscience merged commit 5ed5689 into apache:master Sep 16, 2019
larroy pushed a commit to larroy/mxnet that referenced this pull request Sep 28, 2019
* it is the same as reshape(x, -1)

* register reshape with prefix _npi_

* fix format error

* edit examples in doc

* fix error in review

* add out in wrapper

* remove out

* test data type and add order

* change order check

* remove redundant test and add docstring about order
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Numpy Operator pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants