arrays and plotting dinates (xyin the plane or (xyzin space this concept of vectors can be generalized to any number of dimensionsand we can view vector as general -tuple of numbersv ( vn- in pythonwe could use list to represent such vectorby storing component vi as element [iin the list howevervectors are so useful and common in scientific programming that special data structure has been created for themthe numpy array an array is much less flexible than listin that it has fixed length ( no append-method)and one array can only hold variables of the same type howeverarrays are also much more efficient to use in computationsand since they are designed for such usethey have number of useful features that can shorten and clarify our code for the purpose of plottingwe will mostly use one-dimensional arraysbut an array can have multiple indicessimilar to nested list for instancea two-dimensional array ai, can be viewed as table of numberswith one index for the row and one for the columnas followsa , , - - - - - am- , am- , - such two-dimensional case is similar to matrix in linear algebrabut numpy arrays do not follow the standard rules for mathematical operations on matrices the number of indices in an array is often referred to as the rank or the number of dimensions storing ( ,ypoints on curve in lists and arrays to make the array concept bit more concretewe consider the task mentioned abovewhere we want to store points on function curve (xall the plotting cases we will consider are based on this ideaso it makes sense to introduce it for simple example we have seen in previous that there are multiple ways to store such pairs of numbersfor instance in nested list containing (xypairs howeverfor the purpose of plottingthe easiest approach is to create two lists or arraysone holding the -values and another holding the -values the two lists/arrays should be of equal lengthand we will always create them using the same two steps firstwe create uniformly spaced -values that cover the interval where we want to plot the function thenwe run through these numbers and compute the corresponding -valuesstoring these in separate list or array the following interactive session illustrates the procedureusing list comprehensions to first create list of five -points on the interval [ ]and then compute the corresponding points (xfor (xx def ( )return ** dx /( - number of points spacing in [ ,