tacco.utils.row_scale

row_scale(X, rescaling_factors, round=False)[source]

Rescales rows of dense or sparse matrix inplace.

Parameters:
  • X – A 2d ndarray array or a scipy sparse matrix.

  • rescaling_factors – A 1d ndarray containing the row-wise rescaling factors.

  • round – Whether to round the result to integer values

Returns:

None. This is an inplace operation.