Ndarray

12 tutorials Updated 21 Apr 2017

  1. 1 Adding two matrices using numpy.ndarray with Example To add two matrices the __add__() method of numpy.ndarray can be used. An example is given for matrix addition along with output. 14 Apr 2017
  2. 2 The all() and any() functions on NumPy ndarray The all() and any() functions perform logical AND and logical OR operations on the elements of the ndarray or the elements along the specified axis of an ndarray 20 Apr 2017
  3. 3 Copying ndarrays numpy.ndarray objects can be copied in several ways. The include making more references, copying using slicing operator, using the copy() method. Examples are provided. 20 Apr 2017
  4. 4 The cumulative sum and cumulative product of NumPy arrays The cumulative sum and cumulative product of NumPy arrays is provided through the functions cumsum() and cumprod() of numpy.ndarray 15 Apr 2017
  5. 5 Matrix multiplication(dot product) - using numpy.ndarray with Example Two matrices can be multiplied using the dot() method of numpy.ndarray which returns the dot product.An example is provided with output. 14 Apr 2017
  6. 6 Dumping an ndarray object ndarray objects can be dumped in several ways into various destinations including python list, bytes, string & file.The dumped ndarray can be loaded back using numpy. 21 Apr 2017
  7. 7 Create subsets from ndarray objects numpy provides various methods that help in extracting subsets of values from existing ndarray objects. Methods include compress(), diagonal(), squeeze() and take() 19 Apr 2017
  8. 8 Mean, Variance and Standard Deviation of values NumPy ndarray elements with example The Mean, Variance and Standard Deviation of values of a numpy.ndarray object along with the given axis can be found using the mean(), var() and std() functions. 16 Apr 2017
  9. 9 The min() and max() functions of ndarray min() and max() functions of numpy.ndarray() provides the minimum and maximum values along the specified axis. An example with a 3-dimensional array is provided. 16 Apr 2017
  10. 10 Subtracting one matrix from another using numpy.ndarray with Example To subtract two matrices the __sub__() of numpy.ndarray can be used. An example python program is provided along with output using ndarray. 14 Apr 2017
  11. 11 Transforming ndarray objects ndarray objects can be transformed into 1 dimensional arrays, arrays of specified min and max values, arrays of any compatible shape. Examples are provided. 16 Apr 2017
  12. 12 Transpose of a matrix using numpy.ndarray with example Transpose of a matrix is obtained by flipping the matrix over the main diagonal of the matrix. The transpose() method of the numpy.ndarray can be used to get transpose of a matrix. 15 Apr 2017