Last active
February 28, 2018 00:36
-
-
Save robertmaxwilliams/bd064ac303a0f6b5257cbd6f17ee3c29 to your computer and use it in GitHub Desktop.
converts numbers into other numbers, good luck me in the future.
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
# copy filter from here and paste into stdin | |
# http://dev.theomader.com/gaussian-kernel-calculator/ | |
input_string = input("paste in filter, it won't have spaces but that's okay: ") | |
float_filter = [float('0.'+x) for x in input_string.split('0.')][1:] | |
smallest = min(float_filter) | |
discrete_filter = [round(x/smallest) for x in float_filter] | |
print(discrete_filter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment