Algorithm · OpenAI · Hard
Part 1 — Entropy of a categorical distribution built from streamed logits Logits reach your function as a sequence of blocks. Each block is a NumPy array of finite float64 values (any shape; treat it as a flat list of numbers), and concatenating the blocks in arrival order yields one long vector z of length $$n \ge 1$$. That vector defines a categorical distribution via $$p_i = \frac{e^{z_i}}{\sum_{j=1}^{n} e^{z_j}}, \qquad i = 1,\dots,n,$$ and the value you must return is…
Checking your access…