careamics 0.0.10__py3-none-any.whl → 0.0.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of careamics might be problematic. Click here for more details.

@@ -21,9 +21,13 @@ def compute_normalization_stats(image: NDArray) -> tuple[NDArray, NDArray]:
21
21
  tuple of (list of floats, list of floats)
22
22
  Lists of mean and standard deviation values per channel.
23
23
  """
24
- # Define the list of axes excluding the channel axis
25
- axes = tuple(np.delete(np.arange(image.ndim), 1))
26
- return np.mean(image, axis=axes), np.std(image, axis=axes)
24
+ # Define the lists for storing mean and std values
25
+ means, stds = [], []
26
+ # Iterate over the channels dimension and compute mean and std
27
+ for ax in range(image.shape[1]):
28
+ means.append(image[:, ax, ...].mean())
29
+ stds.append(image[:, ax, ...].std())
30
+ return np.stack(means), np.stack(stds)
27
31
 
28
32
 
29
33
  def update_iterative_stats(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: careamics
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Toolbox for running N2V and friends.
5
5
  Project-URL: homepage, https://careamics.github.io/
6
6
  Project-URL: repository, https://github.com/CAREamics/careamics
@@ -63,7 +63,7 @@ careamics/dataset/dataset_utils/__init__.py,sha256=MJ3xriL6R4ZtmzbvLsASUWLb85Hk5
63
63
  careamics/dataset/dataset_utils/dataset_utils.py,sha256=X83DzaOWmHdl4eOPac2IQJH3bPA43RVq0hPrFrzvIXQ,2630
64
64
  careamics/dataset/dataset_utils/file_utils.py,sha256=ru6AtQ9LCmo6raN1-GnJEN4UyP1PbmSdR9MEys3CuHo,4094
65
65
  careamics/dataset/dataset_utils/iterate_over_files.py,sha256=zsNhIDMHUsPMbqwG7cfuSc26Svg5hERHcrXfftKaUoY,2898
66
- careamics/dataset/dataset_utils/running_stats.py,sha256=kWorioMH4S5uZj2cvUpjHB6cIUhMFa1XXwDQrrKIWdI,5752
66
+ careamics/dataset/dataset_utils/running_stats.py,sha256=clnSs4TR-lUiQNIYs1ay1_n3wUoeRQqY83V2K70ZBtM,5897
67
67
  careamics/dataset/patching/__init__.py,sha256=7-s12oUAZNlMOwSkxSwbD7vojQINWYFzn_4qIJ87WBg,37
68
68
  careamics/dataset/patching/patching.py,sha256=deAxY34Iz-mguBlHQ-5EO4vRhPpR9I3LQ9onV1K_KqA,8858
69
69
  careamics/dataset/patching/random_patching.py,sha256=gm1jxye9yvHbdijLzCtDSzRU_9j110GRLMnJaUwLAHQ,6487
@@ -188,8 +188,8 @@ careamics/utils/receptive_field.py,sha256=Y2h4c8S6glX3qcx5KHDmO17Kkuyey9voxfoXyq
188
188
  careamics/utils/serializers.py,sha256=mILUhz75IMpGKnEzcYu9hlOPG8YIiIW09fk6eZM7Y8k,1427
189
189
  careamics/utils/torch_utils.py,sha256=_Cf3HdlIRl5hxfpUg9aofCSlcW7GSsIJxsbSORXko0U,3010
190
190
  careamics/utils/version.py,sha256=WKtMlrNmXymJqzMfguBX558D6tb6aoAZfbABRh_ViIs,1142
191
- careamics-0.0.10.dist-info/METADATA,sha256=-OAGJepthRIcvZVDlc7uhgtipB5vOFb_8p5FTA09Zos,3917
192
- careamics-0.0.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
193
- careamics-0.0.10.dist-info/entry_points.txt,sha256=2fSNVXJWDJgFLATVj7MkjFNvpl53amG8tUzC3jf7G1s,53
194
- careamics-0.0.10.dist-info/licenses/LICENSE,sha256=6zdNW-k_xHRKYWUf9tDI_ZplUciFHyj0g16DYuZ2udw,1509
195
- careamics-0.0.10.dist-info/RECORD,,
191
+ careamics-0.0.11.dist-info/METADATA,sha256=AKeMVWNP52xha3axDHE2j_y5wn5OroRFbxvQB1GVUVY,3917
192
+ careamics-0.0.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
193
+ careamics-0.0.11.dist-info/entry_points.txt,sha256=2fSNVXJWDJgFLATVj7MkjFNvpl53amG8tUzC3jf7G1s,53
194
+ careamics-0.0.11.dist-info/licenses/LICENSE,sha256=6zdNW-k_xHRKYWUf9tDI_ZplUciFHyj0g16DYuZ2udw,1509
195
+ careamics-0.0.11.dist-info/RECORD,,