Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created November 12, 2023 00:18
Show Gist options
  • Save stephengruppetta/500ef92c1bd8a6511bb4dea2bf871a52 to your computer and use it in GitHub Desktop.
Save stephengruppetta/500ef92c1bd8a6511bb4dea2bf871a52 to your computer and use it in GitHub Desktop.
import numpy as np
x = np.linspace(-1, 1, 10)
print(x)
X, Y = np.meshgrid(x, x)
print(X)
radius = 0.5
disc = (X ** 2) + (Y ** 2) < radius ** 2
print(disc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment