def list2numpy(l, dtype=object):
 from numpy import empty
 a = empty(len(l), dtype)
 for (i, s) in enumerate(l):
  a[i] = s
 return a

def list2numpy ( l , dtype = object ) : from numpy import empty a = empty ( len ( l ) , dtype ) for ( i , s ) in enumerate ( l ) : a [ i ] = s return a
converts python list of sympy expressions to a numpy array .