Implement the optional numeric arg mentioned in the docstring.