Created
June 18, 2022 23:35
-
-
Save angeloped/e254fa21b199c6b7fde15712aebdeca1 to your computer and use it in GitHub Desktop.
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
# https://gist.github.com/davebiagioni/1ac21feb1c2db04be4e6 | |
# https://stackoverflow.com/questions/60695284/linearly-spaced-array-in-c | |
def linspace(x1, x2, nstep): | |
step = (x2 - x1) / (nstep - 1) | |
return [round(x1 + (i * step), 8) for i in range(0, nstep)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment