[julia-users] Re: Importing Python data to Julia

2016-10-25 Thread Steven G. Johnson
Don't evaluate Julia code as strings. Just call Julia functions directly. j.inv(randMat) should work

[julia-users] Re: Importing Python data to Julia

2016-10-25 Thread Corbin Foucart
That worked; thanks! On Tuesday, October 25, 2016 at 6:36:25 AM UTC-4, Christoph Ortner wrote: > > I haven't tried, but I think it should be > > result = j.inv(randMat) > > > On Tuesday, 25 October 2016 05:05:47 UTC+1, Corbin Foucart wrote: >> >> How? If you don't mind my asking. It doesn't seem

[julia-users] Re: Importing Python data to Julia

2016-10-25 Thread Christoph Ortner
I haven't tried, but I think it should be result = j.inv(randMat) On Tuesday, 25 October 2016 05:05:47 UTC+1, Corbin Foucart wrote: > > How? If you don't mind my asking. It doesn't seem that documentation > exists... Suppose in a python script, I have: > > [python imports] > [pyjulia initializ

[julia-users] Re: Importing Python data to Julia

2016-10-24 Thread Corbin Foucart
How? If you don't mind my asking. It doesn't seem that documentation exists... Suppose in a python script, I have: [python imports] [pyjulia initialization] j = julia.Julia() randMat = np.random.rand(3, 3) # what should I put here to pass randMat to julia? result = j.eval("inv(julia_randmat)")

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread Christoph Ortner
a collaborator of mine is using pyjulia in a similar way - implement reasonably fast interatomic potentials in Julia, but use all the tools available in Python for model setup etc. In case it helps, you can look at https://github.com/libAtoms/JuLIP.jl/blob/master/temp/julip.py as an exampl

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread Corbin Foucart
Yes, they were. Is there documentation for pyjulia? I have not found any other than their Readme file... On Tuesday, October 18, 2016 at 5:11:48 PM UTC-4, cdm wrote: > > were the examples you found related to use of PyJulia ... ? > >https://github.com/JuliaPy/pyjulia > > > > On Tuesday, Octob

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread Corbin Foucart
Yes, I am modifying a finite element code written in python. I would like to perform the operator assembly in Julia rather than python. This will require parsing the finite element data in numpy format. I would like to implement an iterative linear solver on the the global linear system, and su

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread Steven G. Johnson
On Tuesday, October 18, 2016 at 4:42:51 PM UTC-4, Corbin Foucart wrote: > > 2) Call Julia code directly from python (I don't want to perform some > trivial computation as in the examples I've found, I want to operate on the > lists of numpy arrays) > pyjulia can do this.

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread cdm
were the examples you found related to use of PyJulia ... ? https://github.com/JuliaPy/pyjulia On Tuesday, October 18, 2016 at 1:42:51 PM UTC-7, Corbin Foucart wrote: > > Suppose that I have a large Python code; I would like to use Julia to > operate on the python workspace variables at cer

[julia-users] Re: Importing Python data to Julia

2016-10-18 Thread Cedric St-Jean
Could you provide a more concrete example of what you're trying to do? On Tuesday, October 18, 2016 at 4:42:51 PM UTC-4, Corbin Foucart wrote: > > Suppose that I have a large Python code; I would like to use Julia to > operate on the python workspace variables at certain locations in the code. >