Replies: 1 comment 1 reply
-
You can convert managed types like Array and Module to a Value by calling
Managed::as_value.
Op wo 28 jun. 2023 17:06 schreef jeenou ***@***.***>:
… Hi again,
I have a question how do I call julia function that takes array as an
argument.
For example:
function Func(arg1::Vector{Float64}, arg2::Vector{Tuple{Float64, Float64}})
....
end
I tried to create the array using new_for in
jlrs::data::managed::array::Array but this function don't take that data
type as an argument:
pub fn
*call_array<'target, 'data, T: Target<'target>>( target: T, module: &str,
function: &str, data1: Array<'*, 'data>
) -> JlrsResult<ValueResult<'target, 'data, T>> {
unsafe {
let res = Module::main(&target)
.submodule(&target, module)?
.as_managed()
.function(&target, function)?
.as_managed()
.call1(target, data1); //PROBLEM HERE IN CALL1
Ok(res)
}
}
What should I do?
—
Reply to this email directly, view it on GitHub
<#94>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOQBHHYNDLBIMTFWJTWZECTXNRB6PANCNFSM6AAAAAAZXIRWW4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again,
I have a question how do I call julia function that takes array as an argument.
For example:
function Func(arg1::Vector{Float64}, arg2::Vector{Tuple{Float64, Float64}})
....
end
I tried to create the array using new_for in jlrs::data::managed::array::Array but this function don't take that data type as an argument:
pub fn call_array<'target, 'data, T: Target<'target>>(
target: T,
module: &str,
function: &str,
data1: Array<', 'data>
) -> JlrsResult<ValueResult<'target, 'data, T>> {
unsafe {
let res = Module::main(&target)
.submodule(&target, module)?
.as_managed()
.function(&target, function)?
.as_managed()
.call1(target, data1); //PROBLEM HERE IN CALL1
}
What should I do?
Beta Was this translation helpful? Give feedback.
All reactions