Posted in Numpy Tutorial

numpy.ogrid function with example in python

numpy.ogrid(): This function returns mesh-grid ndarrays with only one dimension :math:neq 1 numpy.ogrid = <numpy.lib.index_tricks.OGridClass object> nd_grid instance which returns an open multi-dimensional “meshgrid”. An…

Continue Reading...
Posted in Numpy Tutorial

numpy.mgrid function with example program in python

numpy.mgrid function(): This funtion returns  mesh-grid ndarrays all of the same dimensions numpy.mgrid = <numpy.lib.index_tricks.MGridClass object>¶ nd_grid instance which returns a dense multi-dimensional “meshgrid”. An…

Continue Reading...
Posted in Numpy Tutorial

numpy.geomspace() function with example program in python

numpy.geomspace(): This function return numbers spaced evenly on a log scale (a geometric progression). Syntax: numpy.geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0) This is similar to…

Continue Reading...
Posted in Numpy Tutorial

numpy.logspace() function with example in python

numpy.logspace(): This  function return numbers spaced evenly on a log scale. Syntax: numpy.logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, axis=0) In linear space, the sequence starts…

Continue Reading...
Posted in Numpy Tutorial

numpy.linspace() function with example program in python | 2019

numpy.linspace(): This function Return evenly spaced numbers over a specified interval  and num evenly spaced samples, calculated over the interval [start, stop]. Syntax: numpy.linspace(start, stop,…

Continue Reading...
Posted in Numpy Tutorial

numpy.arange() function with example in python | 2019

numpy.arange() : If you want generate a sequence of numbers, arange() function is very helpful. It has regular range of numbers and with specific interval…

Continue Reading...
Posted in Numpy Tutorial

numpy.random.standard_normal() function with example in python

numpy.random.standard_normal(): This function draw samples from a standard Normal distribution (mean=0, stdev=1). Syntax: numpy.random.standard_normal(size=None) Parameters: size : int or tuple of ints, optional Output shape….

Continue Reading...
Posted in Numpy Tutorial

numpy.random.randint() function with example in python

numpy.random.randint() function: This function return random integers from low (inclusive) to high (exclusive). Return random integers from the “discrete uniform” distribution of the specified dtype…

Continue Reading...
Posted in Numpy Tutorial

numpy.random.randn() function with example in python | 2019

numpy.random.randn() function: This function return a sample (or samples) from the “standard normal” distribution. If positive, int_like or int-convertible arguments are provided, randn generates an…

Continue Reading...
Posted in Numpy Tutorial

numpy.trim_zeros () Function with example in python

numpy.trim_zeros(): This function trim the leading and/or trailing zeros from a 1-D array or sequence. syntax: numpy.trim_zeros(filt, trim=’fb’)[source] Parameters: filt : 1-D array or sequence…

Continue Reading...