in more detail in having deep understanding of broadcasting is not necessary for most of this book basic indexing and slicing numpy array indexing is rich topicas there are many ways you may want to select subset of your data or individual elements one-dimensional arrays are simpleon the surface they act similarly to python listsin [ ]arr np arange( in [ ]arr out[ ]array([ ]in [ ]arr[ out[ ] in [ ]arr[ : out[ ]array([ ]in [ ]arr[ : in [ ]arr out[ ]array( ]as you can seeif you assign scalar value to sliceas in arr[ : the value is propagated (or broadcasted henceforthto the entire selection an important first distinction from lists is that array slices are views on the original array this means that the data is not copiedand any modifications to the view will be reflected in the source arrayin [ ]arr_slice arr[ : in [ ]arr_slice[ in [ ]arr out[ ]array( ] ]in [ ]arr_slice[: in [ ]arr out[ ]array( if you are new to numpyyou might be surprised by thisespecially if they have used other array programming languages which copy data more zealously as numpy has been designed with large data use cases in mindyou could imagine performance and memory problems if numpy insisted on copying data left and right numpy basicsarrays and vectorized computation www it-ebooks info