<s> """<STR_LIT>""" <EOL> import numpy as np <EOL> def padt ( x , n , val = <NUM_LIT:0.> ) : <EOL> """<STR_LIT>""" <EOL> if len ( x . shape ) == <NUM_LIT:1> : <EOL> xp = x . reshape ( ( x . shape [ <NUM_LIT:0> ] , <NUM_LIT:1> ) ) <EOL> else : <EOL> xp = x <EOL> y = np . concatenate ( <EOL> ( val * np . ones ( ( n - xp . shape [ <NUM_LIT:0> ] , xp . shape [ <NUM_LIT:1> ] ) ) , <EOL> xp <EOL> ) , axis = <NUM_LIT:0> <EOL> ) <EOL> return y </s>
