File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def paramset_to_rootnames(paramset):
1919 paramset (:obj:`pyhf.paramsets.paramset`): The parameter set.
2020
2121 Returns:
22- :obj:`List [str]` or :obj:`str`: The generated parameter names
22+ :obj:`list [str]` or :obj:`str`: The generated parameter names
2323 (for the non-scalar/scalar case) respectively.
2424
2525 Example:
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
13import logging
2- from typing import List
34
45import pyhf
56from pyhf import events
1011log = logging .getLogger (__name__ )
1112
1213
13- def required_parset (sigmas , fixed : List [bool ]):
14+ def required_parset (sigmas , fixed : list [bool ]):
1415 n_parameters = len (sigmas )
1516 return {
1617 'paramset_type' : 'constrained_by_normal' ,
Original file line number Diff line number Diff line change 1- from typing import List
2-
31import pyhf
42
53__all__ = [
@@ -29,7 +27,7 @@ def __init__(self, **kwargs):
2927 )
3028
3129 @property
32- def suggested_fixed (self ) -> List [bool ]:
30+ def suggested_fixed (self ) -> list [bool ]:
3331 if isinstance (self ._suggested_fixed , bool ):
3432 return [self ._suggested_fixed ] * self .n_parameters
3533 return self ._suggested_fixed
Original file line number Diff line number Diff line change 22
33import copy
44import logging
5- from typing import List , Union
5+ from typing import Union
66
77import pyhf .parameters
88import pyhf
@@ -406,7 +406,7 @@ def param_set(self, name):
406406 """
407407 return self .par_map [name ]['paramset' ]
408408
409- def suggested_fixed (self ) -> List [bool ]:
409+ def suggested_fixed (self ) -> list [bool ]:
410410 """
411411 Identify the fixed parameters in the model.
412412
Original file line number Diff line number Diff line change 55 IO ,
66 Callable ,
77 Iterable ,
8- List ,
98 MutableMapping ,
109 MutableSequence ,
1110 Sequence ,
@@ -99,7 +98,7 @@ def extract_error(hist: uproot.behaviors.TH1.TH1) -> list[float]:
9998 """
10099
101100 variance = hist .variances () if hist .weighted else hist .to_numpy ()[0 ]
102- return cast (List [float ], np .sqrt (variance ).tolist ())
101+ return cast (list [float ], np .sqrt (variance ).tolist ())
103102
104103
105104def import_root_histogram (
You can’t perform that action at this time.
0 commit comments