Skip to content
Snippets Groups Projects
Commit 4f8fab2a authored by bjje's avatar bjje
Browse files

minior namefix

parent 5fdbfb16
Branches
No related tags found
No related merge requests found
# exercise 2.1.1
import numpy as np
x = np.array([-0.68, -2.11, 2.39, 0.26, 1.46, 1.33, 1.03, -0.41, -0.33, 0.47])
# Compute values
mean_x = x.mean()
std_x = x.std(ddof=1) # ddof: Delta Degrees of freedom
median_x = np.median(x)
range_x = x.max() - x.min()
# Display results
print("Vector:", x)
print("Mean:", mean_x)
print("Standard Deviation:", std_x)
print("Median:", median_x)
print("Range:", range_x)
print("Ran Exercise 2.1.1")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment