2018-06-13 15:05:38 -0500 | received badge | ● Popular Question (source) |

2018-06-06 04:41:31 -0500 | received badge | ● Student (source) |

2017-01-07 02:17:28 -0500 | received badge | ● Notable Question (source) |

2017-01-07 02:17:28 -0500 | received badge | ● Popular Question (source) |

2012-08-30 11:14:55 -0500 | answered a question | Way to make default output numerical not symbolic? Wrap with (..).n() at the appropriate stage eg: or: then: |

2012-08-30 10:33:16 -0500 | commented answer | preparser state for regexs No no no .. Something infinitly more diabolical! Experement with two cells as follows Cell one: preparser(False); print type(2) preparser(True); print type(2) Cell two: preparser(True); print type(2) preparser(False); print type(2) preparser(True) Also comment the last and see what happens. I'm totaly confused. I anycase, surely one should leave the preparser in the on state? |

2012-08-30 04:58:18 -0500 | asked a question | preparser state for regexs I would have expected the following to work: In fact I get 'IndexError: no such group'. Using int(1) fixes the problem, but why? The preparser is off! Even more curious the block works, as is, on every other evaluate! I tried moving the preparser(False) statement to before the import, but that makes no difference. |

2012-08-27 03:44:12 -0500 | commented answer | How do I exec a function of N variables. Can't quite see how to "accept". Is it a thumbs up or a tick or something else? |

2012-08-27 03:41:49 -0500 | received badge | ● Scholar (source) |

2012-08-27 03:41:49 -0500 | marked best answer | How do I exec a function of N variables. Usually needing to use The problem is that you're using Sage-specific syntax handles by the Sage prepareser and or by using the alternate function syntax: where you'd have to make sure the variables were defined somewhere. |

2012-08-27 03:41:47 -0500 | received badge | ● Supporter (source) |

2012-08-23 11:57:54 -0500 | received badge | ● Teacher (source) |

2012-08-23 11:30:59 -0500 | answered a question | Multiple loops in an animation? Does this give you a clue? Is this what you want to achieve? I'm not sure. |

2012-08-22 08:56:11 -0500 | answered a question | How do I exec a function of N variables. Is an embedded exec any more insecure than a live session in which anyone could just write one? |

2012-08-22 08:52:00 -0500 | commented answer | How do I exec a function of N variables. Nice answer thanks. |

2012-08-21 07:49:37 -0500 | asked a question | How do I exec a function of N variables. The python code: f(x,y)=sin(x) + cos(y) Can be both differentiated and evaluated. like this:
dfx=diff(f,x);
dfy=diff(f,y)
then evaluated like this:
f(pi/6,pi/9) -> cos(1/9 I'm wanting to do something like: exec("f(t1,t2)=cos(t1)+sin(t2)") so that I can write an @interact function to define the equations of N variables interactively. When I try the above exec I receive the error: "SyntaxError: can't assign to function call" I can almost do it, but I'm getting into a horrible inelegant tangle of of eval statements in the process! Is there a clean way to do it with sage? |