def arccosine(x, null=(-np.inf, np.inf)):
if sps.issparse(x): x = x.toarray()<EOL>else:               x = np.asarray(x)<EOL>try:    (nln,nlp) = null<EOL>except Exception: (nln,nlp) = (null,null)<EOL>ii = None if nln is None else np.where(x < -<NUM_LIT:1>)<EOL>jj = None if nlp is None else np.where(x > <NUM_LIT:1>)<EOL>if ii: x[ii] = <NUM_LIT:0><EOL>if jj: x[jj] = <NUM_LIT:0><EOL>x = np.arccos(x)<EOL>if ii: x[ii] = nln<EOL>if jj: x[jj] = nlp<EOL>return x<EOL>
arccosine(x) is equivalent to acos(x) except that it also works on sparse arrays.

The optional argument null (default, (-numpy.inf, numpy.inf)) may be specified to indicate what
value(s) should be assigned when x < -1 or x > 1. If only one number is given, then it is used
for both values; otherwise the first value corresponds to <-1 and the second to >1.  If null is
None, then an error is raised when invalid values are encountered.