It's true that Eq() is not really an equation because it works like a
boolean, but it's also the only equation object SymPy has. The reason
dsolve() and solve() accept Eq() is because they solve equations, so it
makes sense for them to accept an equation. laplace_transform() on the
other hand operates on an expression, so it's not necessarily the case that
it should operate on equations.

Aaron Meurer


On Sat, Feb 26, 2022 at 1:50 PM Eric Barth <[email protected]> wrote:

> oh, gosh.  Thank you Jonathan!
> Thanks for bringing me up to speed on this issue.
> My thought was simply to make laplace_tranform() usage more closely match
> the documentation for sympy.dsolve(), which suggests sympy.Eq() for
> equations.
> Best wishes, Eric
>
> On Sat, Feb 26, 2022 at 3:31 PM [email protected] <[email protected]> wrote:
>
>> Eric,
>>
>> Please be aware that sympy.Equality (.Eq) is not an equation. It is a
>> logical statement that evaluates to True or False. If it can be evaluated
>> it will collapse to that. If having an entity that behaves as an equation
>> is important to you please help to make it so by contributing to the
>> discussion and efforts surrounding this draft symPEP (
>> https://github.com/sympy/SymPEPs/pull/1) and this PR(
>> https://github.com/sympy/sympy/pull/21333).
>>
>> Regards,
>> Jonathan
>>
>> On Saturday, February 26, 2022 at 2:16:28 PM UTC-6 [email protected]
>> wrote:
>>
>>> Thank you! I'm especially grateful for the updates to
>>> laplace_transform() in sympy-1.10rc3
>>>
>>> One (simple?) thing I ask you to consider:
>>> Please make laplace_transform()  accommodate equations as input.
>>>
>>> Here's what I see with sympy-1.10rc3
>>>
>>> import sympy
>>> t,s = sympy.symbols("t s")
>>> x = sympy.Function("x")
>>> de = sympy.Eq(x(t).diff(t),x(t))
>>> sympy.laplace_transform(de,t,s)  >>>>  AttributeError: 'Equality' object
>>> has no attribute 'as_independent'
>>>
>>> a quick might be:
>>> def lap(eqn,s,t):
>>>     from sympy import Equality, Eq, laplace_transform
>>>     if isinstance(eqn,Equality):
>>>         return
>>> Eq(laplace_transform(eqn.lhs,t,s),laplace_transform(eqn.rhs,t,s))
>>>     else:
>>>         return laplace_transform(eqn,t,s)
>>>
>>> lap(de,s,t)
>>> Out[5]:  Eq(s*LaplaceTransform(x(t), t, s) - x(0),
>>> LaplaceTransform(x(t), t, s))
>>>
>>> best wishes,
>>> Eric
>>>
>>> On Sat, Feb 26, 2022 at 1:43 PM Oscar Benjamin <[email protected]>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've just released SymPy 1.10rc3 release candidate.
>>>>
>>>> Following the previous release 1.10rc2 release candidate a couple of
>>>> regressions were reported:
>>>> https://github.com/sympy/sympy/issues/23144
>>>> https://github.com/sympy/sympy/issues/23148
>>>>
>>>> Thanks to Matthias Koeppe and Clément Robert for testing the release
>>>> candidate with the downstream SAGE and unyt libraries and also Paul
>>>> Spiering for helping to fix these issues. These have now been fixed
>>>> and the fixes backported to the 1.10 release branch so I've made a new
>>>> release candidate with the fixes.
>>>>
>>>> You can install SymPy 1.10rc3 with
>>>>
>>>> pip install -U --pre sympy
>>>>
>>>> You can also download the release files from GitHub:
>>>>
>>>> https://github.com/sympy/sympy/releases/tag/sympy-1.10rc3
>>>>
>>>> Please test this release out in particular with downstream libraries.
>>>> I'm going to leave it a few days and then if no further issues are
>>>> reported I'll release this as 1.10 final.
>>>>
>>>> Oscar
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/sympy/CAHVvXxTAW54BxZBkS0jHnCmdh3hDKRt6DjTLJgNJzsQ5oGOMGg%40mail.gmail.com
>>>> .
>>>>
>>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/sympy/b4efcdeb-6fe8-4eee-a4e1-12dd69cda691n%40googlegroups.com
>> <https://groups.google.com/d/msgid/sympy/b4efcdeb-6fe8-4eee-a4e1-12dd69cda691n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CALpBD8jaBKSzqXGBSeW0ZEK97SEqK5bRv1W%3DwybCfwrv_UM%3D8A%40mail.gmail.com
> <https://groups.google.com/d/msgid/sympy/CALpBD8jaBKSzqXGBSeW0ZEK97SEqK5bRv1W%3DwybCfwrv_UM%3D8A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6Jvr0rm0J1wMcspBah9ran5rZijJ-Bd%3DSgDfoGH0ma_%3DA%40mail.gmail.com.

Reply via email to