promptdojo_

An AI wrote a shape helper but returned the dimensions in the wrong order — columns first, then rows — so a (2, 3) tensor reports as (3, 2). That single swap is what causes half of all "shapes cannot be multiplied" errors. Fix line 2 to return (rows, columns).

Expected output:

(2, 3)
The break is on line 2 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.