Python | Numpy np.logseries() method

With the help of np.logseries() method, we can get the log series in the form of an array by using np.logseries() method.

Syntax : np.logseries(p, size)

Return : Return an array of log series.



Example #1 :

In this example we can see that by using np.logseries() method, we are able to get an array of log series by using this method.

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy
import numpy as np
  
# using np.logseries() method
gfg = np.random.logseries(0.4, 25)
  
print(gfg)

chevron_right


Output :

[1 1 1 3 1 2 1 1 2 1 1 1 1 1 1 1 1 1 2 3 1 3 1 1 1]

Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy
import numpy as np
  
# using np.logseries() method
gfg = np.random.logseries(0.8, 25)
  
print(gfg)

chevron_right


Output :

[ 1 1 1 2 3 1 6 3 3 3 1 2 1 1 1 5 2 1 18 1 1 1 2 2
1]

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.