#NEWLINE# def stacksquare( self , a = None , name = 'ar' , orientation = 'vertical' ) : #NEWLINE# #INDENT# 'stack lagpolynomial vertically in 2d square array with eye\n\n        ' #NEWLINE# if ( not ( a is None ) ) : #NEWLINE# #INDENT# a = astacked #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'ar' ) : #NEWLINE# #INDENT# a = self . ar #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'ma' ) : #NEWLINE# #INDENT# a = self . ma #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'no array or name given' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# astacked = a . reshape ( ( - 1 ) , self . nvarall ) #NEWLINE# ( lenpk , nvars ) = astacked . shape #NEWLINE# amat = np . eye ( lenpk , k = nvars ) #NEWLINE# amat [ : , : nvars ] = astacked #NEWLINE# return amat