Skip to content

Use new style __init__ in numpy docs #2316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

bstaletic
Copy link
Collaborator

Fixes #1205

@YannickJadoul
Copy link
Collaborator

Just some docs. Merging. Thanks, Boris! :-)

@YannickJadoul YannickJadoul merged commit 441e777 into pybind:master Jul 23, 2020
@bstaletic bstaletic deleted the numpy-docs branch July 23, 2020 14:05
@YannickJadoul
Copy link
Collaborator

YannickJadoul commented Aug 22, 2020

@bstaletic I know I actually reviewed this, but does it work?

Should it not actually be

        .def(py::init([](py::buffer b) {
            // ...
            return new Matrix(map);
        }));

@bstaletic
Copy link
Collaborator Author

It should be map, not m. I have no idea why I made that change. However, you don't have to return a pointer. You can return a value. Do you want me to create a new pr to fix this?

@YannickJadoul
Copy link
Collaborator

You can return a value.

Yes, but new is called internally anyway? But as you wish. Are Matrix objects cheaply movable?

Do you want me to create a new pr to fix this?

Up to you. I can also do it; I have it ready.

@YannickJadoul
Copy link
Collaborator

It should be map, not m. I have no idea why I made that change.

I must also have been sleeping during that review, though :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation outdated for numpy example
2 participants