Toggle Navigation
Everything
Blog posts
Pages
Home
About
The Author
The Book
This Website
Book
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plotting with pylab
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and IPython Notebook
Examples
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: General Scientific Programming
Examples
Questions
Problems
Errata
Book (2nd ed.)
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plots and Charts
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and Jupyter Notebook
Examples
Problems
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: Data Analysis with pandas
Examples
Problems
Chapter 10: General Scientific Programming
Examples
Questions
Problems
Errata
Additional Notes
Blog
Apps
Contact
Home
Book (2nd ed.)
Chapter 6: NumPy
Questions
Questions
Q6.1.1 np.ndarray and np.array
Q6.1.2 Creating a NumPy array #1
Q6.1.3 Creating a NumPy array #2
Q6.1.4 Changing the data type of an array
Q6.1.5 Indexing and slicing a NumPy array
Q6.1.6 Boolean indexing
Q6.1.7 Using np.isclose #1
Q6.1.8 Using np.isclose #2
Q6.1.9 Verifying a magic square
Q6.1.10 Determining if an array is monotonically increasing
Q6.1.11 The dtypes of scalars and arrays
Q6.4.1 Derivative of a polynomial
Q6.4.2 Classifying the stationary points of a polynomial
Q6.5.1 The unitary property of the Pauli matrices
Q6.5.2 Fitting data to a quadratic function
Q6.6.1 Using np.random.randint
Q6.6.2 Using np.random.randint to sample from a set of evenly-spaced reals
Q6.6.3 The Mega Millions lottery
Q6.6.4 Probability of misprints
Q6.7.1 Direct implementation of the discrete Fourier Transform