Last active
February 16, 2022 10:24
-
-
Save anandtripathi5/a12d474bd53a2b854277aaac4a3b9c49 to your computer and use it in GitHub Desktop.
Zen of python - Sparse is better than dense
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if i>0: return sqrt(i) | |
elif i==0: return 0 | |
else: return 1j * sqrt(-i) | |
# Versus | |
if i > 0: | |
return sqrt(i) | |
elif i == 0: | |
return 0 | |
return 1j * sqrt(-i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment