doppy 0.5.1__cp310-abi3-macosx_10_12_x86_64.whl → 0.5.3__cp310-abi3-macosx_10_12_x86_64.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 doppy might be problematic. Click here for more details.

@@ -1,4 +1,3 @@
1
- # type: ignore
2
1
  from __future__ import annotations
3
2
 
4
3
  from dataclasses import dataclass
@@ -94,18 +93,18 @@ def _compute_variance(vert: VerticalWind, period: float) -> VarResult:
94
93
  N_cumsum = N_i.cumsum(axis=0)
95
94
 
96
95
  def N_func(i: int, j: int) -> npt.NDArray[np.float64]:
97
- return N_cumsum[j] - N_cumsum[i] + N_i[i]
96
+ return np.array(N_cumsum[j] - N_cumsum[i] + N_i[i], dtype=np.float64)
98
97
 
99
98
  def S(i: int, j: int) -> npt.NDArray[np.float64]:
100
- return X_cumsum[j] - X_cumsum[i] + X[i]
99
+ return np.array(X_cumsum[j] - X_cumsum[i] + X[i], dtype=np.float64)
101
100
 
102
101
  def S2(i: int, j: int) -> npt.NDArray[np.float64]:
103
- return X2_cumsum[j] - X2_cumsum[i] + X2[i]
102
+ return np.array(X2_cumsum[j] - X2_cumsum[i] + X2[i], dtype=np.float64)
104
103
 
105
104
  def var_ij(i: int, j: int) -> npt.NDArray[np.float64]:
106
105
  N = N_func(i, j)
107
106
  with np.errstate(invalid="ignore"):
108
- return (S2(i, j) - S(i, j) ** 2 / N) / N
107
+ return np.array((S2(i, j) - S(i, j) ** 2 / N) / N, dtype=np.float64)
109
108
 
110
109
  half_period = np.timedelta64(int(1e6 * period / 2), "us")
111
110
  period_start = np.full(vert.w.shape, np.datetime64("NaT", "us"))
@@ -147,7 +146,7 @@ def _length_scale_low(
147
146
 
148
147
  def _preprocess_horiontal_wind(
149
148
  vert: VerticalWind, hori: HorizontalWind, options: Options
150
- ):
149
+ ) -> npt.NDArray[np.float64]:
151
150
  if np.isnan(hori.V).any():
152
151
  raise ValueError("horizontal wind speed cannot contains NaNs")
153
152
  trg_points = np.meshgrid(vert.time, vert.height, indexing="ij")
@@ -186,8 +185,8 @@ def _rolling_mean_over_time(
186
185
 
187
186
  S = arr.cumsum(axis=0)
188
187
 
189
- def rolling_mean(i: int, j: int) -> npt.NDArray[np.flaat64]:
190
- return (S[j] - S[i] + arr[i]) / (j - i + 1)
188
+ def rolling_mean(i: int, j: int) -> npt.NDArray[np.float64]:
189
+ return np.array((S[j] - S[i] + arr[i]) / (j - i + 1), dtype=np.float64)
191
190
 
192
191
  half_period = np.timedelta64(int(period * 0.5e6), "us")
193
192
  rol_mean = np.full(arr.shape, np.nan, dtype=np.float64)
@@ -208,7 +207,7 @@ def _compute_dissipation_rate(
208
207
  variance: npt.NDArray[np.float64],
209
208
  length_scale_lower: npt.NDArray[np.float64],
210
209
  length_scale_upper: npt.NDArray[np.float64],
211
- ):
210
+ ) -> npt.NDArray[np.float64]:
212
211
  """
213
212
  Parameters
214
213
  ----------
@@ -225,10 +224,10 @@ def _compute_dissipation_rate(
225
224
  * (length_scale_upper ** (2 / 3) - length_scale_lower ** (2 / 3))
226
225
  ** (-3 / 2)
227
226
  )
228
- return dr
227
+ return np.array(dr, dtype=np.float64)
229
228
 
230
229
 
231
- def _next_valid_from_mask(mask):
230
+ def _next_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
232
231
  """
233
232
  mask[t,v] (time,value)
234
233
 
