<s> """<STR_LIT>""" <EOL> import unittest <EOL> import numpy as np <EOL> from deltasigma import padt <EOL> class TestPadt ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . tv1 = np . eye ( <NUM_LIT:15> ) <EOL> self . tv2 = np . arange ( <NUM_LIT:10> ) <EOL> self . tv3 = np . array ( [ ] ) <EOL> def test_padt_1 ( self ) : <EOL> """<STR_LIT>""" <EOL> tr = padt ( self . tv1 , n = <NUM_LIT> , val = <NUM_LIT:2> ) <EOL> res = np . concatenate ( ( <NUM_LIT> * np . ones ( ( <NUM_LIT:10> , <NUM_LIT:15> ) ) , self . tv1 ) , axis = <NUM_LIT:0> ) <EOL> self . assertTrue ( np . allclose ( tr , res , atol = <NUM_LIT> , rtol = <NUM_LIT> ) ) <EOL> def test_padt_2 ( self ) : <EOL> """<STR_LIT>""" <EOL> tr = padt ( self . tv2 , n = <NUM_LIT> , val = <NUM_LIT> ) <EOL> res = np . vstack ( ( <NUM_LIT> * np . ones ( ( <NUM_LIT:15> , <NUM_LIT:1> ) ) , self . tv2 . reshape ( ( - <NUM_LIT:1> , <NUM_LIT:1> ) ) ) ) <EOL> self . assertTrue ( np . allclose ( tr , res , atol = <NUM_LIT> , rtol = <NUM_LIT> ) ) <EOL> def test_padt_3 ( self ) : <EOL> """<STR_LIT>""" <EOL> tr = padt ( self . tv3 , n = <NUM_LIT> , val = <NUM_LIT> ) <EOL> res = np . vstack ( ( <NUM_LIT> * np . ones ( ( <NUM_LIT> , <NUM_LIT:1> ) ) , self . tv3 . reshape ( ( - <NUM_LIT:1> , <NUM_LIT:1> ) ) ) ) <EOL> self . assertTrue ( np . allclose ( tr , res , atol = <NUM_LIT> , rtol = <NUM_LIT> ) ) </s>
