-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add optional convert options for r->clj functions #105
base: master
Are you sure you want to change the base?
Conversation
(-> r-object | ||
(r options) | ||
(r->java options) | ||
(java2clj/java->clj options))) | ||
(def r->clj r->java->clj) | ||
|
||
(defn r->java->native-clj [r-object] (-> r r-object r->java java2clj/java->native)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not change this function to take options
.
Could not find any usage, neither sucessfully call it myself.
src/clojisr/v1/r.clj
Outdated
(defn r->java->clj [r-object] (-> r-object r r->java java2clj/java->clj)) | ||
(defn r->java->clj [r-object & options] | ||
(-> r-object | ||
(r options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why r
should know about options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. Not sure any more. Was some time ago.
I think the idea was to "be able" to pass options through all layers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options should be passed only to the java->clj
function.
Multidimensional conversion is done here: https://github.com/scicloj/clojisr/blob/master/src/clojisr/v1/impl/java_to_clj.clj#L94-L100
I don't remember any more about the details of the code changes.
so we can offer options to change the build-in conversions. |
@genmeblog Line 242 in 79866c2
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 contains the right functions to "convert" in one go from the "matrix data as seq" as we get it from |
@genmeblog |
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