Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@syoyo Ready for review |
There was a problem hiding this comment.
Pull request overview
This PR fixes a type mismatch bug in the numpy_num_face_vertices() Python binding that caused incorrect values to be returned. The underlying C++ mesh_t::num_face_vertices field is a std::vector<unsigned int>, but the numpy binding was creating a py::array_t<unsigned char> and using sizeof(unsigned char) for the memcpy operation, resulting in truncated data and zeros appearing in the output.
Changes:
- Changed
numpy_num_face_vertices()to useunsigned intinstead ofunsigned charto match the underlying C++ type - Updated both the py::array_t template parameter and the sizeof() call in memcpy to use the correct type
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@paulmelnikow I've opened a new pull request, #412, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot Add regression test(in python layer) for this PR to python. create accompanying .obj file under 'models/' Setup minimal python unit test/regression test runner upon necessary. |
A follow-up to #405 and #407 which need to land firstCloses #400