bandhic.band_hic_matrix.all#
- band_hic_matrix.all(axis=None, banded_only=False)[source]#
Test whether all (or any) array elements along a given axis evaluate to True.
- Parameters:
axis (None, int, or {'row','col','diag'}, optional) –
Axis along which to test.
None: test all stored values (and default for missing).
0 or ‘row’: per-row reduction.
1 or ‘col’: per-column reduction.
’diag’: per-diagonal reduction.
banded_only (bool, optional) – If True, only consider stored band elements; ignore out-of-band values. Default is False.
- Returns:
Boolean result(s) of the test.
- Return type:
bool or ndarray
- Raises:
ValueError – If axis is not supported.
Examples
>>> import bandhic as bh >>> mat = bh.band_hic_matrix(np.eye(3), diag_num=2) >>> mat.all() False >>> mat.any(axis='diag', banded_only=True) array([ True, False])