Lambda seems to work for me except for one thing.

I have a class Wavefunction for representations of states in continuous
bases. It subclasses Lambda and provides some additional convenience
functions. One thing it would like to do internally is calculate
self.expr*conjugate(self.expr). I've found, however, that because the Lambda
uses dummy variables internally, even if I initialize the function with a
symbol set to real=True, that doesn't carry over to the internal expression
and so the conjugate isn't very well simplified. Is there a way to get
around this?

Thanks!

On Fri, Jun 10, 2011 at 9:19 PM, Aaron Meurer <[email protected]> wrote:

> If you just want a placeholder to keep args, use UndefinedFunction.
> If you want it to have any more advanced functionality at all, create
> a subclass of Function.  I admit I don't know anything at all about
> what you are doing, but it's very likely that the case is the latter.
>
> Aaron Meurer
>
> On Fri, Jun 10, 2011 at 5:08 PM, Vinzent Steinberg
> <[email protected]> wrote:
> > On 10 Jun., 02:08, Brian Granger <[email protected]> wrote:
> >> Definitely use the existing Function stuff in sympy.  I am not sure
> >> you will even have to subclass to do this.
> >
> > There is also UndefinedFunction (BTW, I think we should rename it to
> > AbstractFunction or similar) if you want a rather abstract function.
> > If you want to implement something like sin, you should probably use
> > Function.
> >
> > Vinzent
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "sympy" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected].
> > For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
>


-- 
Tomo Lazovich
Harvard College '11
278 Winthrop House Mail Center
Cambridge, MA 02138

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to