Skip to content
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

pybind11 prints numpy array if signature is not matching #82

Open
DerThorsten opened this issue Jun 5, 2017 · 4 comments
Open

pybind11 prints numpy array if signature is not matching #82

DerThorsten opened this issue Jun 5, 2017 · 4 comments

Comments

@DerThorsten
Copy link
Owner

If we use a PyView<float, 1>
and pass a 2D numpy array the whole array is printed.... literally the whole array, every element....
this is super annoying...

This needs to be fixed asap!

@constantinpape
Copy link
Collaborator

If I remember correctly, the same thing happens if you pass a graph if the signature is not matching.
So for a nifty::graph::UndirectedGraph all nodes and uv-ids are printed.

@DerThorsten
Copy link
Owner Author

Maybe it was just the repr method in the graph.
I removed this method.

I guess changes are high that this will fix the issue

@DerThorsten
Copy link
Owner Author

still active...for instance, if one calls

solver.optimize(startSol,visitor)

instead of

solver.optimize(visitor, startSol)

the whole startSol array is printed

@DerThorsten
Copy link
Owner Author

DerThorsten commented Jun 12, 2017

This is fixed in a PR from me in the pybind11 repo ( pybind/pybind11#901 )
Lets see if this is merged

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

No branches or pull requests

2 participants