Python | Numpy np.logseries () method



With the np.logseries() method we can get a series of logs as an array using np.logseries () .

Syntax: np.logseries (p, size)

Return: Return an array of log series.

Example # 1:

In this example, we can see that using np.logseries ( ) we can get an array of magazine series using this method.

# NumPy import

import numpy as np

 
# using the np.logseries () method

gfg = np.random.logseries ( 0.4 , 25 )

 

print (gfg)

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:

# NumPy import

import numpy as np

 
# using the np.logseries () method

gfg = np.random.logseries ( 0.8 , 25 )

  

print (gfg)

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]