NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Compute numerically robust log-sum-exp reductions across matrix rows.
Implement vectorized_log_sum_exp(matrix): for each row, compute max_x + log(sum(exp(x_i - max_x))). If a row is empty, return 0.0. Round each float to 4 decimal places.
vectorized_log_sum_exp(matrix: list[list[float]]) -> list[float]