You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 gb
def concat(a,b):
return a + b
A = 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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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:
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.
Beta Was this translation helpful? Give feedback.
All reactions