#NEWLINE# def create( shape , dtype = 'd' ) : #NEWLINE# #INDENT# "Create an uninitialised shared array. Avoid object arrays, as these\n    will almost certainly break as the objects themselves won't be stored in shared\n    memory, only the pointers" #NEWLINE# shape = numpy . atleast_1d ( shape ) . astype ( 'i' ) #NEWLINE# N = numpy . prod ( shape ) #NEWLINE# dtype = numpy . dtype ( dtype ) #NEWLINE# dt = dtype . char #NEWLINE# if ( not ( dt in sharedctypes . typecode_to_type . keys ( ) ) ) : #NEWLINE# #INDENT# dt = 'b' #NEWLINE# N *= dtype . itemsize #NEWLINE# #UNINDENT# a = sharedctypes . RawArray ( dt , N ) #NEWLINE# sa = shmarray ( a , shape , dt ) #NEWLINE# return sa