Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
numpy
# Execute this to save new versions of the notebook
jovian.commit(project="numpy")
[jovian] Detected Colab notebook...
[jovian] Please enter your API key ( from https://jovian.ai/ ):
API KEY: ··········
[jovian] Uploading colab notebook to Jovian...
Committed successfully! https://jovian.ai/machinedata12/numpy
import numpy as np
distance = [56,89,87,65]
speed = [7, 10, 11, 8]
dist = np.array(distance)
spd = np.array(speed)
time = dist/spd
time
array([8. , 8.9 , 7.90909091, 8.125 ])
- distance and speed variables are of type of NumPy array and since time variable is associated with dist and
speed NumPy arrays, its type is automatically assigned as NumPy array.