Questions tagged [pycall]

54 questions
2
votes
1 answer

Run a python code with arguments from Julia terminal

I would like to call a python script, which has one function and this function expects one argument. Could You please advice how to call this python script from Julia terminal with the argument from Julia environment. I have tried pyimport, py"""run…
NykPol
  • 61
  • 3
2
votes
1 answer

No module named Julia

I'm a new beginner with python und have recently installed Julia. And as I wrote "from julia import Main" in Jupyter note through Anaconda, an error would occur which is "no module named 'julia'". I don't know which part is wrong or is this about…
2
votes
1 answer

Cannot assign custom radial for scipy rbf imported in julia through pycall?

I have imported scipy.interpolate.Rbf from python to Julia 1.6 using PyCall. It works, but when I am trying to assign the radial function value to multiquadric it doesn't allow me to do so, due to syntax issue. For example: using PyCall interpolate…
Mohammad Saad
  • 1,935
  • 10
  • 28
2
votes
0 answers

Can you precompile Julia scripts in Python's julia module and call them without Main.eval(*)?

I'm trying to call Julia scripts with Python to get some better speeds on functions I need to call a huge number of times (for some Monte Carlo type analyses). I've sucessfully installed and run Julia scripts in python via: from julia import Main as…
Will
  • 170
  • 10
2
votes
1 answer

How to use Yahoo! Finance market data downloader (yfinance) Python package from Julia?

I am trying to download the stock data from yahoo finance to my Julia code and use it for further analysis. Since Julia stocks related packages have a lot of bugs while downloading data, I want to use the PyCall to utilise the python library…
Mohammad Saad
  • 1,935
  • 10
  • 28
2
votes
1 answer

Call Python from Julia

I am new to Julia and I have a Python function that I want to use in Julia. Basically what the function does is to accept a dataframe (passed as a numpy ndarray), a filter value and a list of column indices (from the array) and run a logistic…
Kay
  • 2,057
  • 3
  • 20
  • 29
2
votes
1 answer

How to mount google drive when using IJulia in google colab?

I am trying to get Julia working in colab. I want to mount gdrive to colab just like in IPython when using IJulia. In ipython I can do it as follows: from google.colab import drive drive.mount('/content/gdrive') I tried following: using PyCall clb…
2
votes
1 answer

Modify a Python object's attribute when using PyCall.jl in Julia

I'm trying to interface with a python library via PyCall.jl where the library returns a python object (PyObject in Julia) with attributes I want to modify in Julia. For example say I have the following dummy python class, import numpy as np class…
S_B
  • 159
  • 1
  • 6
2
votes
1 answer

Unable to use PyJulia with Julia 1.0 and Conda Python 3.6

I'm trying to configure Python and Julia to interoperate using these directions. This is what I've done. Installed Julia and added julia to my path. Installed PyCall.jl I installed PyJulia using python3 -m pip install julia. This installs pyjulia…
Austin A
  • 2,990
  • 6
  • 27
  • 42
2
votes
1 answer

Pycall throws ValidationError

I'm trying to run these lines of code in atom and python3.6 : from pycall import CallFile, Call, Application import sys def call(): c = Call('SIP/200') a = Application('Playback', 'hello-world') cf = CallFile(c, a) …
1
vote
1 answer

Syntax for `apply` pandas function in ruby

I need to convert a python script into ruby. I use for that the gems Pandas and Numpy which make the work quite simple. For example I have these kind of lines: # python # DF is a dataframe from Pandas DF['VAL'].ewm(span =…
Sovalina
  • 5,410
  • 4
  • 22
  • 39
1
vote
0 answers

Julia PyCall.pyfunction with wrapped julia objects from Python

For performance reasons I would like to wrap Julia functions I am using in Python with the PyCall.pyfunctionret and PyCall.pyfunction wrappers. One of my Julia functions returns an object that is explicitly not converted to a python object using the…
bgro
  • 65
  • 6
1
vote
1 answer

Julia multithreading from pycall

Say I have a jupyter notebook: %%julia using Pkg Pkg.add("DecisionTree") using DecisionTree X = Vector([1.1,2.2,3.3]) Y = Vector([1.1,2.2,3.3]) X = reshape(X, size(X)) X = Float32.(X) Y = Float32.(Y) print(typeof(X)) print(typeof(Y)) model =…
Fatafim
  • 287
  • 2
  • 13
1
vote
1 answer

Convert Julia to EXE with help of PyInstaller

For a while now, I've been trying to compile a Julia package into an EXE with little success. Recently, I decided to take a look into wrapping it with Python and then transforming it to an EXE. This has worked great except the EXE crashes on startup…
1
vote
1 answer

How to output julia DataFrame in orgtbl format? (Trying to wrap `tabulate` Python package in Julia commands)

In the following link, we see that we can use a table package in Python to return in orgtbl format. #+begin_src python :results value raw :output :return tabulate(df, headers=df.columns, tablefmt='orgtbl') from tabulate import tabulate import pandas…
BuddhiLW
  • 608
  • 3
  • 9