Introduction to numerical computing with numpy - SciPy2019 - Alex Chabot-Lecler
Last updated: Aug21,2020

Summary: This started out good. The first 45min were fairly clear and informative. The last 1:15 was mostly useless and ultimately frustrating. He preaches that we must avoid coding our own loops, but that the looping does occusr somewhere. No attempt is made to explain where/how the looping is performed. It is magic! The fact that at about 1:00hr the left margin in the coding screen cuts off the first few columns made it very hard to follow the lecture from even a "just follow the example" standpoint.


Here is the link:
Introduction to numerical computing with numpy - SciPy2019 - Alex Chabot-Lecler
 

ndarry -  n-dimensional

vectorized operation = a looping operation where you do not code the llop. 
 a = np.array([ 1,2,3,4]) 
 
 a.shape ==== (4,)    a tuple     (number of elements on each axis) 
 a.size = number of elemenst in the array 

 Universal function (ufuncs)      np.sin(a) 

 numpy array are mutable ---> you can change them (down to single elemenst) 

 slicing --->   [ lower : upper : step ] 
   *** The upper bound is never included (like with python list slicing) 
  --- closed interval on the left, open interval on the right) 

  To copy an array --->   b = a.copy() 
  Slicing just makes new pointers. So you can change somethig n a slice, and then it is 
  also changed in the original array. This is becaseu we a re looking at the same point    
  in memory.  If we do not want to worry about such things, we make a copy of the array. 
  Of course, then we use twice the memory. 


   General Python question (that I like):   Whento use () vs. [] 
    brackets [] call the __getitem__() and __setitem__() methods   ---> These are referncing index positions in something like 
                                                                        a list, an array, a dictionary, etc.... 
    Parentheses () call a function   
    Alex recommencs:   "Fluent Python"    not a beginner book, but very good he asys 

 At 46:40 he starst with filter_image.py    
    This is a pixel-by-pixel operation using local n(neighbor) pixel properties.    What I have been looking for. 
    But, not a clear explanation.  Basically no real explanation, and the examples page is shifted so that the 
    left edge is cut off.    
    But: he uses the ipython method(?) timeit to show that the numpy way is 1000x faster than the 2-for-loops way. 
     *** He loosed me completely by 1:13.  No real explanations.  Just watching now,,,,,,,,   Blah......


 Ohhh. These are the Enthought guys, so this is a money deal. The github page he 
referes to seems to not be available through the "More Comments" section in the 
YouTube page. So, this is turning out to not be of much practical use. 
  
   ***** First 45min is useful, last 1:15 i not really make much sense.  

1:48:17  =  He uses loadtxt() (like my example in 2darray_ex2.py)  





Back to calling page