Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #30108: eq check between scalar fields and mixed forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jung committed Jul 11, 2020
1 parent 3eba4e1 commit aa605ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sage/manifolds/scalarfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,13 @@ def __eq__(self, other):
True
"""
from .mixed_form import MixedForm

if other is self:
return True
if isinstance(other, MixedForm):
# use comparison of MixedForm:
return other == self
if not isinstance(other, ScalarField):
# We try a conversion of other to a scalar field, except if
# other is None (since this would generate an undefined scalar
Expand Down

0 comments on commit aa605ab

Please sign in to comment.