ocf-data-sampler 0.5.12__py3-none-any.whl → 0.5.13__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.

@@ -25,13 +25,13 @@ def _get_pixel_index_location(da: xr.DataArray, location: Location) -> tuple[int
25
25
  x, y = location.in_coord_system(target_coords)
26
26
 
27
27
  # Check that requested point lies within the data
28
- if not (da[x_dim].min() < x < da[x_dim].max()):
28
+ if not (da[x_dim].values[0] < x < da[x_dim].values[-1]):
29
29
  raise ValueError(
30
- f"{x} is not in the interval {da[x_dim].min().values}: {da[x_dim].max().values}",
30
+ f"{x} is not in the interval {da[x_dim].values[0]}: {da[x_dim].values[-1]}",
31
31
  )
32
- if not (da[y_dim].min() < y < da[y_dim].max()):
32
+ if not (da[y_dim].values[0] < y < da[y_dim].values[-1]):
33
33
  raise ValueError(
34
- f"{y} is not in the interval {da[y_dim].min().values}: {da[y_dim].max().values}",
34
+ f"{y} is not in the interval {da[y_dim].values[0]}: {da[y_dim].values[-1]}",
35
35
  )
36
36
 
37
37
  x_index = da.get_index(x_dim)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.5.12
3
+ Version: 0.5.13
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -37,7 +37,7 @@ ocf_data_sampler/select/fill_time_periods.py,sha256=TlGxp1xiAqnhdWfLy0pv3FuZc00d
37
37
  ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=etkr6LuB7zxkfzWJ6SgHiULdRuFzFlq5bOUNd257Qx4,11545
38
38
  ocf_data_sampler/select/geospatial.py,sha256=rvMy_e--3tm-KAy9pU6b9-UMBQqH2sXykr3N_4SHYy4,6528
39
39
  ocf_data_sampler/select/location.py,sha256=Qp0di-Pgq8WLjN9IBcTVTaRM3lckhr4ZVzaDRcgVXHw,2352
40
- ocf_data_sampler/select/select_spatial_slice.py,sha256=0nwIRa1Wbmasxgz_PiDvXkNPUaYCdZNaUaOmkV4YIE0,7192
40
+ ocf_data_sampler/select/select_spatial_slice.py,sha256=Ym_YJjZqeMPC5Bw_xMi7Re2-uCbUagm2KXhnAnstTHo,7200
41
41
  ocf_data_sampler/select/select_time_slice.py,sha256=HeHbwZ0CP03x0-LaJtpbSdtpLufwVTR73p6wH6O_PS8,5513
42
42
  ocf_data_sampler/torch_datasets/datasets/__init__.py,sha256=o0SsEXXZ6k9iL__5_RN1Sf60lw_eqK91P3UFEHAD2k0,102
43
43
  ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py,sha256=1uwcbEKakXsqr_ZcSjpzf3esP5tA_YVlYgtj9vBjtdM,12115
@@ -56,7 +56,7 @@ ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0Wrg
56
56
  ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul3l0EP73Ik002fStr_bhsZh9mQqEU,4735
57
57
  scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
58
58
  scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
59
- ocf_data_sampler-0.5.12.dist-info/METADATA,sha256=2s4Pf9ZEgBo72guZFO6JI3mwJzOGRxLmkmeihiQ8Ogw,12817
60
- ocf_data_sampler-0.5.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
- ocf_data_sampler-0.5.12.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
62
- ocf_data_sampler-0.5.12.dist-info/RECORD,,
59
+ ocf_data_sampler-0.5.13.dist-info/METADATA,sha256=1PrPyQawUd1CYnPf2z6ZCn16aLFKr-7OIKTVlaBIELI,12817
60
+ ocf_data_sampler-0.5.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
+ ocf_data_sampler-0.5.13.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
62
+ ocf_data_sampler-0.5.13.dist-info/RECORD,,