About:
numpy.logspace (start, stop, num = 50, endpoint = True, base = 10.0, dtype = None): returns numeric spaces evenly across the interval on a log scale.
Parameters :
-" start: [float] start (base ** start) of interval range. -" stop: [float] end (base ** stop) of interval range -" endpoint: [boolean, optional] If True, stop is the last sample. By default, True -" num: [int, optional] No. of samples to generate -" base: [float, optional] Base of log scale. By default, equals 10.0 -" dtype: type of output array
Return:
-" ndarray
Code 1: Explaining the use of logspace ()
|
Exit :
B [121. 220.36039471 401.31159963 730.8527479 1331.] B [100. 177.827941 316.22776602 562.34132519 1000.] B [100 177 316 562 1000]
Code 2: Plotting numpy.logspace () using the matplotlib module — pylab
| tr>
Output:

Notes:
These programs are NumPy- Python won’t work by onlineID, so run them on your systems to learn them
Similar methods: