bandhic.band_hic_matrix.prod#
- band_hic_matrix.prod(axis=None)[source]#
Compute the product of the values in the matrix or along a given axis.
- Parameters:
axis (None, int, or {'row','col','diag'}, optional) –
Axis along which to compute the product:
None: product over all stored values (and default for missing).
0 or ‘row’: per-row reduction.
1 or ‘col’: per-column reduction.
’diag’: per-diagonal reduction.
Default is None.
- Returns:
Product(s) along the specified axis.
- Return type:
scalar or ndarray
- Raises:
ValueError – If axis is not one of the supported values.
Examples
>>> import bandhic as bh >>> mat = bh.band_hic_matrix(np.arange(1, 10).reshape(3,3), diag_num=2) >>> mat.prod() # product of all elements 0 >>> mat.prod(axis='row') array([ 0, 60, 0])