René's URL Explorer Experiment


Title: Use pybind11 for tri module by ianthomas23 · Pull Request #24522 · matplotlib/matplotlib · GitHub

Open Graph Title: Use pybind11 for tri module by ianthomas23 · Pull Request #24522 · matplotlib/matplotlib

X Title: Use pybind11 for tri module by ianthomas23 · Pull Request #24522 · matplotlib/matplotlib

Description: This is a pybind11 wrapping of the _tri module. It is taken from the pybind11 proof of concept (#23787) with some of @anntzer's extra comments addressed. Also see pybind transition plan #23846. Worthy of note for future PRs that wrap C/C++ code using pybind11 is how I have chosen to deal with passing None in lieu of NumPy arrays from Python to C++ (i.e. when the array is optional). These are auto converted to arrays using the target dtype. So for float and bool arrays this is fine but it doesn't work for integer arrays >>> np.array(None, dtype=int) Traceback (most recent call last): File "", line 1, in TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' Hence passing from a Python Triangulation to a C++ one the various optional array arguments are passed as empty tuples rather than None. These appear on the C++ side as arrays with size==0 and ndim==1. Probably when not passing optional integers arrays I would prefer to stick to None, which appear as arrays with size==1 and ndim==0, but rather than mix the two approaches in the same function I have just used the tuple approach. All of this is on the internal C++ API behind the Python Triangulation so it doesn't affect user code either way.

Open Graph Description: This is a pybind11 wrapping of the _tri module. It is taken from the pybind11 proof of concept (#23787) with some of @anntzer's extra comments addressed. Also see pybind transition plan #23846....

X Description: This is a pybind11 wrapping of the _tri module. It is taken from the pybind11 proof of concept (#23787) with some of @anntzer's extra comments addressed. Also see pybind transition plan #23...

Opengraph URL: https://github.com/matplotlib/matplotlib/pull/24522

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e9d9cabb-c7a1-00df-e477-983a9d9d2581
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE5D6:337E91:8888F:BAA21:6A510E31
html-safe-nonce30111c0a9ac14b3291c7d9b5420bf0fae342458af119bdb245585ea9589d7b5e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUQ2OjMzN0U5MTo4ODg4RjpCQUEyMTo2QTUxMEUzMSIsInZpc2l0b3JfaWQiOiIzNzQ3NTgxMjEwNjI2NDI4NDY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc670796449e4d7e843d51440efc42855912d6ab1200b900eb7bf4b461bf10913
hovercard-subject-tagpull_request:1129200549
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/24522/files
twitter:imagehttps://avatars.githubusercontent.com/u/580326?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/580326?s=400&v=4
og:image:altThis is a pybind11 wrapping of the _tri module. It is taken from the pybind11 proof of concept (#23787) with some of @anntzer's extra comments addressed. Also see pybind transition plan #23846....
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2d129404fc45ea64edb1b98567c53e55b395536f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/24522/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F24522%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F24522%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/pull/24522/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/24522/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/24522/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 410 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
oscargushttps://github.com/oscargus
matplotlib:mainhttps://github.com/matplotlib/matplotlib/tree/main
ianthomas23:pybind11_tri_modulehttps://github.com/ianthomas23/matplotlib/tree/pybind11_tri_module
Conversation 16 https://github.com/matplotlib/matplotlib/pull/24522
Commits 6 https://github.com/matplotlib/matplotlib/pull/24522/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/24522/checks
Files changed https://github.com/matplotlib/matplotlib/pull/24522/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
Use pybind11 for tri module https://github.com/matplotlib/matplotlib/pull/24522/files#top
Show all changes 6 commits https://github.com/matplotlib/matplotlib/pull/24522/files
5e29a2a Use pybind11 for tri module ianthomas23 Nov 20, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/5e29a2ad253e0fa9945377576e404b2f1705a712
a4ffb29 Preinstall pybind11 on no-build-isolation builds ianthomas23 Nov 20, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/a4ffb293831026aa4bcc33f09e632bcfab8bf2eb
1e93684 Triangulation.set_mask fix and tests ianthomas23 Nov 30, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/1e936847d41ad71df6b11ef63da65d18d4ff6a04
286e48f Review comments ianthomas23 Nov 30, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/286e48f6c5641c2940f4ca865aa48261c346f25c
fbcf714 Use MSVC 2017 on appveyor ianthomas23 Dec 2, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/fbcf71438169d7b011f2316575b2c026befc492b
5360353 Preinstall pybind11 in CodeQL action ianthomas23 Dec 2, 2022 https://github.com/matplotlib/matplotlib/pull/24522/commits/536035393b0cf7102d157fb29b01d0791740c226
Clear filters https://github.com/matplotlib/matplotlib/pull/24522/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
.appveyor.yml https://github.com/matplotlib/matplotlib/pull/24522/files#diff-e1ab4c3cec24f841948eb867754d4ad0b9b6d11eaa6b5bfbe0357aceb0a49eff
codeql-analysis.yml https://github.com/matplotlib/matplotlib/pull/24522/files#diff-63bd641104d10e25f141d518a16b22a151d125e12701df2f9e79734b23b90188
tests.yml https://github.com/matplotlib/matplotlib/pull/24522/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957f
test_triangulation.py https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
_triangulation.py https://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
pyproject.toml https://github.com/matplotlib/matplotlib/pull/24522/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
setupext.py https://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
_tri.cpp https://github.com/matplotlib/matplotlib/pull/24522/files#diff-56bd9a4b704693c3a53d738f218239fa63e4c2c4fe79c2b4a64ccfc23f6f1d65
_tri.h https://github.com/matplotlib/matplotlib/pull/24522/files#diff-186742efb9834c99ddb07bc8b635560c1ee86e923e73dfb6c2afd1cd9e5f8daa
_tri_wrapper.cpp https://github.com/matplotlib/matplotlib/pull/24522/files#diff-eb276e78f954ac20f60685326a728bd15d6a6615d7ba32e7dc34d414beb0d657
.appveyor.ymlhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-e1ab4c3cec24f841948eb867754d4ad0b9b6d11eaa6b5bfbe0357aceb0a49eff
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/.appveyor.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-e1ab4c3cec24f841948eb867754d4ad0b9b6d11eaa6b5bfbe0357aceb0a49eff
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-e1ab4c3cec24f841948eb867754d4ad0b9b6d11eaa6b5bfbe0357aceb0a49eff
.github/workflows/codeql-analysis.ymlhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-63bd641104d10e25f141d518a16b22a151d125e12701df2f9e79734b23b90188
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/.github/workflows/codeql-analysis.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-63bd641104d10e25f141d518a16b22a151d125e12701df2f9e79734b23b90188
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-63bd641104d10e25f141d518a16b22a151d125e12701df2f9e79734b23b90188
.github/workflows/tests.ymlhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957f
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/.github/workflows/tests.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957f
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957f
lib/matplotlib/tests/test_triangulation.pyhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/lib/matplotlib/tests/test_triangulation.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
oscargushttps://github.com/oscargus
Nov 28, 2022https://github.com/matplotlib/matplotlib/pull/24522/files#r1033350909
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
tacaswellhttps://github.com/tacaswell
Nov 28, 2022https://github.com/matplotlib/matplotlib/pull/24522/files#r1034169764
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
ianthomas23https://github.com/ianthomas23
Nov 29, 2022https://github.com/matplotlib/matplotlib/pull/24522/files#r1034560520
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standardshttps://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
anntzerhttps://github.com/anntzer
Nov 29, 2022https://github.com/matplotlib/matplotlib/pull/24522/files#r1034584368
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
scipy/scipy#16589https://github.com/scipy/scipy/pull/16589
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-15c9ff255d83cac014750485807a651e878fd405ad6bc945abebfea0514bff6a
lib/matplotlib/tri/_triangulation.pyhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/lib/matplotlib/tri/_triangulation.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-8d85676345f0fec4a873ac7f4cdb6684346d0f5da5059209ef3413fbc3971db4
pyproject.tomlhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/pyproject.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
setupext.pyhttps://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
View file https://github.com/ianthomas23/matplotlib/blob/536035393b0cf7102d157fb29b01d0791740c226/setupext.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/24522/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
https://github.com/matplotlib/matplotlib/pull/24522/files#diff-113dbd0ff67f6e8e817884a3e98962eec6856df1fb826932442487e374b827f0
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/24522/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.