Last active
February 12, 2022 21:38
-
-
Save nschloe/ef87dce5062cf2889680a120b53ff5c8 to your computer and use it in GitHub Desktop.
cplot Lambert series
This file contains 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
import cplot | |
import numpy as np | |
def lambert_series(z, n=100): | |
zn = z.copy() | |
s = np.zeros_like(z) | |
for _ in range(n): | |
s += zn / (1 - zn) | |
zn *= z | |
return s | |
plt = cplot.plot(lambert_series, (-1.1, 1.1, 500), (-1.1, 1.1, 500)) | |
plt.savefig("lambert-series.png", bbox_inches="tight") | |
plt.show() |
Author
nschloe
commented
Feb 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment