René's URL Explorer Experiment


Title: Custom operations over user defined types that creates new instance of userdefined type · Issue #564 · python-graphblas/python-graphblas · GitHub

Open Graph Title: Custom operations over user defined types that creates new instance of userdefined type · Issue #564 · python-graphblas/python-graphblas

X Title: Custom operations over user defined types that creates new instance of userdefined type · Issue #564 · python-graphblas/python-graphblas

Description: Is it possible to define custom operation that creates instances of user defined type? NP_UDT = np.dtype([("x", np.int64), ("y", np.float64)], align=True) UDT = gb.dtypes.register_new("UDT", NP_UDT) v1 = gb.Vector(Point, size=10) v1[0] =...

Open Graph Description: Is it possible to define custom operation that creates instances of user defined type? NP_UDT = np.dtype([("x", np.int64), ("y", np.float64)], align=True) UDT = gb.dtypes.register_new("UDT", NP_UDT...

X Description: Is it possible to define custom operation that creates instances of user defined type? NP_UDT = np.dtype([("x", np.int64), ("y", np.float64)], align=True) UDT = gb.dtypes.regist...

Opengraph URL: https://github.com/python-graphblas/python-graphblas/issues/564

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Custom operations over user defined types that creates new instance of userdefined type","articleBody":"Is it possible to define custom operation that creates instances of user defined type?\n\n```python\nNP_UDT = np.dtype([(\"x\", np.int64), (\"y\", np.float64)], align=True)\nUDT = gb.dtypes.register_new(\"UDT\", NP_UDT)\n\nv1 = gb.Vector(Point, size=10)\nv1[0] = (1, 4.5) # Tuple works here\n\n# I want to define a function that creates new UDT from int and float passed as parameters\ndef udt_add_op(x, y):\n    # When I try to use tuple here (similarly to assignment to v1[0]) it fails with exception below.\n    return ??? # What should be here to create new UDT(x,y) ?\n\nBinaryOp.register_new(\"udt_add\", udt_add_op,is_udt=True)\n\ndef v_add(v1, v2):\n    gb.Vector.ewise_add(v1, v2, \"udt_add\")\n    ...\n```\n\nException on attempt to return tuple from ```udt_add_op```:\n\n```\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"example.py\", line 24, in v_add\n    v3 \u003c\u003c gb.Vector.ewise_add(v1, v2, \"points_add\")\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/vector.py\", line 998, in ewise_add\n    return self._ewise_add(other, op)\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/vector.py\", line 1029, in _ewise_add\n    op = get_typed_op(op, self.dtype, other.dtype, kind=\"binary\")\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/operator/utils.py\", line 112, in get_typed_op\n    return get_typed_op(\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/operator/utils.py\", line 43, in get_typed_op\n    return op._compile_udt(dtype, dtype2)\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/operator/binary.py\", line 609, in _compile_udt\n    ret_type = lookup_dtype(numba_func.overloads[sig].signature.return_type)\n  File \"/miniconda3/lib/python3.10/site-packages/graphblas/core/dtypes.py\", line 374, in lookup_dtype\n    raise ValueError(f\"Unknown dtype: {key} of type {type(key)}\")\nValueError: Unknown dtype: Tuple(Literal[int](1), float64) of type \u003cclass 'numba.core.types.containers.Tuple'\u003e\n```","author":{"url":"https://github.com/gsvgit","@type":"Person","name":"gsvgit"},"datePublished":"2025-09-23T14:34:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/564/python-graphblas/issues/564"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:61af5716-5beb-8eeb-6d3a-37423058bc3e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEB02:3A1BE:1BC3792:26256BE:698DC53D
html-safe-nonce1639c7d34fc99d0ad26405ef898856cb17b7182de06cbbd28b0b7c8f0fb43ced
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjAyOjNBMUJFOjFCQzM3OTI6MjYyNTZCRTo2OThEQzUzRCIsInZpc2l0b3JfaWQiOiI0NjE0MjY3ODk1NTk2ODIzNjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac67f9c2bc21a3ad47fce247bdf9f08c060fb501ab005849cb4c63e5e9a125d049
hovercard-subject-tagissue:3445556074
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-graphblas/python-graphblas/564/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9d3226cc57530f7664d064bbbcadb711bd611c04d0403f50772916e7dd052e38/python-graphblas/python-graphblas/issues/564
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9d3226cc57530f7664d064bbbcadb711bd611c04d0403f50772916e7dd052e38/python-graphblas/python-graphblas/issues/564
og:image:altIs it possible to define custom operation that creates instances of user defined type? NP_UDT = np.dtype([("x", np.int64), ("y", np.float64)], align=True) UDT = gb.dtypes.register_new("UDT", NP_UDT...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegsvgit
hostnamegithub.com
expected-hostnamegithub.com
None2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f
turbo-cache-controlno-preview
go-importgithub.com/python-graphblas/python-graphblas git https://github.com/python-graphblas/python-graphblas.git
octolytics-dimension-user_id103965858
octolytics-dimension-user_loginpython-graphblas
octolytics-dimension-repository_id221014819
octolytics-dimension-repository_nwopython-graphblas/python-graphblas
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id221014819
octolytics-dimension-repository_network_root_nwopython-graphblas/python-graphblas
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release878672b82363fd98fbdc5bd0edb68e572c8a8d9b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues/564#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-graphblas%2Fpython-graphblas%2Fissues%2F564
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-graphblas%2Fpython-graphblas%2Fissues%2F564
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-graphblas%2Fpython-graphblas
Reloadhttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues/564
Reloadhttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues/564
Reloadhttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues/564
python-graphblas https://patch-diff.githubusercontent.com/python-graphblas
python-graphblashttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-graphblas%2Fpython-graphblas
Fork 16 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-graphblas%2Fpython-graphblas
Star 152 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-graphblas%2Fpython-graphblas
Code https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas
Issues 55 https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues
Pull requests 14 https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/pulls
Discussions https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/discussions
Actions https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/actions
Projects 0 https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/projects
Wiki https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/wiki
Security 0 https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/security
Insights https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/pulse
Code https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas
Issues https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues
Pull requests https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/pulls
Discussions https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/discussions
Actions https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/actions
Projects https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/projects
Wiki https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/wiki
Security https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/security
Insights https://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-graphblas/python-graphblas/issues/564
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-graphblas/python-graphblas/issues/564
Custom operations over user defined types that creates new instance of userdefined typehttps://patch-diff.githubusercontent.com/python-graphblas/python-graphblas/issues/564#top
https://github.com/gsvgit
https://github.com/gsvgit
gsvgithttps://github.com/gsvgit
on Sep 23, 2025https://github.com/python-graphblas/python-graphblas/issues/564#issue-3445556074
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.