I want to send large NumPy array from Python to Julia by a reference, not by copy. And probably this do not work.
main.py
import numpy as np
from julia import Main
def main():
Main.include('test.jl')
x = np.array([0, 1, 2, 3, 4])
print(x)
Main.double_array(x)
print(x)
if __name__ == '__main__':
main()
test.jl
function double_array(x)
x[:] = x * 2
end
Result is
$ python main.py
[0 1 2 3 4]
[0 1 2 3 4]
Is there any possibility to send large numpy array from python to julia without copy?