#NEWLINE# def nanarg_agg( func , argfunc , data , axis = None , **kwargs ) : #NEWLINE# #INDENT# ( arg , vals ) = _arg_combine ( data , axis , argfunc , keepdims = False ) #NEWLINE# if np . any ( np . isnan ( vals ) ) : #NEWLINE# #INDENT# raise ValueError ( 'All NaN slice encountered' ) #NEWLINE# #UNINDENT# return axis