Skip to content

Instantly share code, notes, and snippets.

@irisyjohnson
irisyjohnson / subexpr.py
Last active November 23, 2017 10:11 — forked from anj1/subexpr.py
update to python3
import types
import tensorflow as tf
import numpy as np
# Expressions are represented as lists of lists,
# in lisp style -- the symbol name is the head (first element)
# of the list, and the arguments follow.
# add an expression to an expression list, recursively if necessary.
def add_expr_to_list(exprlist, expr):