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

Commit

Permalink
trac 33697: equality of SR vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveWitteMorris committed Apr 12, 2022
1 parent 57fd20c commit d7d7bda
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/sage/modules/free_module_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1754,12 +1754,23 @@ cdef class FreeModuleElement(Vector): # abstract base class
True
sage: vector(F, [0,0,0,0]) == vector(F, [0,2,0,y])
False
Verify that :trac:`33697` is fixed::
sage: v = vector(SR, [x])
sage: w = vector(SR, [1])
sage: v == w
False
sage: assume(x > 0)
sage: v == w
False
sage: forget()
"""
cdef Py_ssize_t i
for i in range(left._degree):
lx = left[i]
rx = right[i]
if lx != rx:
if not(lx == rx):
return richcmp_not_equal(lx, rx, op)
return rich_to_bool(op, 0)

Expand Down

0 comments on commit d7d7bda

Please sign in to comment.