Learn how to use broadcasting techniques across multiple dimension of NumPy variables 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
- [Teacher] When you open a broadcasting file…in the Exercises file folder, you'll see…that it had been pre-populated with…an import statement and my_3D_arry.…I'm using the NumPy arange function to create an array…that has 70 elements, from zero to 69.…Here, I'm explicitly setting…the shape attribute with a tuple: two, seven, five.…When I display these results, by clicking…on the Cell menu and selecting Run All,…we can see that the resulting array has…two two-dimensional arrays, each of which…have five columns and seven rows.…
Broadcasting describes how NumPy performs…operations between arrays with different sizes.…NumPy requires that arrays be compatible…before broadcasting can take place.…In this context, compatible means…that the sizes are the same or at least…one of the sizes is equal to zero.…As I will explain in this video,…the smaller array is broadcast to the larger array.…In order to perform broadcasting correctly,…we need to know the attributes of arrays.…
These attributes include shapes,…number dimensions, sizes, and data types.…
- 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.