Skip to content

Commit

Permalink
sagemathgh-38450: fix annotations in sage/matrix/matrix2.pyx and `s…
Browse files Browse the repository at this point in the history
…age/rings/integer.pyx`

    
Fix some annotations issues reported by some CI.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38450
Reported by: David Coudert
Reviewer(s): Kwankyu Lee
  • Loading branch information
Release Manager committed Aug 2, 2024
2 parents 4219d0c + 5e16982 commit f5983c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10548,7 +10548,6 @@ cdef class Matrix(Matrix1):
[ 0 0 5.444401659866974? 5.468660610611130? -0.6827161852283857?]
[ 0 0 0 1.027626039419836? -3.619300149686620?]
[ 0 0 0 0 0.024551430807012?]

sage: Q.conjugate_transpose()*Q
[1.000000000000000? 0.?e-18 0.?e-17 0.?e-16 0.?e-13]
[ 0.?e-18 1.000000000000000? 0.?e-17 0.?e-16 0.?e-13]
Expand Down Expand Up @@ -10583,7 +10582,6 @@ cdef class Matrix(Matrix1):
[ 0.?e-18 + 0.?e-17*I 1.000000000000000? + 0.?e-17*I 0.?e-17 + 0.?e-17*I 0.?e-16 + 0.?e-16*I]
[ 0.?e-17 + 0.?e-17*I 0.?e-17 + 0.?e-17*I 1.000000000000000? + 0.?e-17*I 0.?e-16 + 0.?e-16*I]
[ 0.?e-16 + 0.?e-16*I 0.?e-16 + 0.?e-16*I 0.?e-16 + 0.?e-16*I 1.000000000000000? + 0.?e-16*I]

sage: Q*R - A
[ 0.?e-17 0.?e-17 + 0.?e-17*I 0.?e-16 + 0.?e-16*I 0.?e-16 + 0.?e-16*I]
[ 0.?e-18 0.?e-17 + 0.?e-17*I 0.?e-16 + 0.?e-16*I 0.?e-16 + 0.?e-16*I]
Expand Down
11 changes: 6 additions & 5 deletions src/sage/rings/integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,13 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
Test comparisons with numpy types (see :issue:`13386` and :issue:`18076`)::
sage: import numpy # needs numpy
sage: if int(numpy.version.short_version[0]) > 1: # needs numpy
....: numpy.set_printoptions(legacy="1.25") # needs numpy
sage: numpy.int8('12') == 12 # needs numpy
sage: # needs numpy
sage: import numpy
sage: if int(numpy.version.short_version[0]) > 1:
....: numpy.set_printoptions(legacy="1.25")
sage: numpy.int8('12') == 12
True
sage: 12 == numpy.int8('12') # needs numpy
sage: 12 == numpy.int8('12')
True
sage: float('15') == 15
Expand Down

0 comments on commit f5983c7

Please sign in to comment.