ocf-data-sampler 0.2.30__py3-none-any.whl → 0.2.32__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 ocf-data-sampler might be problematic. Click here for more details.

@@ -1,6 +1,5 @@
1
1
  """Convert NWP to NumpySample."""
2
2
 
3
- import pandas as pd
4
3
  import xarray as xr
5
4
 
6
5
  from ocf_data_sampler.numpy_sample.common_types import NumpySample
@@ -28,7 +27,7 @@ def convert_nwp_to_numpy_sample(da: xr.DataArray, t0_idx: int | None = None) ->
28
27
  NWPSampleKey.nwp: da.values,
29
28
  NWPSampleKey.channel_names: da.channel.values,
30
29
  NWPSampleKey.init_time_utc: da.init_time_utc.values.astype(float),
31
- NWPSampleKey.step: (da.step.values / pd.Timedelta("1h")).astype(int),
30
+ NWPSampleKey.step: (da.step.values / 3600).astype(int),
32
31
  NWPSampleKey.target_time_utc: da.target_time_utc.values.astype(float),
33
32
  }
34
33
 
@@ -31,7 +31,7 @@ class SiteSample(SampleBase):
31
31
  @override
32
32
  def load(cls, path: str) -> "SiteSample":
33
33
  # Loads from NetCDF
34
- return cls(xr.open_dataset(path))
34
+ return cls(xr.open_dataset(path, decode_timedelta=False))
35
35
 
36
36
  @override
37
37
  def plot(self) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.2.30
3
+ Version: 0.2.32
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -26,7 +26,7 @@ ocf_data_sampler/numpy_sample/collate.py,sha256=hoxIc5SoHoIs3Nx37aRZzWChpswjy9lH
26
26
  ocf_data_sampler/numpy_sample/common_types.py,sha256=9CjYHkUTx0ObduWh43fhsybZCTXvexql7qC2ptMDoek,377
27
27
  ocf_data_sampler/numpy_sample/datetime_features.py,sha256=qoUOQzHZebnc5JiXCwm258kPLwNRNJgE5JcVHKI9b70,1278
28
28
  ocf_data_sampler/numpy_sample/gsp.py,sha256=aUHDIUSu2LMsVmR7TsTriZxVfv495QNL-scaxyJFHgQ,1149
29
- ocf_data_sampler/numpy_sample/nwp.py,sha256=X9T5XZLVucXX8QAUhdeTnomNBPrsfvsO8I4SXaQHDxE,1112
29
+ ocf_data_sampler/numpy_sample/nwp.py,sha256=lXqE2Il0xX5hzz76HHkiYmfDsXWWhmaA_6bSnmwbAXU,1078
30
30
  ocf_data_sampler/numpy_sample/satellite.py,sha256=RaYzYIcB1AmDrKeiqSpn4QVfBH-QMe26F1P5t1az2Jg,1111
31
31
  ocf_data_sampler/numpy_sample/site.py,sha256=zfYBjK3CJrIaKH1QdKXU7gwOxTqONt527y3nJ9TRnwc,1325
32
32
  ocf_data_sampler/numpy_sample/sun_position.py,sha256=5tt-zNm6aRuZMsxZPaAxyg7HeikswfZCeHWXTHuO2K0,1555
@@ -43,7 +43,7 @@ ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py,sha256=cd4IyzYu8rMFgLHRXqYp
43
43
  ocf_data_sampler/torch_datasets/datasets/site.py,sha256=btzYgY0HtDT7bvPxLq6UuIGVqsq3icGDpB0O4WZH5gE,17563
44
44
  ocf_data_sampler/torch_datasets/sample/__init__.py,sha256=GL84vdZl_SjHDGVyh9Uekx2XhPYuZ0dnO3l6f6KXnHI,100
45
45
  ocf_data_sampler/torch_datasets/sample/base.py,sha256=cQ1oIyhdmlotejZK8B3Cw6MNvpdnBPD8G_o2h7Ye4Vc,2206
46
- ocf_data_sampler/torch_datasets/sample/site.py,sha256=ZUEgn50g-GmqujOEtezNILF7wjokF80sDAA4OOldcRI,1268
46
+ ocf_data_sampler/torch_datasets/sample/site.py,sha256=Pq-QjAg88kWXzFR4ci5ATaTWA864eifU7wrJSpmqK4s,1292
47
47
  ocf_data_sampler/torch_datasets/sample/uk_regional.py,sha256=Xx5cBYUyaM6PGUWQ76MHT9hwj6IJ7WAOxbpmYFbJGhc,10483
48
48
  ocf_data_sampler/torch_datasets/utils/__init__.py,sha256=N7i_hHtWUDiJqsiJoDx4T_QuiYOuvIyulPrn6xEA4TY,309
49
49
  ocf_data_sampler/torch_datasets/utils/channel_dict_to_dataarray.py,sha256=un2IiyoAmTDIymdeMiPU899_86iCDMD-oIifjHlNyqw,555
@@ -55,7 +55,7 @@ ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul
55
55
  scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
56
56
  scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
57
57
  utils/compute_icon_mean_stddev.py,sha256=a1oWMRMnny39rV-dvu8rcx85sb4bXzPFrR1gkUr4Jpg,2296
58
- ocf_data_sampler-0.2.30.dist-info/METADATA,sha256=hSAclAkxzFZ9tJm8wwlj6k9_5VHQw-zgDFOqjHsCGmE,12184
59
- ocf_data_sampler-0.2.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
- ocf_data_sampler-0.2.30.dist-info/top_level.txt,sha256=LEFU4Uk-PEo72QGLAfnVZIUEm37Q8mKuMeg_Xk-p33g,31
61
- ocf_data_sampler-0.2.30.dist-info/RECORD,,
58
+ ocf_data_sampler-0.2.32.dist-info/METADATA,sha256=NZ29xNAjkgJgfpfnvHqjh3cn7aU8vlzOVBjjab9Ksj4,12184
59
+ ocf_data_sampler-0.2.32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
+ ocf_data_sampler-0.2.32.dist-info/top_level.txt,sha256=LEFU4Uk-PEo72QGLAfnVZIUEm37Q8mKuMeg_Xk-p33g,31
61
+ ocf_data_sampler-0.2.32.dist-info/RECORD,,