numpy.geomspace() in Python Last Updated : 31 May, 2021 Comments Improve Suggest changes Like Article Like Report numpy.geomspace() is used to return numbers spaced evenly on a log scale (a geometric progression). This is similar to numpy.logspace() but with endpoints specified directly. Each output sample is a constant multiple of the previous. Syntax : numpy.geomspace(start, stop, num=50, endpoint=True, dtype=None)Parameters : start : [scalar] The starting value of the sequence. stop : [scalar] The final value of the sequence, unless endpoint is False. In that case, num + 1 values are spaced over the interval in log-space, of which all but the last (a sequence of length num) are returned. num : [integer, optional] Number of samples to generate. Default is 50. endpoint : [boolean, optional] If true, stop is the last sample. Otherwise, it is not included. Default is True. dtype : [dtype] The type of the output array. If dtype is not given, infer the data type from the other input arguments.Return : samples : [ndarray] num samples, equally spaced on a log scale. Code #1 : Working Python # Python3 Program demonstrate # numpy.geomspace() function import numpy as geek print("B\n", geek.geomspace(2.0, 3.0, num = 5), "\n") # To evaluate sin() in long range point = geek.geomspace(1, 2, 10) print("A\n", geek.sin(point)) Output : B [ 2. 2.21336384 2.44948974 2.71080601 3. ] A [ 0.84147098 0.88198596 0.91939085 0.95206619 0.9780296 0.9948976 0.99986214 0.98969411 0.96079161 0.90929743] Code #2 : Graphical Representation of numpy.geomspace() Python # Graphical Representation of numpy.geomspace() import numpy as geek import pylab as p % matplotlib inline # Start = 1 # End = 3 # Samples to generate = 10 x1 = geek.geomspace(1, 3, 10, endpoint = False) y1 = geek.ones(10) p.plot(x1, y1, '+') Output : Comment More infoAdvertise with us Next Article numpy.geomspace() in Python jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-arrayCreation Practice Tags : python Similar Reads numpy.logspace() in Python The numpy.logspace() function returns number spaces evenly w.r.t interval on a log scale. Syntax :  numpy.logspace(start, stop, num = 50, endpoint = True, base = 10.0, dtype = None) Parameters : -> start : [float] start(base ** start) of interval range. -> stop : [float] end(base ** stop) of 2 min read NumPy Array in Python NumPy (Numerical Python) is a powerful library for numerical computations in Python. It is commonly referred to multidimensional container that holds the same data type. It is the core data structure of the NumPy library and is optimized for numerical and scientific computation in Python. Table of C 2 min read numpy.atleast_3d() in Python numpy.atleast_3d() function is used when we want to Convert inputs to arrays with at least three dimension. Scalar, 1 and 2 dimensional inputs are converted to 3-dimensional arrays, whilst higher-dimensional inputs are preserved. Input includes scalar, lists, lists of tuples, tuples, tuples of tuple 2 min read numpy.atleast_2d() in Python numpy.atleast_2d() function is used when we want to Convert inputs to arrays with at least two dimension. Scalar and 1-dimensional inputs are converted to 2-dimensional arrays, whilst higher-dimensional inputs are preserved. Syntax : numpy.atleast_2d(*arrays) Parameters : arrays1, arrays2, ... : [ar 2 min read Python | Numpy np.coords() method With the help of np.coords() method, we can get the coordinates of a next value in iteration using np.coords() method. Syntax : np.coords() Return : Return the coordinates of next iterator. Example #1 : In this example we can see that by using np.coords() method, we are able to get the coordinates o 1 min read numpy.tile() in Python The numpy.tile() function constructs a new array by repeating array - 'arr', the number of times we want to repeat as per repetitions. The resulted array will have dimensions max(arr.ndim, repetitions) where, repetitions is the length of repetitions. If arr.ndim > repetitions, reps is promoted to 3 min read numpy.frombuffer() function â Python numpy.frombuffer() function interpret a buffer as a 1-dimensional array. Syntax : numpy.frombuffer(buffer, dtype = float, count = -1, offset = 0) Parameters : buffer : [buffer_like] An object that exposes the buffer interface. dtype : [data-type, optional] Data-type of the returned array, default da 1 min read numpy.byte_bounds() function â Python numpy.byte_bounds() function returns pointers to the end-points of an array. Syntax : numpy.byte_bounds(arr) Parameters : arr : [ndarray] Input array. Return : [tuple of 2 integers] The first integer is the first byte of the array, the second integer is just past the last byte of the array. If arr i 1 min read Python NumPy Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python.Besides its obvious scientific uses, Numpy can also be used as an efficient m 6 min read numpy.who function - Python numpy.who() function print the NumPy arrays in the given dictionary. Syntax : numpy.who(vardict = None) Parameters : vardict : [dict, optional] A dictionary possibly containing ndarrays. Return : Returns âNoneâ. If there is no dictionary passed in or vardict is None then returns NumPy arrays in the 1 min read Like