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

Commit

Permalink
Trac #30239: comp zero check for __call__
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jung committed Jul 28, 2020
1 parent ddaba54 commit 51ba4e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/tensor/modules/free_module_tensor.py
Expand Up @@ -2365,6 +2365,8 @@ def __call__(self, *args):
raise ValueError("no common basis for the components")
omega = self._components[basis]
vv = vector._components[basis]
if omega == 0 or vv == 0:
return self.base_ring().zero()
resu = 0
for i in fmodule.irange():
resu += omega[[i]]*vv[[i]]
Expand Down

0 comments on commit 51ba4e3

Please sign in to comment.