Random numbers are used in Monte Carlo methods, stochastic calculus, and more. Real random numbers are hard to generate, so, in practice, we use pseudo random numbers, which are random enough for most intents and purposes, except for some very special cases. These numbers appear random, but if you analyze them more closely, you will realize that they follow a certain pattern. The random numbers-related functions are in the NumPy random module. The core random number generator is based on the Mersenne Twister algorithm—a standard and well-known algorithm (see https://en.wikipedia.org/wiki/Mersenne_Twister). We can generate random numbers from discrete or continuous distributions. The distribution functions have an optional size parameter, which tells NumPy how many numbers to generate. You can specify either an integer or a tuple as size. This will result in an array filled with random numbers of appropriate shape. Discrete distributions include the geometric, hypergeometric...
NumPy: Beginner's Guide
By :
NumPy: Beginner's Guide
By:
Overview of this book
Table of Contents (21 chapters)
NumPy Beginner's Guide Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
NumPy Quick Start
Beginning with NumPy Fundamentals
Getting Familiar with Commonly Used Functions
Convenience Functions for Your Convenience
Working with Matrices and ufuncs
Moving Further with NumPy Modules
Peeking into Special Routines
Assuring Quality with Testing
Plotting with matplotlib
When NumPy Is Not Enough – SciPy and Beyond
Playing with Pygame
Pop Quiz Answers
Additional Online Resources
NumPy Functions' References
Index
Customer Reviews