Skip to content

Commit 789ad00

Browse files
author
Jake Moss
committed
Reverse changes to fmpz_vec
1 parent c08fdb0 commit 789ad00

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/flint/types/fmpz_vec.pyx

+4-7
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,11 @@ cdef class fmpz_vec:
5555
elif not 0 <= x < self.length:
5656
raise IndexError("index out of range")
5757

58-
if typecheck(y, fmpz_mod):
59-
fmpz_set(&self.val[x], (<fmpz_mod>y).val)
60-
else:
61-
y = any_as_fmpz(y)
62-
if y is NotImplemented:
63-
raise TypeError("argument is not coercible to fmpz")
58+
y = any_as_fmpz(y)
59+
if y is NotImplemented:
60+
raise TypeError("argument is not coercible to fmpz")
6461

65-
fmpz_set(&self.val[x], (<fmpz>y).val)
62+
fmpz_set(&self.val[x], (<fmpz>y).val)
6663

6764
def __len__(self):
6865
return self.length

0 commit comments

Comments
 (0)