Open behrica opened 4 months ago
I don't remember any more about the details of the code changes. The "goal" is still to be able later to implement this:
(require-r-package '[datasets])
(r->clj r.datasets/iris {:as-tensor true})
so we can offer options to change the build-in conversions.
@genmeblog I have a first versin of a working conversion to tensor. See here for test: https://github.com/scicloj/clojisr/blob/79866c2ffb5a12c2b6f3904ad6525c95336e2d16/src/clojisr/v1/r.clj#L242
Maybe have a quick look at the flow of the "options"
I have not checked if the "order" of elements is correct.
I have the impression that this ns tech.v3.tensor.dimensions
contains the right functions to "convert" in one go from the "matrix data as seq" as we get it from (prot/->clj exp) into the tensor....
@genmeblog I noticed that for R arrays we alreday get a flat vector from REngine. Is it somehwere documented whats the order of this is in case of multidimensional arrays ?
as discussed here: https://clojurians.zulipchat.com/#narrow/stream/224816-clojisr-dev/topic/native.20support.20.20for.20tech.2Ev3.2Edataype.20tensors.20.3F/near/438179471