bandhic.band_hic_matrix.iterwindows#
- band_hic_matrix.iterwindows(width, step=1)[source]#
Iterate over the diagonals of the matrix with a specified window size.
- Parameters:
width (int) – The size of the window to iterate over.
step (int, optional) – Step size between windows. Default is 1.
- Yields:
band_hic_matrix – The values in the current window.
- Return type:
Iterator
[band_hic_matrix
]
Examples
>>> import bandhic as bh >>> mat = bh.ones((3,3), diag_num=2) >>> for win in mat.iterwindows(2): ... print(win) band_hic_matrix(shape=(2, 2), diag_num=2, dtype=<class 'numpy.float64'>) band_hic_matrix(shape=(2, 2), diag_num=2, dtype=<class 'numpy.float64'>)