Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to create unicode string operations#545

Unanswered
Oofle asked this question inQ&A
Discussion options

Hello,
How would one create user defined operations on unicode strings? I have some code where I want to define a string concatenation binary operator:

import graphblas as gbdef concat(a,b):    return a + bA = gb.Matrix.from_coo([0,1], [0,1], [“a”, “b”])bin_op = gb.core.operator.BinaryOp.register_anonymous(concat, is_udt = True)print(bin_op(A&A).new())

However, it is giving me the error
ValueError: Unknown dtype: unicode_type of type <class 'numba.core.types.misc.UnicodeType'>.

I would guess that this might require some user defined string type, but I haven't had much success getting it to work.

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@Oofle

[8]ページ先頭

©2009-2025 Movatter.jp