What is the difference between is_symbol and is_Symbol?

53 views
Skip to first unread message

Paul Royik

unread,
May 11, 2021, 3:28:29 AM5/11/21
to sympy
What are the cases when one is True, while another is False?

Kalevi Suominen

unread,
May 11, 2021, 8:12:18 AM5/11/21
to sympy
>>> from sympy import Indexed, IndexedBase, Idx, symbols
>>> i, j = symbols('i j', cls=Idx)
>>> Aij = Indexed('A', i, j)
>>> Aij.is_symbol
True
>>> Aij.is_Symbol
False

Aij is not a Symbol but it can be used like one in many cases.

Kalevi Suominen

Paul Royik

unread,
May 11, 2021, 10:24:20 AM5/11/21
to sympy
Got it!

Paul Royik

unread,
May 11, 2021, 10:24:36 AM5/11/21
to sympy
Thank you!

On Tuesday, May 11, 2021 at 3:12:18 PM UTC+3 jks...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages