Skip to content

Instantly share code, notes, and snippets.

@GitHubEmploy
Created June 3, 2022 18:22
Show Gist options
  • Save GitHubEmploy/6e956dc92b7c1b6e07451d0b1300634d to your computer and use it in GitHub Desktop.
Save GitHubEmploy/6e956dc92b7c1b6e07451d0b1300634d to your computer and use it in GitHub Desktop.
import time
import numpy as np
rscores = np.random.randint(1, 100, size=100000010)
s = time.time()
mean_failed = (rscores[rscores < 70]).mean()
print(mean_failed)
print(f'Numpy: {time.time() - s} seconds')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment