Skip to content

Tag Archives: Python numpy-arrayCreation

numpy.full(shape, fill_value, dtype = None, order = ‘C’) : Return a new array with the same shape and type as a given array filled with… Read More
numpy.tri(R, C = None, k = 0, dtype = ‘float’) : Creates an array with 1’s at and below the given diagonal(about k) and 0’s… Read More
numpy.triu(a, k = 0) : Returns copy of array with upper part of the triangle w.r.t k Parameters : a : input array k :… Read More
numpy.diag(a, k=0) : Extracts and construct a diagonal array Parameters :  a : array_like k : [int, optional, 0 by default] Diagonal we require; k>0 means… Read More
numpy.tril(a, k=0) : Returns copy of array with lower part of the triangle w.r.t k Parameters : a : input array k : [int, optional,… Read More
numpy.diagflat (a, k = 0): Create a two-dimensional array with the array_like input as a diagonal to the new output array. Parameters :  a :… Read More
numpy.eye(R, C = None, k = 0, dtype = type <‘float’>) : –The eye tool returns a 2-D array with  1’s as the diagonal and… Read More
The arange([start,] stop[, step,][, dtype]) : Returns an array with evenly spaced elements as per the interval. The interval mentioned is half-opened i.e. [Start, Stop) … Read More
numpy.identity(n, dtype = None) : Return a identity matrix i.e. a square matrix with ones on the main diagonal.  Parameters : n : [int] Dimension… Read More
numpy.empty(shape, dtype = float, order = ‘C’) : Return a new array of given shape and type, with random values. Parameters : -> shape :… Read More
numpy.empty_like(a, dtype = None, order = ‘K’, subok = True) : Return a new array with the same shape and type as a given array.… Read More

Start Your Coding Journey Now!