@@ -662,53 +662,42 @@ def read_page(
662662 def read_cluster_range (
663663 self ,
664664 col_idx ,
665- cluster_range ,
665+ cluster_start ,
666+ cluster_stop ,
666667 missing_element_padding = 0 ,
667- first_cluster_page_start = None ,
668- last_cluster_page_stop = None ,
669668 array_cache = None ,
670669 ):
671670 """
672671 Args:
673- ncol (int): The column id.
674- cluster_range (range): The range of cluster indices.
672+ col_idx (int): The column index.
673+ cluster_start (int): The first cluster to include.
674+ cluster_stop (int): The first cluster to exclude (i.e. one greater than the last cluster to include).
675675 missing_element_padding (int): Number of padding elements to add at the start of the array.
676- first_cluster_page_start (None or int): The first page of the first cluster to include. If None, start from the beginning.
677- If negative, count from the end, like a Python slice.
678- last_cluster_page_stop (None or int): The first page of the last cluster to exclude (i.e. one greater
679- than the last page to include). If None, stop at the end. If negative,
680- count from the end, like a Python slice.
681676 array_cache (None, or MutableMapping): Cache of arrays. If None, do not use a cache.
682677
683678 Returns a numpy array with the data from the column.
684679 """
685680 field_metadata = self .get_field_metadata (col_idx )
686681 arrays = [
687- self .read_page_range (
682+ self .read_pages (
688683 cluster_idx ,
689684 col_idx ,
690685 field_metadata ,
691- page_start = first_cluster_page_start if i == 0 else None ,
692- page_stop = (
693- last_cluster_page_stop if i == len (cluster_range ) - 1 else None
694- ),
695686 array_cache = array_cache ,
696687 )
697- for i , cluster_idx in enumerate ( cluster_range )
688+ for cluster_idx in range ( cluster_start , cluster_stop )
698689 ]
699690 res = self .combine_cluster_arrays (
700691 arrays , field_metadata , missing_element_padding
701692 )
702693
703694 return res
704695
705- def read_page_range (
696+ def read_pages (
706697 self ,
707698 cluster_idx ,
708699 col_idx ,
709700 field_metadata ,
710- page_start = None ,
711- page_stop = None ,
712701 array_cache = None ,
713702 ):
714703 """
@@ -717,9 +706,6 @@ def read_page_range(
717706 col_idx (int): The column index.
718707 field_metadata (:doc:`uproot.models.RNTuple.FieldClusterMetadata`):
719708 The metadata needed to read the field's pages.
720- page_start (None or int): The first page to include. If None, start from the beginning.
721- page_stop (None or int): The first page to exclude (i.e. one greater
722- than the last page to include). If None, stop at the end.
723709 array_cache (None or MutableMapping): Cache of arrays. If None, do not use a cache.
724710
725711 Returns a numpy array with the data from the column.
@@ -733,7 +719,7 @@ def read_page_range(
733719 col_idx
734720 ) # Update metadata if suppressed
735721 pagelist = (
736- linklist [field_metadata .ncol ].pages [ page_start : page_stop ]
722+ linklist [field_metadata .ncol ].pages
737723 if field_metadata .ncol < len (linklist )
738724 else []
739725 )
@@ -742,9 +728,7 @@ def read_page_range(
742728
743729 tracker = 0
744730 cumsum = 0
745- for page_idx , page_desc in enumerate (
746- pagelist , start = page_start if page_start is not None else 0
747- ):
731+ for page_idx , page_desc in enumerate (pagelist ):
748732 n_elements = page_desc .num_elements
749733 tracker_end = tracker + n_elements
750734 self .read_page (
0 commit comments