Posts

Showing posts with the label multidimensional arrays

Slicing of Numpy Arrays | Data Science tutorial| codin india

Image
Hello Friends, in this tutorial we will learn about what is indexing and slicing. Let us see one by one. What is indexing? Indexing is a term of defining something orderly. It is used when we want something in a specific range. Suppose you have multiple copies of the same item and you have to remember or recognize every item then you will give every item a unique name or number. That exactly what indexing is. In   Numpy Arrays   indexing start from 0 like   List   in   Python. EX:- myarr = np.array([101,102,103,104,105]) In the given example, the indexing start from zero. If I call the 3rd item from   myarr   array it will give me 104 from the array. What is slicing of array? Slicing of arrays indicates that calling the specific value or range of value from Array. Slicing of Array is almost the same as Slicing of string. We can fetch a specific value from the array, range of values from arrays, call values in reverse order and call value by jumping one or more element. You can slice ac