File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ Contributors (0.9.0):
172172- Agriya Khetarpal (AK)
173173- Oscar Benjamin (OB)
174174- Daniel Simmons-Marengo (DSM)
175+ - ForeverHaibara (FH)
175176
176177Changes (0.9.0):
177178
@@ -196,6 +197,7 @@ Changes (0.9.0):
196197 Faster conversion from ` int ` to ` fmpz ` and back. (RO).
197198- [ gh-359 ] ( https://github.com/flintlib/python-flint/pull/359 ) ,
198199 Sort factorisations of all mpoly types. (OB)
200+ - [ gh-374 ] ( https://github.com/flintlib/python-flint/pull/374 ) , Fixed a bug in ` nmod.__hash__ ` . (FH)
199201
2002020.8.0
201203-----
Original file line number Diff line number Diff line change @@ -1382,6 +1382,8 @@ def test_nmod():
13821382 assert G (3 ,5 ) == G (8 ,5 )
13831383 assert G (1 ,2 ) != (1 ,2 )
13841384 assert isinstance (hash (G (3 , 5 )), int )
1385+ x = G (1 , 7 )
1386+ assert hash (x ) == hash (G (1 , 7 ))
13851387 assert raises (lambda : G ([], 3 ), TypeError ) # type: ignore
13861388 #assert G(3,5) == 8 # do we want this?
13871389 #assert 8 == G(3,5)
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ cdef class nmod(flint_scalar):
9494 return NotImplemented
9595
9696 def __hash__ (self ):
97- return hash ((int (self .val), self .modulus))
97+ return hash ((int (self .val), self .modulus() ))
9898
9999 def __bool__ (self ):
100100 return self .val != 0
You can’t perform that action at this time.
0 commit comments