parameters: (self)
return_statement: return max_size
docstring: The maximum number of non zero ⟨x|O|x'⟩ for every x.
docstring_summary: The maximum number of non zero ⟨x|O|x'⟩ for every x.
docstring_tokens: The maximum number of non zero ⟨x|O|x ⟩ for every x .
function: def max_conn_size(self) -> int:
          """The maximum number of non zero ⟨x|O|x'⟩ for every x."""
          max_size = self.n_operators if self._nonzero_diagonal else 0
          for op in self._operators:
              nnz_mat = np.abs(op) > self.mel_cutoff
              nnz_mat[np.diag_indices(nnz_mat.shape[0])] = False
              nnz_rows = np.sum(nnz_mat, axis=1)
              max_size += np.max(nnz_rows)
  
          return max_size
function_tokens: def max_conn_size ( self ) -> int : max_size = self . n_operators if self . _nonzero_diagonal else 0 for op in self . _operators : nnz_mat = np . abs ( op ) > self . mel_cutoff nnz_mat [ np . diag_indices ( nnz_mat . shape [ 0 ] ) ] = False nnz_rows = np . sum ( nnz_mat , axis = 1 ) max_size += np . max ( nnz_rows ) return max_size