original_docstring: 
      Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
       (see Warren & Dye 2003) via a sparse preload matrix, which has already mapped out where all non-zero entries
       and multiplications take place.
  
      This is used for models where the blurred mapping matrix does not change, but the noise-map of the values that
      are used to construct that blurred mapping matrix do change.
  
      Parameters
      -----------
      mapping_matrix
          The matrix representing the mappings (these could be blurred or transfomed) between sub-grid pixels and
          pixelization pixels.
      noise_map
          Flattened 1D array of the noise-map used by the inversion during the fit.
      
docstring: Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
  via a sparse preload matrix, which has already mapped out where all non-zero entries
  and multiplications take place.
  
  This is used for models where the blurred mapping matrix does not change, but the noise-map of the values that
  are used to construct that blurred mapping matrix do change.
  
  Parameters
  
  mapping_matrix
  The matrix representing the mappings (these could be blurred or transfomed) between sub-grid pixels and
  pixelization pixels.
  noise_map
  Flattened 1D array of the noise-map used by the inversion during the fit.
docstring_tokens: Returns the curvature matrix ` F ` from a blurred mapping matrix ` f ` and the 1D noise - map $ \ sigma$ via a sparse preload matrix which has already mapped out where all non - zero entries and multiplications take place . This is used for models where the blurred mapping matrix does not change but the noise - map of the values that are used to construct that blurred mapping matrix do change . Parameters mapping_matrix The matrix representing the mappings ( these could be blurred or transfomed ) between sub - grid pixels and pixelization pixels . noise_map Flattened 1D array of the noise - map used by the inversion during the fit .
code: def curvature_matrix_via_sparse_preload_from(
      mapping_matrix: np.ndarray,
      noise_map: np.ndarray,
      curvature_matrix_preload,
      curvature_matrix_counts,
  ) -> np.ndarray:
      """
      Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
       (see Warren & Dye 2003) via a sparse preload matrix, which has already mapped out where all non-zero entries
       and multiplications take place.
  
      This is used for models where the blurred mapping matrix does not change, but the noise-map of the values that
      are used to construct that blurred mapping matrix do change.
  
      Parameters
      -----------
      mapping_matrix
          The matrix representing the mappings (these could be blurred or transfomed) between sub-grid pixels and
          pixelization pixels.
      noise_map
          Flattened 1D array of the noise-map used by the inversion during the fit.
      """
      curvature_matrix = np.zeros((mapping_matrix.shape[1], mapping_matrix.shape[1]))
  
      for mask_1d_index in range(mapping_matrix.shape[0]):
  
          total_pix = curvature_matrix_counts[mask_1d_index]
  
          for preload_index_0 in range(total_pix):
              for preload_index_1 in range(
                  preload_index_0, curvature_matrix_counts[mask_1d_index]
              ):
  
                  pix_index_0 = curvature_matrix_preload[mask_1d_index, preload_index_0]
                  pix_index_1 = curvature_matrix_preload[mask_1d_index, preload_index_1]
  
                  curvature_matrix[pix_index_0, pix_index_1] += (
                      mapping_matrix[mask_1d_index, pix_index_0]
                      * mapping_matrix[mask_1d_index, pix_index_1]
                  ) / noise_map[mask_1d_index] ** 2
  
      for i in range(mapping_matrix.shape[1]):
          for j in range(mapping_matrix.shape[1]):
              curvature_matrix[j, i] = curvature_matrix[i, j]
  
      return curvature_matrix
code_tokens: def curvature_matrix_via_sparse_preload_from ( mapping_matrix : np . ndarray , noise_map : np . ndarray , curvature_matrix_preload , curvature_matrix_counts , ) -> np . ndarray : curvature_matrix = np . zeros ( ( mapping_matrix . shape [ 1 ] , mapping_matrix . shape [ 1 ] ) ) for mask_1d_index in range ( mapping_matrix . shape [ 0 ] ) : total_pix = curvature_matrix_counts [ mask_1d_index ] for preload_index_0 in range ( total_pix ) : for preload_index_1 in range ( preload_index_0 , curvature_matrix_counts [ mask_1d_index ] ) : pix_index_0 = curvature_matrix_preload [ mask_1d_index , preload_index_0 ] pix_index_1 = curvature_matrix_preload [ mask_1d_index , preload_index_1 ] curvature_matrix [ pix_index_0 , pix_index_1 ] += ( mapping_matrix [ mask_1d_index , pix_index_0 ] * mapping_matrix [ mask_1d_index , pix_index_1 ] ) / noise_map [ mask_1d_index ] ** 2 for i in range ( mapping_matrix . shape [ 1 ] ) : for j in range ( mapping_matrix . shape [ 1 ] ) : curvature_matrix [ j , i ] = curvature_matrix [ i , j ] return curvature_matrix
short_docstring: Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
  (see Warren & Dye 2003) via a sparse preload matrix, which has already mapped out where all non-zero entries
  and multiplications take place.
short_docstring_tokens: Returns the curvature matrix ` F ` from a blurred mapping matrix ` f ` and the 1D noise - map $ \ sigma$ ( see Warren & Dye 2003 ) via a sparse preload matrix which has already mapped out where all non - zero entries and multiplications take place .
comment: """
      Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
       (see Warren & Dye 2003) via a sparse preload matrix, which has already mapped out where all non-zero entries
       and multiplications take place.
  
      This is used for models where the blurred mapping matrix does not change, but the noise-map of the values that
      are used to construct that blurred mapping matrix do change.
  
      Parameters
      -----------
      mapping_matrix
          The matrix representing the mappings (these could be blurred or transfomed) between sub-grid pixels and
          pixelization pixels.
      noise_map
          Flattened 1D array of the noise-map used by the inversion during the fit.
      """