finds.dev← search

// the find

rougier/numpy-100

★ 14,259 · Python · MIT · updated Apr 2026

100 numpy exercises (with solutions)

A collection of 100 NumPy exercises ranging from trivial array creation to non-trivial indexing and linear algebra problems, with hints and solutions provided separately. It's aimed at people learning NumPy or brushing up on it, and has been a standard reference for years. Not a tutorial — it assumes you know Python and want to sharpen array thinking.

The three-tier structure (exercise / hints / solutions) is well thought out — you can control how much help you get without accidentally spoiling the answer. The source is stored in a custom KTX format and generated programmatically, so the notebook, markdown, and hints files stay in sync rather than drifting. Binder integration means zero setup to run everything in the browser. Coverage is genuinely broad: basic array ops, fancy indexing, broadcasting edge cases, structured arrays — the harder problems are the ones that actually teach you something.

100 exercises hasn't been revisited to reflect NumPy's last few years of evolution — there's nothing on the new dtype system, nothing on `np.random.default_rng`, and the random-number exercises still use the legacy `np.random.seed` interface. The custom KTX format adds friction for contributors who just want to fix a typo or add a problem without learning an undocumented format and running a generator script. There's no difficulty rating or topic index, so if you specifically want to practice broadcasting or striding you're hunting through the list manually. The 100-number limit has become a ceiling rather than a design choice — there's a `100_Numpy_random.ipynb` overflow file that's basically an orphan.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →