def dot(self, v, work_array=None, overwrite_v=False):
    'Calculates the action of :math:`\\mathrm{e}^{aA}` on a vector :math:`v`. \n\n        Examples\n        --------\n\n        .. literalinclude:: ../../doc_examples/expm_multiply_parallel-example.py\n            :linenos:\n            :language: python\n            :lines: 37-\n\n        Parameters\n        -----------\n        v : contiguous numpy.ndarray\n            array to apply :math:`\\mathrm{e}^{aA}` on.\n        work_array : contiguous numpy.ndarray, optional\n            array of `shape = (2*len(v),)` which is used as work_array space for the underlying c-code. This saves extra memory allocation for function operations.\n        overwrite_v : bool\n            if set to `True`, the data in `v` is overwritten by the function. This saves extra memory allocation for the results.\n\n        Returns\n        --------\n        numpy.ndarray\n            result of :math:`\\mathrm{e}^{aA}v`. \n\n            If `overwrite_v = True` the dunction returns `v` with the data overwritten, otherwise the result is stored in a new array.  \n\n        '
    v = _np.asarray(v)
    if (v.ndim != 1):
        raise ValueError('array must have ndim of 1.')
    if (v.shape[0] != self._A.shape[1]):
        raise ValueError('dimension mismatch {}, {}'.format(self._A.shape, v.shape))
    v_dtype = _np.result_type(self._dtype, v.dtype)
    if overwrite_v:
        if (v_dtype != v.dtype):
            raise ValueError('if overwrite_v is True, the input array must match correct output dtype for matrix multiplication.')
        if (not v.flags['CARRAY']):
            raise TypeError('input array must a contiguous and writable.')
        if (v.ndim != 1):
            raise ValueError('array must have ndim of 1.')
    else:
        v = v.astype(v_dtype, order='C', copy=True)
    if (work_array is None):
        work_array = _np.zeros(((2 * self._A.shape[0]),), dtype=v.dtype)
    else:
        work_array = _np.ascontiguousarray(work_array)
        if (work_array.shape != ((2 * self._A.shape[0]),)):
            raise ValueError('work_array array must be an array of shape (2*v.shape[0],) with same dtype as v.')
        if (work_array.dtype != v_dtype):
            raise ValueError('work_array must be array of dtype which matches the result of the matrix-vector multiplication.')
    a = _np.array(self._a, dtype=v_dtype)
    mu = _np.array(self._mu, dtype=v_dtype)
    tol = _np.array(self._tol, dtype=mu.real.dtype)
    _wrapper_expm_multiply(self._A.indptr, self._A.indices, self._A.data, self._s, self._m_star, a, tol, mu, v, work_array)
    return v
Calculates the action of :math:`\mathrm{e}^{aA}` on a vector :math:`v`. 

Examples
--------

.. literalinclude:: ../../doc_examples/expm_multiply_parallel-example.py
    :linenos:
    :language: python
    :lines: 37-

Parameters
-----------
v : contiguous numpy.ndarray
    array to apply :math:`\mathrm{e}^{aA}` on.
work_array : contiguous numpy.ndarray, optional
    array of `shape = (2*len(v),)` which is used as work_array space for the underlying c-code. This saves extra memory allocation for function operations.
overwrite_v : bool
    if set to `True`, the data in `v` is overwritten by the function. This saves extra memory allocation for the results.

Returns
--------
numpy.ndarray
    result of :math:`\mathrm{e}^{aA}v`. 

    If `overwrite_v = True` the dunction returns `v` with the data overwritten, otherwise the result is stored in a new array.
def dot(self, v, work_array=None, overwrite_v=False):
    'Calculates the action of :math:`\\mathrm{e}^{aA}` on a vector :math:`v`. \n\n        Examples\n        --------\n\n        .. literalinclude:: ../../doc_examples/expm_multiply_parallel-example.py\n            :linenos:\n            :language: python\n            :lines: 37-\n\n        Parameters\n        -----------\n        v : contiguous numpy.ndarray\n            array to apply :math:`\\mathrm{e}^{aA}` on.\n        work_array : contiguous numpy.ndarray, optional\n            array of `shape = (2*len(v),)` which is used as work_array space for the underlying c-code. This saves extra memory allocation for function operations.\n        overwrite_v : bool\n            if set to `True`, the data in `v` is overwritten by the function. This saves extra memory allocation for the results.\n\n        Returns\n        --------\n        numpy.ndarray\n            result of :math:`\\mathrm{e}^{aA}v`. \n\n            If `overwrite_v = True` the dunction returns `v` with the data overwritten, otherwise the result is stored in a new array.  \n\n        '
    v = _np.asarray(v)
    if (v.ndim != 1):
        raise ValueError('array must have ndim of 1.')
    if (v.shape[0] != self._A.shape[1]):
        raise ValueError('dimension mismatch {}, {}'.format(self._A.shape, v.shape))
    v_dtype = _np.result_type(self._dtype, v.dtype)
    if overwrite_v:
        if (v_dtype != v.dtype):
            raise ValueError('if overwrite_v is True, the input array must match correct output dtype for matrix multiplication.')
        if (not v.flags['CARRAY']):
            raise TypeError('input array must a contiguous and writable.')
        if (v.ndim != 1):
            raise ValueError('array must have ndim of 1.')
    else:
        v = v.astype(v_dtype, order='C', copy=True)
    if (work_array is None):
        work_array = _np.zeros(((2 * self._A.shape[0]),), dtype=v.dtype)
    else:
        work_array = _np.ascontiguousarray(work_array)
        if (work_array.shape != ((2 * self._A.shape[0]),)):
            raise ValueError('work_array array must be an array of shape (2*v.shape[0],) with same dtype as v.')
        if (work_array.dtype != v_dtype):
            raise ValueError('work_array must be array of dtype which matches the result of the matrix-vector multiplication.')
    a = _np.array(self._a, dtype=v_dtype)
    mu = _np.array(self._mu, dtype=v_dtype)
    tol = _np.array(self._tol, dtype=mu.real.dtype)
    _wrapper_expm_multiply(self._A.indptr, self._A.indices, self._A.data, self._s, self._m_star, a, tol, mu, v, work_array)
    return v