Skip to content

Instantly share code, notes, and snippets.

@gabraganca
Created May 31, 2013 03:54
Show Gist options
  • Save gabraganca/5682858 to your computer and use it in GitHub Desktop.
Save gabraganca/5682858 to your computer and use it in GitHub Desktop.
import numpy as np
def create_list(list1, list2):
"""
list1 : N-dimensional list
list2 : 1-dimensional list
"""
return np.array([np.append(np.array(i), j) for i in list1 for j in list2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment