Leaklens

sympy__sympy-12419

Sum of the elements of an identity matrix is zero

Verdict: the fix is stated in the issue (Tier A).

OK, it's the `_entry` method of the `Identity` that is the culprit: ``` def _entry(self, i, j): if i == j: return S.One else: return S.Zero ``` This should just return `KroneckerDelta(i, j)`.

The text states the fix: “OK, it's the `_entry` method of the `Identity` that is the culprit: ``` def _entry(self, i, j): if i == j: return S.One else: return S.Zero ``` This should just return `…”

All SWE-bench Verified tasks · more sympy/sympy tasks · How the check works