bandhic.eye#
- bandhic.eye(shape, diag_num=1, dtype=<class 'numpy.float64'>)[source]#
Create a band_hic_matrix object filled as an identity matrix.
- Parameters:
shape (tuple of int) – Matrix shape as (bins, bins).
diag_num (int, optional) – Number of diagonals to consider. Default is 1.
dtype (data-type, optional) – The data type of the matrix. Default is np.float64.
- Returns:
A band_hic_matrix object with ones on the main diagonal and zeros elsewhere.
- Return type:
Examples
>>> mat = eye((5, 5), diag_num=3) >>> print(mat) band_hic_matrix(shape=(5, 5), diag_num=3, dtype=<class 'numpy.float64'>)