Skip to content

Commit 4036647

Browse files
authored
Fix the typo
1 parent 11baeed commit 4036647

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sage/rings/padics/local_generic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,10 @@ def _matrix_smith_form(self, M, transformation, integral, exact):
13041304
sage: M.smith_form(transformation=False, exact=False) # indirect doctest
13051305
[O(5^10) O(5^10)]
13061306
[O(5^10) O(5^10)]
1307+
1308+
sage: A = Zp(5)
1309+
sage: matrix(A,[1,1]).smith_form(transformation=False, integral=False, exact=False)
1310+
[1 + O(5^20) O(5^20)]
13071311
"""
13081312
from sage.rings.infinity import infinity
13091313
from .precision_error import PrecisionError
@@ -1460,8 +1464,8 @@ def _matrix_smith_form(self, M, transformation, integral, exact):
14601464
if exact:
14611465
smith[i,i] = self(1)
14621466
else:
1463-
for j in range(n):
1464-
smith[i,j] = smith[i,j] >> v
1467+
for j in range(m):
1468+
smith[i,j] >>= v
14651469
if transformation:
14661470
for i in range(n):
14671471
for j in range(n):

0 commit comments

Comments
 (0)