def argmax(a, axis=None, fill_value=None):
if fill_value is None:<EOL><INDENT>fill_value = default_fill_value(a)<EOL>try:<EOL><INDENT>fill_value = -fill_value<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>d = filled(a, fill_value)<EOL>return d.argmax(axis=axis)<EOL>
Function version of the eponymous method.