Skip to content

Instantly share code, notes, and snippets.

@arpit-omprakash
Created February 12, 2020 06:20
Show Gist options
  • Save arpit-omprakash/4a1d9fa225772ab3c4b4080ba013baa9 to your computer and use it in GitHub Desktop.
Save arpit-omprakash/4a1d9fa225772ab3c4b4080ba013baa9 to your computer and use it in GitHub Desktop.
Example of PyCall library in Julia
module MyModule
using PyCall
function __init__()
py """
import numpy as np
def one(x):
return np.sin(x) ** 2 + np.cos(x) ** 2
"""
end
two(x) = py"one"(x) + py"one"(x)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment