parameters: (X, axis, last_mean, last_var, last_n)
docstring: Compute incremental mean and variance along an axix on a CSR or
      CSC matrix.
  
      last_mean, last_var are the statistics computed at the last step by this
      function. Both must be initialized to 0-arrays of the proper size, i.e.
      the number of features in X. last_n is the number of samples encountered
      until now.
  
      Parameters
      ----------
      X : CSR or CSC sparse matrix, shape (n_samples, n_features)
          Input data.
  
      axis : int (either 0 or 1)
          Axis along which the axis should be computed.
  
      last_mean : float array with shape (n_features,)
          Array of feature-wise means to update with the new data X.
  
      last_var : float array with shape (n_features,)
          Array of feature-wise var to update with the new data X.
  
      last_n : int with shape (n_features,)
          Number of samples seen so far, excluded X.
  
      Returns
      -------
  
      means : float array with shape (n_features,)
          Updated feature-wise means.
  
      variances : float array with shape (n_features,)
          Updated feature-wise variances.
  
      n : int with shape (n_features,)
          Updated number of seen samples.
  
      Notes
      -----
      NaNs are ignored in the algorithm.
docstring_summary: Compute incremental mean and variance along an axix on a CSR or
      CSC matrix.
docstring_tokens: Compute incremental mean and variance along an axix on a CSR or CSC matrix .
function: def incr_mean_variance_axis(X, axis, last_mean, last_var, last_n):
      """Compute incremental mean and variance along an axix on a CSR or
      CSC matrix.
  
      last_mean, last_var are the statistics computed at the last step by this
      function. Both must be initialized to 0-arrays of the proper size, i.e.
      the number of features in X. last_n is the number of samples encountered
      until now.
  
      Parameters
      ----------
      X : CSR or CSC sparse matrix, shape (n_samples, n_features)
          Input data.
  
      axis : int (either 0 or 1)
          Axis along which the axis should be computed.
  
      last_mean : float array with shape (n_features,)
          Array of feature-wise means to update with the new data X.
  
      last_var : float array with shape (n_features,)
          Array of feature-wise var to update with the new data X.
  
      last_n : int with shape (n_features,)
          Number of samples seen so far, excluded X.
  
      Returns
      -------
  
      means : float array with shape (n_features,)
          Updated feature-wise means.
  
      variances : float array with shape (n_features,)
          Updated feature-wise variances.
  
      n : int with shape (n_features,)
          Updated number of seen samples.
  
      Notes
      -----
      NaNs are ignored in the algorithm.
  
      """
      _raise_error_wrong_axis(axis)
  
      if isinstance(X, sp.csr_matrix):
          if axis == 0:
              return _incr_mean_var_axis0(X, last_mean=last_mean,
                                          last_var=last_var, last_n=last_n)
          else:
              return _incr_mean_var_axis0(X.T, last_mean=last_mean,
                                          last_var=last_var, last_n=last_n)
      elif isinstance(X, sp.csc_matrix):
          if axis == 0:
              return _incr_mean_var_axis0(X, last_mean=last_mean,
                                          last_var=last_var, last_n=last_n)
          else:
              return _incr_mean_var_axis0(X.T, last_mean=last_mean,
                                          last_var=last_var, last_n=last_n)
      else:
          _raise_typeerror(X)
function_tokens: def incr_mean_variance_axis ( X , axis , last_mean , last_var , last_n ) : _raise_error_wrong_axis ( axis ) if isinstance ( X , sp . csr_matrix ) : if axis == 0 : return _incr_mean_var_axis0 ( X , last_mean = last_mean , last_var = last_var , last_n = last_n ) else : return _incr_mean_var_axis0 ( X . T , last_mean = last_mean , last_var = last_var , last_n = last_n ) elif isinstance ( X , sp . csc_matrix ) : if axis == 0 : return _incr_mean_var_axis0 ( X , last_mean = last_mean , last_var = last_var , last_n = last_n ) else : return _incr_mean_var_axis0 ( X . T , last_mean = last_mean , last_var = last_var , last_n = last_n ) else : _raise_typeerror ( X )