Created
December 7, 2017 02:08
-
-
Save ty60/d63842f06deba3acddd4f5cda493b64f 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
def gen_vector_counter(vec_len): | |
if vec_len <= 1: | |
return defaultdict(int) | |
else: | |
t = partial(gen_vector_counter, vec_len - 1) | |
return defaultdict(t) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment