# Tag Archives: Python-numpy

## Numpy.prod() in Python

numpy.prod() returns the product of array elements over a given axis. Syntax: numpy.prod(a, axis=None, dtype=None, out=None, keepdims=) Parameters a : array_like Its the input data.… Read More »

## Multiplication of two Matrices in Single line using Numpy in Python

Matrix multiplication is an operation that takes two matrices as input and produces single matrix by multiplying rows of the first matrix to the column… Read More »

## max() and min() in Python

This article brings you a very interesting and lesser known function of Python, namely max() and min(). Now when compared to their C++ counterpart, which… Read More »

## numpy.append() in Python

About : numpy.append(array, values, axis = None) : appends values along the mentioned axis at the end of the array Parameters : array : [array_like]Input… Read More »

## numpy.bincount() in Python

About : numpy.bincount(arr, weights = None, min_len = 0) : In an array of +ve integers, it counts the occurrence of each element. Each bin… Read More »

## rand vs normal in Numpy.random in Python

About random: For random we are taking .rand() numpy.random.rand(d0, d1, …, dn) : creates an array of specified shape and fills it with random values.… Read More »

## a.sort(), sorted(a), np.argsort(a) and np.lexsort(b, a) in Python

These are all different types for sorting techniques that behave very differently. Let’s study which technique works how and which one to use. Let ‘a’… Read More »

## numpy.zeros_like() in Python

numpy.zeros_like(array, dtype = None, order = ‘K’, subok = True) : Return array of given shape and type as given array, with zeros, Parameters :… Read More »

## numpy.random.randn() in Python

About : numpy.random.randn(d0, d1, …, dn) : creates an array of specified shape and fills it with random values as per standard normal distribution. If… Read More »

## numpy.zeros() in Python

numpy.zeros(shape, dtype = None, order = ‘C’) : Return a new array of given shape and type, with zeros. Parameters : shape : integer or… Read More »

## Differences between Flatten() and Ravel() | Numpy

We have two similar kind of ways to convert a ndarray to 1D array : Flatten() and Ravel() import numpy as np a = np.array(… Read More »

## numpy.repeat() in Python

About : numpy.repeat(arr, repetitions, axis = None) : repeat elements of the array – arr. Parameters : array : [array_like]Input array. repetitions : No. of… Read More »

## numpy.tile() in Python

About : numpy.tile(arr, repetitions) : constructs a new array by repeating array – ‘arr’, the number of times we want to repeat as per repetitions.… Read More »

## numpy.insert() in Python

About : numpy.insert(array, object, values, axis = None) : inserts values along the mentioned axis before the given indices. Parameters : array : [array_like]Input array.… Read More »

## numpy.delete() in Python

About : numpy.delete(array, object, axis = None) : returns a new array with the deletion of sub-arrays along with the mentioned axis. Parameters : array… Read More »