Created
September 26, 2017 15:39
-
-
Save daguiam/dc81e7398a8e64d69a44ecc2b87c5ff5 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 convert_dict_keys_to_numpy(dictionary): | |
""" | |
Converts each element in dictionary to numpy array | |
Parameters: | |
---------- | |
dictionary : dict | |
Dictionary where each element is a list that must be converted to array | |
Returns: | |
------- | |
dictionary : dict | |
""" | |
for key in dictionary.keys(): | |
dictionary[key] = np.array(dictionary[key]) | |
return dictionary | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment