def cumsum(self, axis=<NUM_LIT:0>, *args, **kwargs):
nv.validate_cumsum(args, kwargs)<EOL>if axis is not None and axis >= self.ndim:  <EOL><INDENT>raise ValueError("<STR_LIT>".format(axis=axis))<EOL><DEDENT>if not self._null_fill_value:<EOL><INDENT>return SparseArray(self.to_dense()).cumsum()<EOL><DEDENT>return SparseArray(self.sp_values.cumsum(), sparse_index=self.sp_index,<EOL>fill_value=self.fill_value)<EOL>
Cumulative sum of non-NA/null values.

When performing the cumulative summation, any non-NA/null values will
be skipped. The resulting SparseArray will preserve the locations of
NaN values, but the fill value will be `np.nan` regardless.

Parameters
----------
axis : int or None
    Axis over which to perform the cumulative summation. If None,
    perform cumulative summation over flattened array.

Returns
-------
cumsum : SparseArray