Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Contributors (0.9.0):
- Agriya Khetarpal (AK)
- Oscar Benjamin (OB)
- Daniel Simmons-Marengo (DSM)
- ForeverHaibara (FH)

Changes (0.9.0):

Expand All @@ -196,6 +197,7 @@ Changes (0.9.0):
Faster conversion from `int` to `fmpz` and back. (RO).
- [gh-359](https://github.com/flintlib/python-flint/pull/359),
Sort factorisations of all mpoly types. (OB)
- [gh-374](https://github.com/flintlib/python-flint/pull/374), Fixed a bug in `nmod.__hash__`. (FH)

0.8.0
-----
Expand Down
2 changes: 2 additions & 0 deletions src/flint/test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,8 @@ def test_nmod():
assert G(3,5) == G(8,5)
assert G(1,2) != (1,2)
assert isinstance(hash(G(3, 5)), int)
x = G(1, 7)
assert hash(x) == hash(G(1, 7))
assert raises(lambda: G([], 3), TypeError) # type: ignore
#assert G(3,5) == 8 # do we want this?
#assert 8 == G(3,5)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/nmod.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cdef class nmod(flint_scalar):
return NotImplemented

def __hash__(self):
return hash((int(self.val), self.modulus))
return hash((int(self.val), self.modulus()))

def __bool__(self):
return self.val != 0
Expand Down
Loading