# Python numpy.polynomial.polynomial.polydiv() Examples

The following are code examples for showing how to use numpy.polynomial.polynomial.polydiv(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 2
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 3
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 4
 Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 5
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 6
 Project: MARRtino-2.0   Author: DaniAffCH   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 7
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 8
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 9
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 10
```def test_polydiv(self) :
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5) :
for j in range(5) :
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 11
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 12
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 13
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 14
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 15
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 16
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 17
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 18
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 19
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 20
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 21
 Project: facethin   Author: ParkerGod   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 22
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 23
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 24
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 25
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 26
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 27
 Project: linux-cross-gcc   Author: nmercier   File: test_polynomial.py    BSD 3-Clause "New" or "Revised" License 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 28
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 29
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 30
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 31
 Project: honours_project   Author: JFriel   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 32
 Project: honours_project   Author: JFriel   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 33
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 34
 Project: PYPIC   Author: max614   File: test_polynomial.py    BSD 2-Clause "Simplified" License 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 35
 Project: PYPIC   Author: max614   File: test_polynomial.py    BSD 2-Clause "Simplified" License 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 36
 Project: PYPIC   Author: max614   File: test_polynomial.py    BSD 2-Clause "Simplified" License 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 37
 Project: senior-design   Author: james-tate   File: test_polynomial.py    GNU General Public License v2.0 6 votes
```def test_polydiv(self) :
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2],[2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2,2],[2])
assert_equal((quo, rem), ((1,1), 0))

# check rest.
for i in range(5) :
for j in range(5) :
msg = "At i=%d, j=%d" % (i,j)
ci = [0]*i + [1,2]
cj = [0]*j + [1,2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 38
 Project: offlow   Author: satwikkansal   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 39
 Project: lambda-tensorflow-object-detection   Author: mikylucky   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 40
 Project: elasticintel   Author: securityclippy   File: test_polynomial.py    GNU General Public License v3.0 6 votes
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 41
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 42
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
quo, rem = poly.polydiv(tgt, ci)
assert_equal(res, tgt, err_msg=msg) ```
Example 43
```def test_polydiv(self):
# check zero division
assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])

# check scalar division
quo, rem = poly.polydiv([2], [2])
assert_equal((quo, rem), (1, 0))
quo, rem = poly.polydiv([2, 2], [2])
assert_equal((quo, rem), ((1, 1), 0))

# check rest.
for i in range(5):
for j in range(5):
msg = "At i=%d, j=%d" % (i, j)
ci = [0]*i + [1, 2]
cj = [0]*j + [1, 2]
```def gcd1(c1,c2):