Advertisement
mfgnik

Untitled

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