Python numpy.polynomial.legendre.legcompanion() Examples

The following are code examples for showing how to use numpy.polynomial.legendre.legcompanion(). 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
Project: LaserTOF   Author: kyleuckert   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 2
Project: LaserTOF   Author: kyleuckert   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 3
Project: LaserTOF   Author: kyleuckert   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 4
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 5
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 6
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 7
Project: recruit   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 8
Project: recruit   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 9
Project: recruit   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 10
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 11
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 12
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 13
Project: FUTU_Stop_Loss   Author: BigtoC   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 14
Project: FUTU_Stop_Loss   Author: BigtoC   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 15
Project: FUTU_Stop_Loss   Author: BigtoC   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 16
Project: MARRtino-2.0   Author: DaniAffCH   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 17
Project: MARRtino-2.0   Author: DaniAffCH   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 18
Project: MARRtino-2.0   Author: DaniAffCH   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 19
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 20
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 21
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 22
Project: vnpy_crypto   Author: birforce   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 23
Project: vnpy_crypto   Author: birforce   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 24
Project: vnpy_crypto   Author: birforce   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 25
Project: ble5-nrf52-mac   Author: tomasero   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 26
Project: ble5-nrf52-mac   Author: tomasero   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 27
Project: ble5-nrf52-mac   Author: tomasero   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 28
Project: Computable   Author: ktraunmueller   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 29
Project: Computable   Author: ktraunmueller   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 30
Project: Computable   Author: ktraunmueller   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 31
Project: poker   Author: surgebiswas   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 32
Project: poker   Author: surgebiswas   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 33
Project: poker   Author: surgebiswas   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 34
Project: P3_image_processing   Author: latedude2   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 35
Project: P3_image_processing   Author: latedude2   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 36
Project: P3_image_processing   Author: latedude2   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 37
Project: GraphicDesignPatternByPython   Author: Relph1119   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 38
Project: GraphicDesignPatternByPython   Author: Relph1119   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 39
Project: GraphicDesignPatternByPython   Author: Relph1119   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 40
Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 41
Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 42
Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 43
Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 44
Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 45
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 46
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 47
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 48
Project: fund   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 49
Project: fund   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 50
Project: fund   Author: Frank-qlu   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 51
Project: pySINDy   Author: luckystarufo   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 52
Project: pySINDy   Author: luckystarufo   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 53
Project: pySINDy   Author: luckystarufo   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 54
Project: Programming-for-Non-Technical-Roles-   Author: PacktPublishing   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 55
Project: Programming-for-Non-Technical-Roles-   Author: PacktPublishing   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 56
Project: Programming-for-Non-Technical-Roles-   Author: PacktPublishing   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 57
Project: linear_neuron   Author: uglyboxer   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 58
Project: linear_neuron   Author: uglyboxer   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 59
Project: linear_neuron   Author: uglyboxer   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 60
Project: facethin   Author: ParkerGod   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 61
Project: facethin   Author: ParkerGod   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 62
Project: facethin   Author: ParkerGod   File: test_legendre.py    GNU General Public License v3.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 63
Project: islam-buddy   Author: hamir   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 64
Project: islam-buddy   Author: hamir   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 65
Project: islam-buddy   Author: hamir   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 66
Project: mxnet-lambda   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 67
Project: mxnet-lambda   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 68
Project: mxnet-lambda   Author: awslabs   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 69
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 70
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 71
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 72
Project: psychrometric-chart-makeover   Author: buds-lab   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 73
Project: psychrometric-chart-makeover   Author: buds-lab   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 74
Project: psychrometric-chart-makeover   Author: buds-lab   File: test_legendre.py    MIT License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 75
Project: wine-ml-on-aws-lambda   Author: pierreant   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 76
Project: wine-ml-on-aws-lambda   Author: pierreant   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 77
Project: wine-ml-on-aws-lambda   Author: pierreant   File: test_legendre.py    Apache License 2.0 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5) 
Example 78
Project: linux-cross-gcc   Author: nmercier   File: test_legendre.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_raises(self):
        assert_raises(ValueError, leg.legcompanion, [])
        assert_raises(ValueError, leg.legcompanion, [1]) 
Example 79
Project: linux-cross-gcc   Author: nmercier   File: test_legendre.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_dimensions(self):
        for i in range(1, 5):
            coef = [0]*i + [1]
            assert_(leg.legcompanion(coef).shape == (i, i)) 
Example 80
Project: linux-cross-gcc   Author: nmercier   File: test_legendre.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_linear_root(self):
        assert_(leg.legcompanion([1, 2])[0, 0] == -.5)