Unfortunately, log automatically pulls out powers like this. If you
want, we could certainly discuss the merits of not having it do this.
As a workaround, you can use log(4, evaluate=False). I think you could
also subclass log and give it a custom eval that doesn't do that.
Something like this seems to work
class mylog(log):
@classmethod
def eval(self, *args):
if args[0].is_Number:
return None
return super(mylog, self).eval(*args)
Aaron Meurer
On Thu, May 2, 2013 at 9:25 PM, Ben Lucato <[email protected]> wrote:
> Not sure how to get this behavior in sympy - or even if it's possible. It
> doesn't just go for this particular example, I want to be able to do it for
> all such logs.
>
>
> Many thanks!!! Sympy rocks
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.