Python numpy.polynomial.polynomial.polycompanion() Examples

The following are code examples for showing how to use numpy.polynomial.polynomial.polycompanion(). 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_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 2
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 3
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 4
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 5
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 6
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 7
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 8
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 9
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 10
 Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 11
 Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 12
 Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 13
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 14
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 15
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 16
 Project: MARRtino-2.0   Author: DaniAffCH   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 17
 Project: MARRtino-2.0   Author: DaniAffCH   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 18
 Project: MARRtino-2.0   Author: DaniAffCH   File: test_polynomial.py    GNU General Public License v3.0 5 votes
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 19
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 20
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 21
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 22
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 23
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 24
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 25
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 26
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 27
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 28
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 29
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 30
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 31
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 32
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 33
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 34
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 35
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 36
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 37
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 38
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 39
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 40
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 5 votes
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 41
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 5 votes
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 42
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 5 votes
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 43
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 5 votes
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 44
 Project: 3dprinteros-client   Author: panasevychol   File: test_polynomial.py    GNU Affero General Public License v3.0 5 votes
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 45
```def test_raises(self):
assert_raises(ValueError, poly.polycompanion, [])
assert_raises(ValueError, poly.polycompanion, [1]) ```
Example 46
```def test_dimensions(self):
for i in range(1, 5):
coef = [0]*i + [1]
assert_(poly.polycompanion(coef).shape == (i, i)) ```
Example 47
```def test_linear_root(self):
assert_(poly.polycompanion([1, 2])[0, 0] == -.5) ```
Example 48
```def test_raises(self):
```def test_dimensions(self):
```def test_linear_root(self):