Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Random numbers in NumPy are easy! 🎲
Play lesson

NumPy tutorial for beginners πŸ”’ - Random numbers in NumPy are easy! 🎲

5.0 (0)
5 learners

What you'll learn

This course includes

  • 1.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#coding #python #numpy Random numbers in NumPy are useful for simulations, modeling, applying random transformations, and testing purposes. rng = np.random.default_rng() print(rng.integers(low=1, high=7, size=(3, 4))) # 3x4 array of Ints np.random.seed() print(np.random.uniform(low=-1, high=1, size=(3, 2))) # floats between 2 values # Shuffle array = np.array([1, 2, 3, 4, 5]) rng.shuffle(array) print(array) # Random Choice fruits = np.array(["🍎", "🍊", "🍌", "πŸ₯₯", "🍍"]) print(rng.choice(fruits, size=(3, 3)))

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere