bandhic.band_hic_matrix.normalize#

band_hic_matrix.normalize(inplace=False)[source]#

Normalize each diagonal of the matrix to have zero mean and unit variance. This modifies the matrix in place. :raises UserWarning: If any diagonal has zero standard deviation, it will be set to zero.

Return type:

None

Parameters:

inplace (bool)

Examples

>>> import bandhic as bh
>>> mat = bh.band_hic_matrix(np.arange(9).reshape(3,3), diag_num=2)
>>> mat = mat.normalize()