Created
June 21, 2015 22:04
-
-
Save prologic/ec2ed327030d445bfe92 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
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
from itertools import chain, ifilter, imap # noqa | |
def flatten(*seq): | |
return chain(*(chain.from_iterable(x) for x in seq)) | |
def within(x, y): | |
def f(i): | |
return x <= i <= y | |
return f | |
a = [[0.8, 0.9, 1.], [0.5, 2.6, 2.2], [1.5, 5.6], [5.8, 2.3, 1.9], ] | |
b = [[6.5, 3.9, 7.5], [2.5, 4.6, 8.8], [1, 2, 5], ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: