Project DelphiTensors Workshop

Mistake: a correct shape proves the data is complete

“The table is (20640, 10), exactly as promised, so it loaded cleanly.”

The counterexample is one line long:

table = np.zeros((20640, 10)) table[:207, 4] = np.nan assert table.shape == (20640, 10) assert np.isnan(table).sum() == 207

The shape check passes and 207 values are still missing — the same 207 rows whose total_bedrooms California Housing never recorded. A shape counts positions; it never looks inside them. Read isnan().sum() beside .shape.