Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

log base 2 python

import math

output = math.log(8, 2)  # second parameter is base of logarithm

print("Output:", output) # Output: 3.0
Comment

natural log and log base 10 in python

# Natural log in python and log base 10
import numpy as np
#natural log in python
x = np.log(8)
#log base 10 in python
x2 = np.log10(8)
Comment

PREVIOUS NEXT
Code Example
Python :: python get ros package path 
Python :: how to open file in BeautifulSoup 
Python :: python radians to degrees 
Python :: df from numpy array 
Python :: list of prime numbers in python 
Python :: name unnamed column pandas 
Python :: image capture from camera python 
Python :: using bs4 to obtain html element by id 
Python :: matplotlib grid in background 
Python :: tkinter boilerplate 
Python :: import NoSuchKey in boto3 
Python :: how to set chrome options python selenium for a folder 
Python :: python install package from code 
Python :: pip version command 
Python :: reload all extensions discord.py 
Python :: os.execl(sys.executable, sys.executable, *sys.argv) 
Python :: Change the user agent selenium 
Python :: django reverse 
Python :: extract frames from video python 
Python :: plt.clear 
Python :: how to maker loops coun t in second in pytho 
Python :: pandas to_csv append 
Python :: string module in python 
Python :: href in selenium 
Python :: how to extract month from date in python 
Python :: python import all words 
Python :: py for line in file 
Python :: PySpark null or missing values 
Python :: calculate mape python 
Python :: zeller year 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =