Jupyter console 5.0.0Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import sympyIn [2]: sympy.__version__
Out[2]: '1.0'
In [3]: sympy.var('Xa,Ya,Za,Xb,Yb,Zb,Na,Nb,Sa,Sb')
Out[3]: (Xa, Ya, Za, Xb, Yb, Zb, Na, Nb, Sa, Sb)
In [4]: Sa=Xa/7In [5]: Sb=Yb**3In [6]: Sa - Sb
Out[6]: Xa/7 - Yb**3
In [7]: NEa=sympy.Matrix([[Xa,Ya,Za]])In [8]: NEb=sympy.Matrix([[Xb,Yb,Zb]])In [9]: NEa - NEb
Out[9]: Matrix([[Xa - Xb, Ya - Yb, Za - Zb]])
In [10]: V=Na-NbIn [11]: V.subs({Na:Sa,Nb:Sb})
Out[11]: Xa/7 - Yb**3
In [12]: V.subs({Na:NEa,Nb:NEb})
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)Long Traceback output follows ending with
AttributeError: ImmutableMatrix has no attribute as_coeff_Mul.