Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def pythagorean_triples():
current = np.array([[3, 4, 5]]) # Initial seed
yield from current # Yield first triple
while True:
current = next_pythagorean_triples(current) # Next iteration
yield from current # Yield each triple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.