@doctest_depends_on(modules=('numpy',))
def symarray(prefix, shape, **kwargs):
 from numpy import empty, ndindex
 arr = empty(shape, dtype=object)
 for index in ndindex(shape):
  arr[index] = Symbol(('%s_%s' % (prefix, '_'.join(map(str, index)))), **kwargs)
 return arr

@ doctest_depends_on ( modules = ( 'numpy' , ) ) def symarray ( prefix , shape , ** kwargs ) : from numpy import empty , ndindex arr = empty ( shape , dtype = object ) for index in ndindex ( shape ) : arr [ index ] = Symbol ( ( '%s_%s' % ( prefix , '_' . join ( map ( str , index ) ) ) ) , ** kwargs ) return arr
create a numpy ndarray of symbols .