tacco.utils.col_scale

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

Rescales columns of dense or sparse matrix inplace.

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

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

  • round – Whether to round the result to integer values

Returns:

None. This is an inplace operation.