Friday, October 10, 2025
HomeLanguagesPython | Numpy np.logseries() method

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.




# import numpy
import numpy as np
  
# using 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 :




# import numpy
import numpy as np
  
# using 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]

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32349 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6715 POSTS0 COMMENTS
Nicole Veronica
11878 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6837 POSTS0 COMMENTS
Ted Musemwa
7097 POSTS0 COMMENTS
Thapelo Manthata
6792 POSTS0 COMMENTS
Umr Jansen
6791 POSTS0 COMMENTS