Skip to content
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

weird UndefRefError when trying to transpose a matrix of strings #15

Closed
shashi opened this issue Apr 25, 2016 · 2 comments
Closed

weird UndefRefError when trying to transpose a matrix of strings #15

shashi opened this issue Apr 25, 2016 · 2 comments

Comments

@shashi
Copy link

shashi commented Apr 25, 2016

julia> mx = ["$i-$j" for i= 1:10, j=1:10];

julia> @tensor t[i,j] := mx[j,i]
ERROR: UndefRefError: access to undefined reference
 [inlined code] from simdloop.jl:73
 in add_micro! at /home/shashi/.julia/v0.4/TensorOperations/src/implementation/kernels.jl:6
 in add_rec! at /home/shashi/.julia/v0.4/TensorOperations/src/implementation/recursive.jl:13
 in add! at /home/shashi/.julia/v0.4/TensorOperations/src/implementation/stridedarray.jl:25
 in deindexify! at /home/shashi/.julia/v0.4/TensorOperations/src/indexnotation/indexedobject.jl:57
 in deindexify at /home/shashi/.julia/v0.4/TensorOperations/src/indexnotation/indexedobject.jl:47

But

julia> mx = Any["$i-$j" for i= 1:10, j=1:10];

       @tensor t[i,j] := mx[j,i]

10x10 Array{Any,2}:
    ...

Works!

It's okay if it's a finicky detail that you don't plan on fixing.

@Jutho
Copy link
Owner

Jutho commented Apr 25, 2016

using t = similar(mx); @tensor t[i,j] = mx[j,i] seems to work (do I never thought about anything else than numbers when writing the implementation so I am positively surprised). There must be something wrong with how I deal with := (probably similar problem as with #14 ). I'll look into this soon.

@Jutho
Copy link
Owner

Jutho commented Apr 17, 2020

I am going to close this; feel free to reopen. It is not working at all in latest versions of TensorOperations, but TensorOperations is really about numerical arrays, and things like true*string == string clearly don't hold (in fact the left hand side does not work). It would be to big of a change to fix this, or to provide completely independent implementations for non-numerical types.

@Jutho Jutho closed this as completed Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants