Learn about transpose, and similar, operations upon NumPy arrays in this video tutorial by Charles Kelly. These are explained in the context of computer science and data science to technologists and students in preparation for machine learning, applied st
- [Narrator] The Transpose-like Operations file…in your exercise files folder…is pre-populated with an import statement…and three sample arrays.…In this video, I'll describe three functions,…transpose,…swap axes,…and roll axes.…Before you begin using this notebook,…remember click the cell menu…and run all the cells in the notebook.…Let's display the information in my start array.…
Let's apply NumPy's transpose operation…to my start array.…Since my start array is a one dimensional array,…it's transpose is equal to itself.…Let's examine the contents of my three by eight array…which is a two dimensional array.…If we apply the transpose function…to my three by eight array,…we see that the rows and columns are exchanged.…
More formally, we can describe this as…if we have a matrix a,…which has elements I J,…the element I J, is transposed into the element A J I.…Let's evaluate the contents…of my two by three by four array.…Transpose has a second parameter…and I can use this on my two by three by four array,…and this second parameter is axes.…
- Using Jupyter Notebook
- Creating NumPy arrays from Python structures
- Slicing arrays
- Using Boolean masking and broadcasting techniques
- Plotting in Jupyter notebooks
- Joining and splitting arrays
- Rearranging array elements
- Creating universal functions
- Finding patterns
- Building magic squares and magic cubes with NumPy and Python
Skill Level Intermediate
2. Create NumPy Arrays
3. Index, Slice, and Iterate
4. Plots: Matplotlib and Pyplot
5. Manipulate Arrays
6. Short Examples
7. Extended Examples
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.