Error in sympy 1.2 python3 version

37 views
Skip to first unread message

abromb...@gmail.com

unread,
Jul 29, 2018, 1:15:30 AM7/29/18
to sympy
I am converting my code from python 2.7 to python 3.  When I do this I get the following error message -

Traceback (most recent call last):
  File "lin_tran_check.py", line 161, in <module>
    main()
  File "lin_tran_check.py", line 36, in main
    A = o3d.lt('A')
  File "/home/brombo/galgebra-master/galgebra/ga.py", line 522, in lt
    return lt.Lt(*kargs, **kwargs)
  File "/home/brombo/galgebra-master/galgebra/lt.py", line 214, in __init__
    self.__init__(Amat, ga=self.Ga)
  File "/home/brombo/galgebra-master/galgebra/lt.py", line 198, in __init__
    self.lt_dict = Matrix_to_dictionary(mat_rep, self.Ga.basis)
  File "/home/brombo/galgebra-master/galgebra/lt.py", line 91, in Matrix_to_dictionary
    dict_rep[basis[row]] += mat_rep[row,col]*basis[col]
  File "/usr/local/lib/python3.5/dist-packages/sympy-1.2-py3.5.egg/sympy/matrices/expressions/matexpr.py", line 298, in __getitem__
    return self._entry(i, j)
  File "/usr/local/lib/python3.5/dist-packages/sympy-1.2-py3.5.egg/sympy/matrices/expressions/transpose.py", line 54, in _entry
    return self.arg._entry(j, i, expand=expand)
TypeError: _entry() got an unexpected keyword argument 'expand'

In my python 3 version accessing the matrix element "mat_rep[row,col]" gives the above error trace.  In this case the statement is the same
in my 2.7 version as well as my 3 version, but the 2.7 version gives no error trace.  Do you have any idea what is wrong?

Aaron Meurer

unread,
Jul 30, 2018, 3:08:46 PM7/30/18
to sy...@googlegroups.com
I'm not sure why it would only show up in Python 3, but grepping the
code shows several _entry function definitions that don't have the
expand keyword argument.

Aaron Meurer
> --
> 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+un...@googlegroups.com.
> To post to this group, send email to sy...@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/544b14cb-cb38-48d1-ae76-33e96abc5f74%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages