Here is a workaround to get to the numbers:

In [1]: import sympy as sm

In [2]: from sympy.physics.vector import ReferenceFrame

In [3]: A = ReferenceFrame('A')

In [4]: v = 2*sm.cos(12) * A.x + 3 * sm.sin(-0.2) * A.y

In [5]: v
Out[5]: 2*cos(12)*A.x - 0.596007992385184*A.y

In [6]: v.evalf()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-38d207479e53> in <module>()
----> 1 v.evalf()

AttributeError: 'Vector' object has no attribute 'evalf'

In [7]: v.to_matrix(A).evalf()
Out[7]:
Matrix([
[  1.68770791746498],
[-0.596007992385184],
[                 0]])


moorepants.info
+01 530-601-9791


On Mon, Oct 1, 2018 at 1:42 PM Jason Moore <moorepa...@gmail.com> wrote:

> I don't think the physics vectors are proper SymPy objects because they
> need to be mutable. evalf() was probably never implemented for them.
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Mon, Oct 1, 2018 at 12:48 PM Aaron Meurer <asmeu...@gmail.com> wrote:
>
>> Can you try it with the latest version (1.3)? If that doesn't work
>> please open an issue in our issue tracker.
>> https://github.com/sympy/sympy/issues/new
>>
>> Aaron Meurer
>> On Mon, Oct 1, 2018 at 12:39 PM scurrier <shaun.curr...@gmail.com> wrote:
>> >
>> > That didn't work for me in SymPy 1.1.1.
>> >
>> > AttributeError: 'Vector' object has no attribute 'evalf'
>> >
>> > --
>> > 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 sympy+unsubscr...@googlegroups.com.
>> > To post to this group, send email to sympy@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/sympy.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sympy/dd78ecd0-d4ab-4bbe-ac6f-85b83daf5022%40googlegroups.com
>> .
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sympy/CAKgW%3D6J7HCjKZHW_hcz7-8F5SW8UF7M8DGWguVynTiSV2Z0krQ%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAP7f1AicRh_zjsSi4GECeeX7EusS5bKcHMHkOzF7fqag%2BF-Q3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to