@@ -244,10 +243,10 @@ def _next_valid_from_mask(mask):
244
243
  for t in reversed(range(n - 1)):
245
244
  N[t][~mask[t]] = t
246
245
  N[t][mask[t]] = N[t + 1][mask[t]]
247
- return N
246
+ return np.array(N, dtype=np.int64)
248
247
 
249
248
 
250
- def _prev_valid_from_mask(mask):
249
+ def _prev_valid_from_mask(mask: npt.NDArray[np.bool_]) -> npt.NDArray[np.int64]:
251
250
  """
252
251
  mask[t,v] (time,value)
253
252
 
@@ -262,4 +261,4 @@ def _prev_valid_from_mask(mask):
262
261
  for t in range(1, n):
263
262
  N[t][~mask[t]] = t
264
263
  N[t][mask[t]] = N[t - 1][mask[t]]
265
- return N
264
+ return np.array(N, dtype=np.int64)
doppy/rs.abi3.so CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: doppy
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -1,10 +1,10 @@
1
- doppy-0.5.1.dist-info/METADATA,sha256=Tv27VxO7NPbaTq0f5WQX2t06zSyi1yPouyVYcffzqXs,4315
2
- doppy-0.5.1.dist-info/WHEEL,sha256=VOPc4LnjY0yPhQSb3E0q8XFYhkjUnHylSjI09QJpAgM,105
3
- doppy-0.5.1.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
- doppy-0.5.1.dist-info/licenses/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
1
+ doppy-0.5.3.dist-info/METADATA,sha256=iaWUuv-a0gsBRjMkHS05y9_YeS2sWph8ixuF43UAHFc,4315
2
+ doppy-0.5.3.dist-info/WHEEL,sha256=VOPc4LnjY0yPhQSb3E0q8XFYhkjUnHylSjI09QJpAgM,105
3
+ doppy-0.5.3.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
+ doppy-0.5.3.dist-info/licenses/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
5
5
  doppy/options.py,sha256=73BDODO4OYHn2qOshhwz6u6G3J1kNd3uj6P0a3V4HBE,205
6
6
  doppy/__init__.py,sha256=Z9aEUlbPRWRUAoB8_-djkgrJuS4-6pjem4-mVSB6Z9I,191
7
- doppy/product/turbulence.py,sha256=AcLHQFeyBla0pP5CQtvJbYKupuuy-dwZK0CFlowBl9k,8251
7
+ doppy/product/turbulence.py,sha256=hajTHFr6XXdul8oU9dw4Y58kBwRpUBIfiOfTcvSjq7M,8606
8
8
  doppy/product/wind.py,sha256=efBfYalILN2VvDiGpxP04mob-mCrdQFS9tdhReeyXiU,16787
9
9
  doppy/product/__init__.py,sha256=C6s9cX20m9UwRsKo1lZH6TnYFfM5KmsX5MPUyShbgl4,235
10
10
  doppy/product/stare_depol.py,sha256=gSlD13jGLRmHyTDADFs_MO6ECos6wwKF-TL7G7NwHAA,10718
@@ -28,5 +28,5 @@ doppy/raw/halo_bg.py,sha256=8t9j-SUF1yJht3vrT6KAYJQyxcg3W-0zr8h0jAEhWes,5815
28
28
  doppy/raw/halo_hpl.py,sha256=tK0H6LAOcoWqF4vvNu8VRCYq_spvcSTHRM4ju4gx5Lo,16828
29
29
  doppy/raw/windcube.py,sha256=HKAlU-TUVqA1sefRLOY5skM1twQaVe-MExlZoI40rK4,19149
30
30
  doppy/__main__.py,sha256=zrKQJVj0k0ypBQCGK65Czt9G9FZ_qx3ussw6Q9VJ14g,346
31
- doppy/rs.abi3.so,sha256=PNmTx9XM_g7_N-FzIJhn8ZTasGWo3u22mASKNwDYEgA,2716068
32
- doppy-0.5.1.dist-info/RECORD,,
31
+ doppy/rs.abi3.so,sha256=v49dHuCKgYVheWZnDxI8jChnJHs7UJvQmHzbOdTFVvU,2677868
32
+ doppy-0.5.3.dist-info/RECORD,,
File without changes