Skip to content

Instantly share code, notes, and snippets.

@FrancescAlted
Created September 12, 2022 07:27
Show Gist options
  • Save FrancescAlted/3e63ef54f41894d61719a5018668ced6 to your computer and use it in GitHub Desktop.
Save FrancescAlted/3e63ef54f41894d61719a5018668ced6 to your computer and use it in GitHub Desktop.
area_circle = ia.nansum(circle)
area_square = ia.nansum(square)
print(f"PI estimate: {4 * area_circle / area_square}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment