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

Hi @rougier, Q.83 asks `How to find the most frequent value in an array?` And the current answer is: ``` python Z = np.random.randint(0,10,50) print(np.bincount(Z).argmax()) ``` The document says `np.bincount`...

### Scope `100_Numpy_exercises_with_hints_with_solutions.md` `100_Numpy_exercises_with_solutions.md` ### Description This pull request gives an alternative solution to q4. Z.nbytes is a built-in attribute of the NumPy array object, specifically designed to return the...

The question means the total bytes consumed by the element of the array. In order to clear up the misunderstanding, it is suggested to revise the question stem. Z.nbytes is...

When I try to click on the button [Test them on Binder] in the readme section of the github mainpage (http://mybinder.org/repo/rougier/numpy-100/notebooks/100_Numpy_exercises.ipynb ). The following error occurred when the binder try...

With new casting rules, input arrays must be specified as a float inorder for np.divide to work. Otherwise casting of np.divide must be set to 'unsafe' A = np.ones(3)*1 A.astype('float')...

the alternative solution does not work for creating a checkerboard pattern. ``` # Alternative solution: Using reshaping arr = np.ones(64,dtype=int) arr[::2]=0 arr = arr.reshape((8,8)) print(arr) ``` this will be the...

Is a vector consisting of `NaN` values considered a null vector?