#NEWLINE# def constant_regression( x ) : #NEWLINE# #INDENT# '\n    Zero order polynomial (constant, p = 1) regression model.\n    x --> f(x) = 1\n    ' #NEWLINE# x = np . asarray ( x , dtype = np . float ) #NEWLINE# n_eval = x . shape [ 0 ] #NEWLINE# f = np . ones ( [ n_eval , 1 ] ) #NEWLINE# return n_eval