@@ -2332,7 +2332,7 @@ def infer_uncertainty_precision(
23322332
23332333 prec = method
23342334 if _is_numpy :
2335- prec = np .ones (sig .shape , int ) * prec # type: ignore[union-attr, assignment]
2335+ prec = np .ones (sig .shape , int ) * prec # type: ignore[union-attr, assignment, type-var, operator] # noqa
23362336
23372337 elif method in ["pdg" , "pdg+1" , "publication" , "pub" ]:
23382338 # default precision
@@ -2358,7 +2358,7 @@ def infer_uncertainty_precision(
23582358 f"{ sig } \n and\n { mag } " ,
23592359 )
23602360
2361- prec = np .ones (sig .shape , int ) * prec # type: ignore[union-attr, assignment]
2361+ prec = np .ones (sig .shape , int ) * prec # type: ignore[union-attr, assignment, type-var, operator] # noqa
23622362
23632363 # make all decisions based on the three leading digits
23642364 first_three = np .round (sig * 100 ).astype (int ) # type: ignore[assignment]
@@ -2462,15 +2462,15 @@ def round_uncertainty(
24622462 if precision is not None :
24632463 if _is_numpy :
24642464 if not is_numpy (precision ):
2465- precision = np .ones (digits .shape , int ) * precision # type: ignore[union-attr]
2466- if np .any (precision <= 0 ):
2465+ precision = np .ones (digits .shape , int ) * precision # type: ignore[union-attr, type-var, operator] # noqa
2466+ if np .any (precision <= 0 ): # type: ignore[operator]
24672467 raise ValueError (f"precision must be positive: { precision } " )
24682468 elif precision <= 0 :
24692469 raise ValueError (f"precision must be positive: { precision } " )
24702470
24712471 digits_float = np .array (digits , float ) if _is_numpy else float (digits )
24722472 digits = match_precision (digits_float * 10.0 ** (precision - prec ), "1" , ** kwargs ) # type: ignore[operator] # noqa
2473- mag -= precision - prec
2473+ mag -= precision - prec # type: ignore[operator]
24742474
24752475 return ( # type: ignore[return-value]
24762476 digits ,
0 commit comments