-
-
Notifications
You must be signed in to change notification settings - Fork 640
Add regression test for numpy_num_face_vertices() fix (issue #400)
#418
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
+75
−1
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
39c39a6
Test Python + NumPy in CI
paulmelnikow 5fe0344
Add comments
paulmelnikow af5bb21
Add more tests
paulmelnikow c392794
Add more Python tests
paulmelnikow 54f3ef9
assert_array_almost_equal
paulmelnikow 9ebc6a2
Try decimal=5
paulmelnikow 24666b3
Try to fix vertex test
paulmelnikow b545df6
Update a comment
paulmelnikow addf431
Upgrade cibuildwheel
paulmelnikow 79cf530
Fix toml
paulmelnikow 03cfda8
Match the types and call buf.release()
paulmelnikow 2296782
Rm buf.release()
paulmelnikow 9d08abb
Try to clear license warning on build
paulmelnikow fc06cee
Fix license specifier
paulmelnikow a027b25
Merge branch 'upgrade-cibw' into numpy-fixes
paulmelnikow 089b386
Move python tests out of python so they don’t end up in the wheel
paulmelnikow c6d987b
Add some excludes
paulmelnikow ff2e15b
Reformat and exclude some python files
paulmelnikow ecbd03b
Merge branch 'python-tests' into upgrade-cibw
paulmelnikow 0101956
Merge branch 'upgrade-cibw' into numpy-fixes
paulmelnikow 06f368c
Update .github/workflows/python.yml
paulmelnikow ada0c93
Add a note about local numpy install
paulmelnikow 91768a8
Merge remote-tracking branch 'curvewise/python-tests' into python-tests
paulmelnikow d240cb0
Merge branch 'release' into python-tests
paulmelnikow b22dcbc
Merge branch 'python-tests' into numpy-fixes
paulmelnikow 99ea28d
Reset a few files
paulmelnikow 4d33a88
Initial plan
Copilot 08c2bfd
Add regression test and .obj file for issue-400 numpy_num_face_vertic…
Copilot f86ce63
Fix black formatting with line-length=140 from pyproject.toml
Copilot 6fd1061
Merge branch 'release' into copilot/sub-pr-408-again
syoyo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Regression test model for issue #400 - numpy_num_face_vertices() | ||
| # Mixed quad and triangle faces to verify correct uint type handling. | ||
| # With the bug (unsigned char instead of unsigned int in the numpy binding), | ||
| # numpy_num_face_vertices() returned all zeros for quad (4-vertex) faces. | ||
| v 0.0 0.0 0.0 | ||
| v 1.0 0.0 0.0 | ||
| v 1.0 1.0 0.0 | ||
| v 0.0 1.0 0.0 | ||
| v 0.5 0.5 1.0 | ||
| # quad face (num_face_vertices = 4) | ||
| f 1 2 3 4 | ||
| # triangle face (num_face_vertices = 3) | ||
| f 1 2 5 | ||
| # triangle face (num_face_vertices = 3) | ||
| f 2 3 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dtype assertion is hard-coded to uint32, but
numpy_num_face_vertices()is meant to expose C++unsigned int(mesh_t::num_face_vertices), which maps to NumPy's platform-dependentnp.uintc/dtype('uintc'). To keep this test portable across platforms, assert againstnp.dtype(np.uintc)(ornp.dtype('uintc')) instead of alwaysuint32.