#NEWLINE# def get_ts( self , idx ) : #NEWLINE# #INDENT# '\n        Get a time series from the formatted file.\n\n        Parameters\n        ----------\n        idx : tuple of ints, or a list of a tuple of ints\n            idx can be (layer, row, column) or it can be a list in the form\n            [(layer, row, column), (layer, row, column), ...].  The layer,\n            row, and column values must be zero based.\n\n        Returns\n        ----------\n        out : numpy array\n            Array has size (ntimes, ncells + 1).  The first column in the\n            data array will contain time (totim).\n\n        See Also\n        --------\n\n        Notes\n        -----\n\n        The layer, row, and column values must be zero-based, and must be\n        within the following ranges: 0 <= k < nlay; 0 <= i < nrow; 0 <= j < ncol\n\n        Examples\n        --------\n\n        ' #NEWLINE# kijlist = self . _build_kijlist ( irec ) #NEWLINE# nstation = self . _get_nstation ( idx , kijlist ) #NEWLINE# result = self . _init_result ( nstation ) #NEWLINE# istat = 1 #NEWLINE# for ( k , i , j ) in kijlist : #NEWLINE# #INDENT# recordlist = [ ] #NEWLINE# ioffset_col = ( j * self . _col_data_size ) #NEWLINE# for ( irec , header ) in enumerate ( self . recordarray ) : #NEWLINE# #INDENT# ilay = ( header [ 'ilay' ] - 1 ) #NEWLINE# if ( ilay != k ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ipos = self . iposarray [ irec ] #NEWLINE# self . file . seek ( ( ipos + ioffset_col ) , 0 ) #NEWLINE# itim = np . where ( ( result [ : , 0 ] == header [ 'totim' ] ) ) [ 0 ] #NEWLINE# result [ ( itim , istat ) ] = self . _read_val ( i ) #NEWLINE# #UNINDENT# istat += 1 #NEWLINE# #UNINDENT# return result