Skip to content

Commit

Permalink
Add unit test for #573
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Dec 8, 2024
1 parent 8fc5309 commit 6be3d86
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/fields/test_squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,15 @@ def test_prime_extension_field_3():
b = x.is_square()
assert np.array_equal(b, [True, True, True, True, True, False, True, False, True, False, False, True, True, False, False, False, False, False, True, True, False, False, True, False, True]) # fmt: skip
assert isinstance(b, np.ndarray)


def test_issue_573():
"""
https://github.com/mhostetter/galois/issues/573
"""
GF = galois.GF(11**2)
squares = GF.squares
square_roots = np.sqrt(squares)

assert np.array_equal(square_roots**2, squares)
assert type(square_roots) is GF

0 comments on commit 6be3d86

Please sign in to comment.