def log1p(data):
if sparse.issparse(data):<EOL><INDENT>return data.log1p()<EOL><DEDENT>else:<EOL><INDENT>return np.log1p(data)<EOL><DEDENT>
Returns ln(data+1), whether the original data is dense or sparse.