The API has changed in a recent PR
https://github.com/sympy/sympy/pull/2341
imageset(x, 2*x, Interval(0, 1)
[0, 2]
On Thu, Aug 1, 2013 at 7:43 AM, Matthew Rocklin mrock...@gmail.com wrote:
I'm renaming TransformationSet to ImageSet (I think this is a more precise
name).
I'm renaming TransformationSet to ImageSet (I think this is a more precise
name).
https://github.com/sympy/sympy/pull/2341
2340 is in by the way but the interface will change shortly to
Interval(0, 1).image(x, 2*x)
[0, 2]
On Tue, Jul 30, 2013 at 8:33 AM, Matthew Rocklin mrock...@gmail.com
Awesome! You are a gentleman and a scholar, Matthew Rocklin.
Thanks for letting me know there is no way to do this in the current sympy.
On 30 July 2013 13:18, Matthew Rocklin mrock...@gmail.com wrote:
At some point we might do a simplify sort of treatment for sets.
In the meantime
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 =
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⎠
Thanks - I updated to the git master and now the TransformationSet works.
Is there some way to take this new TransformationSet object and rewrite it
as a Union/Interval?
i.e.
get this:
Interval(-2*pi, 0, True, True) + Interval(0, pi, True, True)
On Tuesday, 30 July 2013 10:34:48 UTC+10,
At some point we might do a simplify sort of treatment for sets.
In the meantime something like the following could work in the case of
monotonic functions. In general we know how to transform Intervals and
FiniteSets. We know that unions and intersections will compose well with
these