Julia Quick Syntax Reference by Antonello Lobianco
Author:Antonello Lobianco
Language: eng
Format: epub
ISBN: 9781484251904
Publisher: Apress
7.3.1 Embed Python Code in a Julia Program
Embedding Python code in a Julia program is similar to what we saw with C++, except that you don’t need (for the most part) to worry about transforming data. You define and call the Python functions with py"..." and, in the function call, you can use your Julia data directly:using PyCall JULIA
py"""
def sumMyArgs (i, j):
return i+j
def getNElement (n):
a = [0,1,2,3,4,5,6,7,8,9]
return a[n]
"""
a = py"sumMyArgs"(3,4) # 7
b = py"sumMyArgs"([3,4],[5,6]) # [8,10]
typeof(b) # Array{Int64,1}
c = py"sumMyArgs"([3,4],5) # [8,9]
d = py"getNElement"(1) # 1
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Computer Vision & Pattern Recognition | Expert Systems |
Intelligence & Semantics | Machine Theory |
Natural Language Processing | Neural Networks |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7879)
Hadoop in Practice by Alex Holmes(5673)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5527)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(4535)
Functional Programming in JavaScript by Mantyla Dan(3733)
The Age of Surveillance Capitalism by Shoshana Zuboff(3445)
Big Data Analysis with Python by Ivan Marin(3169)
Blockchain Basics by Daniel Drescher(2907)
The Rosie Effect by Graeme Simsion(2729)
Test-Driven Development with Java by Alan Mellor(2699)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2648)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2567)
Data Augmentation with Python by Duc Haba(2553)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2500)
Dawn of the New Everything by Jaron Lanier(2449)
Principles of Data Fabric by Sonia Mezzetta(2363)
The Infinite Retina by Robert Scoble Irena Cronin(2347)
The Art Of Deception by Kevin Mitnick(2312)
Rapid Viz: A New Method for the Rapid Visualization of Ideas by Kurt Hanks & Larry Belliston(2214)