Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Around, sort and divide using NumPy

# Hello World program in Python
    
import numpy as np

pi = np.pi 

print(pi)

a2 = np.array([153.952, 299.154, 436.185, 565.584, 687.845, 803.428, 912.758, 1114.21, 1207.04, 1295.02, 1378.47, 1457.64, 1532.79, 1604.17, 1671.98, 1736.44, 1797.73, 1856.05])

a1 = np.array([2980.3125, 2814.73958333, 2649.16666667, 2483.59375, 2318.02083333, 2152.44791667, 1986.875, 1821.30208333, 1655.72916667, 1490.15625, 1324.58333333, 1159.01041667, 993.4375, 827.86458333, 662.29166667, 496.71875, 331.14583333, 165.57291667])

print(a1)

a1 = np.around([a1], decimals=3)

print(a1)

a1 = np.sort(a1)

print(a1)

erg = np.divide(a2, a1)

print(erg)

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.