Learn_NumPy
Learn_NumPy copied to clipboard
We design this course with 9 lessons to help beginners can quickly understand and utilize this useful library.
Learn NumPy
We design this course with 9 lessons to help beginners can quickly understand and utilize this useful library.
Lessons
Lesson 1: Basics & Array Creations
- This article describes the differences between NumPy arrays and Python arrays, as well as methods and basic operations for building arrays or matrices.
- File Name: numpy_lesson1-Basics, Array Creation.ipynb
- Link: NumPy 1.14 教學 – #01 基礎, 建立陣列的方法
Lesson 2: How to print array? & Format settings
- This article will explain how to print out the array with NumPy and how to use the np.set_printoptions method to set the print format! Also use this opportunity to use the reshap() function a little bit!
- File Name: numpy_lesson2-Printing Arrays.ipynb
- Link: NumPy 1.14 教學 – #02 如何印出陣列以及格式設定(np.set_printoptions)
Lesson 3: Basic calculation in NumPy(addition, subtraction, multiplication and division)
- This article will introduce addition, subtraction, multiplication and division (including matrix multiplication), important attributes, and common calculation with matrices! (e.g. dot, sum, min, max, mean, cumsum, sqrt, add, exp, ...)
- File Name: numpy_lesson3-Basic Operations.ipynb
- Link: NumPy 1.14 教學 – #03 基本操作(加減乘除、矩陣乘法、取代)
Lesson 4: Indexing & Slicing & Iterating & From Function
- This lesson will show you how to use NumPy to access data through indexes, slicing and use loop to access 1-dimensional matrix or multi-dimensional matrix.
- File Name: numpy_lesson4-Indexing, Slicing and Iterating.ipynb
- Link: NumPy 1.14 教學 – #04 索引(Indexing)、切片(Slicing)、迭代(Iterating)、From Function
Lesson 5: Shape Manipulation & Stack & Split matrices
- This lesson describes many ways to change matrix shape, stacking, and splitting.
- File Name: numpy_lesson5-Shape Manipulation, Stacking together different arrays, Splitting one array into several smaller ones.ipynb
- Link: NumPy 1.14 教學 – #05 形狀操作、矩陣互相堆疊(Stacking)、矩陣切割(Splitting)
Lesson 6: Simple assignments & Views & Deep copy
- NumPy provides "Simple assignments", "View", "Deep copy" and other methods, and this lesson will introduce the differences between these methods!
- File Name: numpy_lesson6-Simple Assignments, Copy and Views, Deep Copy.ipynb
- Link: NumPy 1.14 教學 – #06 簡易指定(Simple Assignments), 檢視(Views), 深度拷貝(Deep Copy)
Lesson 7: Indexing with an array of indices
- This lesson will introduce a method, "argmax". It's an advanced indexing method of matrix/array in NumPy.
- File Name: numpy_lesson7-Indexing with Array of Indices.ipynb
- Link: NumPy 1.14 教學 – #07 用陣列當索引取值(Indexing with array of indices)
Lesson 8: Indexing with a boolean array
- This article will show how to use conditions to filter the elements in the entire matrix that meet our needs, and then generate the boolean matrix so that we can use the boolean matrix to complete modification or judgment of the entire matrix!
- File Name: numpy_lesson8-Indexing with Boolean Arrays.ipynb
- Link: NumPy 1.14 教學 – #08 用布林陣列當索引取值(Indexing with boolean array)
Lesson 9: ix() & Linear algebra & Repeat & Stack
- We will introduce the ix() function. In addition, we will introduce np.repeat, np.tile, np.hstack, np.vstack.
- File Name: numpy_lesson9-ix_( ), Linear Algebra, Repeat, Stack.ipynb
- Link: NumPy 1.14 教學 – #09 ix_( )函數、線性代數(Linear Algebra)、重複(Repeat)、堆疊(Stack)
Notes
Note 1: The padding on matrix
- This article will show how to use the "pad()" function of Numpy, and utilize it in building convolutional neural networks.
- File Name: numpy_note-01-Padding-function-in-numpy.ipynb
- Link: Numpy 筆記-#01 卷積神經網路的Padding
Note 2: Save the variables as .npz file
- We provided how to save the variables as a npz file, and demonstrated how to load npz file. In addition to this, we also compared the time costs of numpy.savez and numpy.savez_compressed.
- File Name: numpy_note-02-save-variables-as-npz.ipynb
- Link: Numpy 筆記-#02 另存變數為 .npz
How to use?
- Just fork to your own github or download this repository directly. And run the jupyter file that you interest lesson.