This is what I get.  Can you verify that things don't work for you?  This
was done in sympy/master.

In [1]: domain = Interval(-pi, 0, True, True) + Interval(0, pi/2, True,
True)

In [2]: new_domain = TransformationSet(Lambda(x, 2*x), domain)

In [3]: domain
Out[3]:
⎛   π⎞
⎜0, ─⎟ ∪ (-π, 0)
⎝   2⎠

In [4]: new_domain
Out[4]:
⎧          ⎛   π⎞          ⎫
⎨2⋅x | x ∊ ⎜0, ─⎟ ∪ (-π, 0)⎬
⎩          ⎝   2⎠          ⎭

In [5]: 3*pi/4 in new_domain
Out[5]: True



On Mon, Jul 29, 2013 at 7:24 PM, Ben Lucato <[email protected]> wrote:

> Howdy, say I do:
>
> domain = Interval(-pi, 0, True, True) + Interval(0, pi/2, True, True)
>
>
> I could hope to do a transformation to dilate this domain by a factor 2
> from the origin, like so:
>
>
> new_domain = domain.replace(lambda expr: expr.is_Real, lambda expr: 2*expr)
> OR:
> new_domain = TransformationSet(Lambda(x, 2*x), domain)
>
> in either case, checking:
>
> 3*pi/4 in new_domain
>
> returns False.
>
> I may be using TransformationSet incorrectly - I just looked in the docs
> and it looked like something relevant. Perhaps it only works for sets?
>
> --
> 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.
> 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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to