Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equality test between Dict and dict does not pass #16984

Closed
kangzhiq opened this issue Jun 6, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@kangzhiq
Copy link
Contributor

commented Jun 6, 2019

The equality test beween a Dict object and a dict object does not pass. I ran into this issue while manipulating the dictionaries in Sparse Array module.

>>> from sympy import Dict
>>> a = Dict({1:3,2:4})
>>> b = {1:3,2:4}
>>> a == b
False

For comparison, the contrainer Tuple can handle this equality test:

>>> from sympy import Tuple
>>> a = Tuple(1, 2, 3, 4)
>>> b = (1, 2, 3, 4)
>>> a == b
True
@smichr

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

This has been solved in the current master:

>>> a = Dict({1:3,2:4})
>>> b = {1:3,2:4}
>>> a == b
True

@smichr smichr added the Could Close label Jun 7, 2019

@smichr smichr closed this Jun 7, 2019

@kangzhiq

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2019

Ah ok, I didn't know it. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.