We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c08fdb0 commit 789ad00Copy full SHA for 789ad00
src/flint/types/fmpz_vec.pyx
@@ -55,14 +55,11 @@ cdef class fmpz_vec:
55
elif not 0 <= x < self.length:
56
raise IndexError("index out of range")
57
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")
+ y = any_as_fmpz(y)
+ if y is NotImplemented:
+ raise TypeError("argument is not coercible to fmpz")
64
65
- fmpz_set(&self.val[x], (<fmpz>y).val)
+ fmpz_set(&self.val[x], (<fmpz>y).val)
66
67
def __len__(self):
68
return self.length
0 commit comments