NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Compute the Jacobian matrix of a vector-valued nonlinear mapping.
Implement nonlinear_jacobian(W, x, b): for a component-wise quadratic map f_i(x) = sum_j (W_ij * x_j^2) + b_i, compute the m x n Jacobian matrix where J_ij = d f_i / d x_j = 2 * W_ij * x_j. Round each float to 4 decimals.
nonlinear_jacobian(W: list[list[float]], x: list[float], b: list[float]) -> list[list[float]]