numpy-100 icon indicating copy to clipboard operation
numpy-100 copied to clipboard

100 numpy exercises (with solutions)

Results 48 numpy-100 issues
Sort by recently updated
recently updated
newest added

Make the solution work on different numpy versions.

It would be nice if the answers were hidden so one wouldn't accidentally read the answers.

The task is as follows: **How to accumulate elements of a vector (X) to an array (F) based on an index list (I)?** To me this means that `F` should...

Z = np.tile([[0, 1], [1, 0]], (4, 4)) print(Z)

This PR mainly wraps comment lines manually, shortens code lines and applies some readability improvements mostly as suggested by `yapf`. This helps generate a PDF version with index cards like...

In my fork of this repo, see https://github.com/deeplook/numpy-100, I'm generating double-sided PDF index cards (call them quiz cards or flash cards if you like) from the markdown file ``100 Numpy...

It's a single solution that works for any type of elements in the array (numbers, strings, records) and any number of columns. I deleted the two previous solutions.

#### 22. Normalize a 5x5 random matrix (★☆☆) The formula for calculating normalized score: X new = (X — X min)/ (X max — X min)

The implementation in the answers for question 56 doesn't make use of the fact that a 2d gaussian is separable and can be implemented as two 1d gaussians - which...