Skip to content

Commit

Permalink
Merge branch 'main' into update-pyo3
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci authored Dec 1, 2024
2 parents 6cef0c8 + c6646e9 commit 21a3f76
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
15 changes: 8 additions & 7 deletions gribberish/src/templates/product/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
pub mod product_template;
pub mod tables;
pub mod horizontal_analysis_template;
pub mod derived_ensemble_horizontal_analysis_template;
pub mod average_accumulation_extreme_horizontal_analysis_template;
pub mod derived_ensemble_horizontal_analysis_template;
pub mod derived_ensemble_horizontal_forecast_time_interval_template;
mod parameters;
pub mod horizontal_analysis_template;
pub mod parameters;
pub mod product_template;
pub mod tables;

pub use horizontal_analysis_template::HorizontalAnalysisForecastTemplate;
pub use average_accumulation_extreme_horizontal_analysis_template::AverageAccumulationExtremeHorizontalAnalysisForecastTemplate;
pub use derived_ensemble_horizontal_analysis_template::DerivedEnsembleHorizontalAnalysisForecastTemplate;
pub use average_accumulation_extreme_horizontal_analysis_template::AverageAccumulationExtremeHorizontalAnalysisForecastTemplate;
pub use horizontal_analysis_template::HorizontalAnalysisForecastTemplate;

4 changes: 2 additions & 2 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "gribberishjs"
version = "0.20.1"
version = "0.20.2"

[lib]
crate-type = ["cdylib"]
Expand All @@ -10,7 +10,7 @@ crate-type = ["cdylib"]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "2.5.0", default-features = false, features = ["chrono_date"] }
napi-derive = "2.5.0"
gribberish = { path = "../gribberish" }
gribberish = { path = "../gribberish", version = "0.20.2" }
chrono = "0.4"

[build-dependencies]
Expand Down
7 changes: 6 additions & 1 deletion python/gribberish/gribberish_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,18 @@ def __init__(
self.dtype = np.dtype(np.float64)
self.lock = DATA_VAR_LOCK

# For now, we rely on the builtin indexing support but explicitely
# set the indexers to be the array itself to utilize the same __getitem__ method
self.oindex = self
self.vindex = self

def __getitem__(
self, key: xr.core.indexing.ExplicitIndexer
) -> np.typing.ArrayLike:
return indexing.explicit_indexing_adapter(
key,
self.shape,
indexing.IndexingSupport.BASIC,
indexing.IndexingSupport.OUTER_1VECTOR,
self._raw_indexing_method,
)

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ classifiers = [
]
dynamic = ["version"]

dependencies = ["numpy < 2"]
dependencies = ["numpy >= 2"]

[project.optional-dependencies]
xarray = ["xarray", "fsspec"]
Expand Down

0 comments on commit 21a3f76

Please sign in to comment.