#NEWLINE# def _fprime( score , x , k_params , alpha ) : #NEWLINE# #INDENT# '\n    The regularized derivative.\n    ' #NEWLINE# x_arr = np . asarray ( x ) #NEWLINE# params = x_arr [ : k_params ] . ravel ( ) #NEWLINE# fprime_arr = np . append ( score ( params ) , x ) #NEWLINE# return matrix ( fprime_arr , ( 1 , ( 2 * k_params ) ) )