#NEWLINE# def perform( self , node , inputs , output_storage ) : #NEWLINE# #INDENT# '\n        .. todo::\n\n            WRITEME\n        ' #NEWLINE# ( x , new_length , nonconstants ) = inputs #NEWLINE# nonconstant_set = set ( nonconstants ) #NEWLINE# constant = sorted ( ( set ( xrange ( new_length ) ) - nonconstant_set ) ) #NEWLINE# assert ( x . shape [ self . axis ] == len ( nonconstant_set ) ) , ( 'x.shape[%d] != len(set(nonconstants))' % self . axis ) #NEWLINE# assert ( new_length >= x . shape [ new_length . axis ] ) , 'number of items along axis in new array is less than old array' #NEWLINE# new_shape = ( ( x . shape [ : self . axis ] + ( int ( new_length ) , ) ) + x . shape [ ( self . axis + 1 ) : ] ) #NEWLINE# z = output_storage [ 0 ] [ 0 ] = np . empty ( new_shape , dtype = x . dtype ) #NEWLINE# z [ index_along_axis ( nonconstants , self . ndim , self . axis ) ] = x #NEWLINE# z [ index_along_axis ( constant , self . ndim , self . axis ) ] = self . fill