| what i do to do this? Without doing f(w=2)!!! imagine that the function is f->f(a,b,c,d,f....,t) like doing this: etc |
| The You just have to define the replacements you want once in a dictionary. You still have to call subs once for every function you want to change.
thanks, :( thats exactly what i don't want. what if f->f(a,b,c,d,f....,t)? it would be a little annoying to do that.
ngativ (Aug 25 '10)
I've updated my answer. Could you explain the annoying part? Do you mean having to do the ".function(*f.arguments())" part?
Mike Hansen (Aug 25 '10)
i have updated my question, its about doing f(a=1,b=2,c=3...)
ngativ (Aug 25 '10)
Thanks, your answer is very usefull
ngativ (Aug 25 '10) |
| I think I'm just explaining Mike's answer a little, but I think that you should be able to define a dictionary and then do should do it. Mike, is that extra thing necessary, given that the arguments are the same in both cases?
hi, you can prefix the preformatted text with four space characters, then they will not wrap
Evgeny (Aug 25 '10)
Okay, but then there should be much more information about the wiki formatting somewhere (FAQ?). Maybe even a little button for multiline code, sort of like the backticks for inline code? Sorry for us all requesting so many new things!
kcrisman (Aug 25 '10)
You are right, we keep track of all these issues and will fix them. Thanks. Actually the button with a whole bunch of zeroes and ones helps format both multiline and inline code.
Evgeny (Aug 25 '10)
Actually, you don't need. However, if you did `f(w=2) then that doesn't return a CallableSymbolicExpression, but `f.subs(params)` does return one. I'll update my answer.
Mike Hansen (Aug 25 '10)
i got it now, thanks
ngativ (Aug 25 '10) |
Asked: Aug 25 '10
Seen: 238 times
Last updated: Oct 23 '12
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.