Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arithmetic on Literals #19

Open
dwf opened this issue Jul 10, 2014 · 1 comment
Open

Arithmetic on Literals #19

dwf opened this issue Jul 10, 2014 · 1 comment

Comments

@dwf
Copy link
Contributor

dwf commented Jul 10, 2014

Arithmetic on Literals should work.

  • Should it happen immediately for Literal-Literal operations?
  • Should the __add__, etc. methods be in Node?
@jaberg
Copy link
Contributor

jaberg commented Jul 10, 2014

Based on my sympy vs. Theano experience, I would suggest that operators acting on literals return non-literals. A separate function can do a depth-first collapsing of the literals in a graph, and be called automatically by other functions that act on whole-graphs. Strongest considerations: information preservation about call graph, programmer-friendliness.

Re: __add__ in Node... a lot of operators will produce results for which addition is undefined, will that be a problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants