apache/arrow-julia

[Feature Request] Support Tensors ?

BambOoxX opened this issue · 5 comments

I see in the documentation that there is currently no support of tensors.
I tried to check why it was so, but could not find a previous discussion about this.
Is it still not planned ?

If I can be of help (not sure I can do much though) please tell me where I could start.

Moelf commented

isn't it just dense n-dimensional array? have you tried? since Julia supports n-d array natively I don't imagine there's anything super special

Yes I guess it is just n-dimensional arrays, but these seem to be called tensors in the Arrow vocabulary.
I don't think there should be anything fancy about this either, however it does (as advertised) not work.

As an example, doing

using Arrow
mat = rand(10,20,30)
Arrow.write("foo.bar",(mat=mat,)) # does not work
Arrow.write("foo.bar",(vec=mat[:,1,1],)) # works
Moelf commented
Arrow.write("foo.bar",(mat=mat,)) # does not work

this doesn't make sense, your column needs to be a collection, it can't be a single tensor.


I tried

Arrow.write("foo.bar",(mat=[mat],))

and it works in terms to successfully written to disk, but the shape information is lost.

Arrow.write("foo.bar",(mat=mat,)) # does not work

this doesn't make sense, your column needs to be a collection, it can't be a single tensor.

Ah yes my bad, in a way I think I misunderstood the Arrow format capabilities. But now I get the point