Skip to content
This repository was 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

@tingying2020 tingying2020 requested a review from szha as a code owner August 27, 2019 06:27
@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

@tingying2020 tingying2020 force-pushed the np_ravel branch 2 times, most recently from 076a24e to 3c8ffc4 Compare September 12, 2019 11:46
@tingying2020 tingying2020 force-pushed the np_ravel branch 2 times, most recently from a2fe2ed to cb67e82 Compare September 13, 2019 02:36
@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.

5 participants