#NEWLINE# def array( self , features , processes = None , chunksize = 1 , ragged = False , **kwargs ) : #NEWLINE# #INDENT# '\n        Creates an MxN NumPy array of genomic signal for the region defined by\n        each feature in `features`, where M=len(features) and N=(bins or\n        feature length)\n\n        Parameters\n        ----------\n        features : iterable of interval-like objects\n            An iterable of interval-like objects; see docstring for\n            `local_coverage` method for more details.\n\n        processes : int or None\n            If not None, then create the array in parallel, giving each process\n            chunks of length `chunksize` to work on.\n\n        chunksize : int\n            `features` will be split into `chunksize` pieces, and each piece\n            will be given to a different process. The optimum value is\n            dependent on the size of the features and the underlying data set,\n            but `chunksize=100` is a good place to start.\n\n        ragged : bool\n            If False (default), then return a 2-D NumPy array.  This requires\n            all rows to have the same number of columns, which you get when\n            supplying `bins` or if all features are of uniform length.  If\n            True, then return a list of 1-D NumPy arrays\n\n        Notes\n        -----\n        Additional keyword args are passed to local_coverage() which performs\n        the work for each feature; see that method for more details.\n        ' #NEWLINE# if ( processes is not None ) : #NEWLINE# #INDENT# arrays = _array_parallel ( self . fn , self . __class__ , features , processes = processes , chunksize = chunksize , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# arrays = _array ( self . fn , self . __class__ , features , ** kwargs ) #NEWLINE# #UNINDENT# if ( not ragged ) : #NEWLINE# #INDENT# stacked_arrays = np . row_stack ( arrays ) #NEWLINE# del arrays #NEWLINE# return stacked_arrays #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return arrays