Lines Matching refs:np
28 import numpy as np namespace
68 def check_noise_model_shape(noise_model: np.ndarray) -> None:
87 noise_model: np.ndarray,
133 gains: np.ndarray,
134 sens_max_analog: np.ndarray,
135 ) -> np.ndarray:
149 digital_gains = np.maximum(gains / sens_max_analog, 1)
150 if not np.all(digital_gains == 1):
189 mean_img: np.ndarray,
190 var_img: np.ndarray,
193 ) -> Tuple[np.ndarray, np.ndarray]:
234 means, vars_ = np.asarray(means), np.asarray(vars_)
239 means: np.ndarray,
240 vars_: np.ndarray,
246 ) -> Tuple[np.ndarray, np.ndarray]:
290 med = np.median(vars_i)
296 keep_indices = np.where(np.logical_and.reduce(constraints))
297 if not np.any(keep_indices):
316 means_i = np.asarray(means_i)
317 vars_i = np.asarray(vars_i)
323 means_filtered = np.asarray(means_filtered, dtype=object)
324 vars_filtered = np.asarray(vars_filtered, dtype=object)
371 ) -> Dict[int, List[Tuple[float, np.ndarray, np.ndarray]]]:
534 np.min(means), np.median(means), np.max(means),
538 np.min(vars_), np.median(vars_), np.max(vars_),
568 iso_to_stats_dict: Dict[int, List[Tuple[float, np.ndarray, np.ndarray]]],
627 samples: List[List[Tuple[float, np.ndarray, np.ndarray]]],
629 offset_a: np.ndarray,
630 offset_b: np.ndarray,
632 ) -> np.ndarray:
667 gains = np.asarray(gains).flatten()
668 means = np.asarray(means).flatten()
669 vars_ = np.asarray(vars_).flatten()
707 coeffs = np.append(coeffs, offset_a[pidx])
708 coeffs = np.append(coeffs, offset_b[pidx])
713 noise_model = np.asarray(noise_model)