# Category: Numpy Functions

## Numpy Meshgrid functionNumpy Meshgrid function

Numpy Meshgrid function The numpy.meshgrid function is used to create a rectangular grid out of two given one-dimensional arrays representing the Cartesian indexing or Matrix indexing. Meshgrid function is somewhat inspired from MATLAB. Consider the above figure with X-axis ranging

## numpy.argmax() in Pythonnumpy.argmax() in Python

numpy.argmax() in Python The numpy.argmax() function returns indices of the max element of the array in a particular axis. Syntax :  numpy.argmax(array, axis = None, out = None) Parameters :  array : Input array to work on axis : [int, optional]Along a

## numpy.reshape() in Pythonnumpy.reshape() in Python

numpy.reshape() in Python The numpy.reshape() function shapes an array without changing the data of the array. Syntax: numpy.reshape(array, shape, order = 'C') Parameters :    array : [array_like]Input array shape : [int or tuples of int] e.g. if we are aranging an

## numpy.multiply() in Pythonnumpy.multiply() in Python

numpy.multiply() in Python numpy.multiply() function is used when we want to compute the multiplication of two array. It returns the product of arr1 and arr2, element-wise. Syntax : numpy.multiply(arr1, arr2, /, out=None, *, where=True, casting=’same_kind’, order=’K’, dtype=None, subok=True[, signature, extobj], ufunc ‘multiply’)

## numpy.subtract() in Pythonnumpy.subtract() in Python

numpy.subtract() in Python numpy.subtract() function is used when we want to compute the difference of two array.It returns the difference of arr1 and arr2, element-wise. Syntax : numpy.subtract(arr1, arr2, /, out=None, *, where=True, casting=’same_kind’, order=’K’, dtype=None, subok=True[, signature, extobj], ufunc ‘subtract’)

## numpy.percentile() in pythonnumpy.percentile() in python

numpy.percentile() in python numpy.percentile()function used to compute the nth percentile of the given data (array elements) along the specified axis. Syntax : numpy.percentile(arr, n, axis=None, out=None) Parameters : arr :input array. n : percentile value. axis : axis along which we want to

## numpy.linspace() in Pythonnumpy.linspace() in Python

numpy.linspace() in Python The numpy.linspace() function returns number spaces evenly w.r.t interval. Similar to numpy.arrange() function but instead of step it uses sample number. Syntax :  numpy.linspace(start, stop, num = 50, endpoint = True, retstep = False, dtype = None) Parameters :  -> start

## Numpy size() function | PythonNumpy size() function | Python

Numpy size() function | Python In Python, numpy.size() function count the number of elements along a given axis. Syntax: numpy.size(arr, axis=None) Parameters: arr: [array_like] Input data. axis: [int, optional] Axis(x,y,z) along which the elements(rows or columns) are counted. By default, give the total

## Python – math.cos() functionPython – math.cos() function

Python | math.cos() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.cos() function returns the cosine of value passed as argument. The value passed in this function should be in

## numpy.log() in Pythonnumpy.log() in Python

numpy.log() in Python The numpy.log() is a mathematical function that helps user to calculate Natural logarithm of x where x belongs to all the input array elements. Natural logarithm log is the inverse of the exp(), so that log(exp(x)) = x. The natural logarithm is log