Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Create a 3x3 matrix with values ranging from 0 to 8
- 2. Create a 3x3 identity matrix
- 3. Create a 3x3x3 array with random values
- 4. Create a random vector of size 30 and find the mean value
- 5. Create a 5x5 matrix with values 1,2,3,4 just below the diagonal
- 6. How to sort an array by the nth column?
- 7. How to find the closest value (to a given scalar) in a vector?
- 8. Create random vector of size 10 and replace the maximum value by 0
- 9. How to sum a small array faster than np.sum?
- 10. Consider the vector [1, 2, 3, 4, 5], how to build a new vector with 3 consecutive zeros interleaved between each value?
- 11. Consider a large vector Z, compute Z to the power of 3 using 3 different methods and compare execution time
- 12. How to find the most frequent value in an array?
- 13. How to swap two rows of an array?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement