def __init__(self, A, a=1.0, dtype=None, copy=False):
    'Initializes `expm_multiply_parallel`. \n\n        Parameters\n        -----------\n        A : {array_like, scipy.sparse matrix}\n            The operator (matrix) whose exponential is to be calculated.\n        a : scalar, optional\n            scalar value multiplying generator matrix :math:`A` in matrix exponential: :math:`\\mathrm{e}^{aA}`.\n        dtype : numpy.dtype, optional\n            data type specified for the total operator :math:`\\mathrm{e}^{aA}`. Default is: `numpy.result_type(A.dtype,min_scalar_type(a),float64)`.\n        copy : bool, optional\n            if `True` the matrix is copied otherwise the matrix is stored by reference. \n\n        '
    if (_np.array(a).ndim == 0):
        self._a = a
    else:
        raise ValueError('a must be scalar value.')
    self._A = _sp.csr_matrix(A, copy=copy)
    if (A.shape[0] != A.shape[1]):
        raise ValueError('A must be a square matrix.')
    a_dtype_min = _np.min_scalar_type(self._a)
    if (dtype is None):
        self._dtype = _np.result_type(A.dtype, a_dtype_min, _np.float64)
    else:
        min_dtype = _np.result_type(A.dtype, a_dtype_min, _np.float32)
        if (not _np.can_cast(min_dtype, dtype)):
            raise ValueError('dtype not sufficient to represent a*A to at least float32 precision.')
        self._dtype = dtype
    tol = (_np.finfo(self._dtype).eps / 2)
    tol_dtype = _np.finfo(self._dtype).eps.dtype
    self._tol = _np.array(tol, dtype=tol_dtype)
    mu = (_wrapper_csr_trace(self._A.indptr, self._A.indices, self._A.data) / self._A.shape[0])
    self._mu = _np.array(mu, dtype=self._dtype)
    self._A_1_norm = _wrapper_csr_1_norm(self._A.indptr, self._A.indices, self._A.data, self._mu)
    self._calculate_partition()
Initializes `expm_multiply_parallel`. 

Parameters
-----------
A : {array_like, scipy.sparse matrix}
    The operator (matrix) whose exponential is to be calculated.
a : scalar, optional
    scalar value multiplying generator matrix :math:`A` in matrix exponential: :math:`\mathrm{e}^{aA}`.
dtype : numpy.dtype, optional
    data type specified for the total operator :math:`\mathrm{e}^{aA}`. Default is: `numpy.result_type(A.dtype,min_scalar_type(a),float64)`.
copy : bool, optional
    if `True` the matrix is copied otherwise the matrix is stored by reference.
def __init__(self, A, a=1.0, dtype=None, copy=False):
    'Initializes `expm_multiply_parallel`. \n\n        Parameters\n        -----------\n        A : {array_like, scipy.sparse matrix}\n            The operator (matrix) whose exponential is to be calculated.\n        a : scalar, optional\n            scalar value multiplying generator matrix :math:`A` in matrix exponential: :math:`\\mathrm{e}^{aA}`.\n        dtype : numpy.dtype, optional\n            data type specified for the total operator :math:`\\mathrm{e}^{aA}`. Default is: `numpy.result_type(A.dtype,min_scalar_type(a),float64)`.\n        copy : bool, optional\n            if `True` the matrix is copied otherwise the matrix is stored by reference. \n\n        '
    if (_np.array(a).ndim == 0):
        self._a = a
    else:
        raise ValueError('a must be scalar value.')
    self._A = _sp.csr_matrix(A, copy=copy)
    if (A.shape[0] != A.shape[1]):
        raise ValueError('A must be a square matrix.')
    a_dtype_min = _np.min_scalar_type(self._a)
    if (dtype is None):
        self._dtype = _np.result_type(A.dtype, a_dtype_min, _np.float64)
    else:
        min_dtype = _np.result_type(A.dtype, a_dtype_min, _np.float32)
        if (not _np.can_cast(min_dtype, dtype)):
            raise ValueError('dtype not sufficient to represent a*A to at least float32 precision.')
        self._dtype = dtype
    tol = (_np.finfo(self._dtype).eps / 2)
    tol_dtype = _np.finfo(self._dtype).eps.dtype
    self._tol = _np.array(tol, dtype=tol_dtype)
    mu = (_wrapper_csr_trace(self._A.indptr, self._A.indices, self._A.data) / self._A.shape[0])
    self._mu = _np.array(mu, dtype=self._dtype)
    self._A_1_norm = _wrapper_csr_1_norm(self._A.indptr, self._A.indices, self._A.data, self._mu)
    self._calculate_partition()