Learn how encapsulate important features about magic cubes into a Pyhon class that uses 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 preparat
- [Narrator] This video concentrates upon…developing the Python code…for our magic characteristics class.…I'll tell you that when I developed this code,…I didn't develop it in a Python notebook.…Actually, I developed it…in an Integrated Development Environment, an IDE,…and in my case, I used the PyCharms IDE.…The reason that I mention this…is that I copied and pasted the code from the PyCharm IDE…into this notebook.…
However, when I developed the code in PyCharm,…I developed each class in a separate file.…Therefore, I needed a statement, an import statement,…from com.charleskelly.magic.adjacency_matrix…import Adjacency Matrix.…However, when we're examining code here…in a Jupiter notebook,…we can't use the same import statements.…To overcome this difficulty,…what I'm going to do is copy and paste the code…from our adjacency matrix into this notebook.…
Now I'm going to press Shift + Enter.…By executing this cell,…I'm making the definition of our class adjacency matrix…known, that is make it available,…to other code within this notebook.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.