Skip to content

Commit

Permalink
Merge pull request #95 from jinlow/bug/loading-error
Browse files Browse the repository at this point in the history
Remove unwrap and replace with unwrap_or
  • Loading branch information
jinlow authored Dec 17, 2023
2 parents 7dbeb4c + 6476f64 commit 3e2ebe5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forust-ml"
version = "0.4.4"
version = "0.4.5"
edition = "2021"
authors = ["James Inlow <[email protected]>"]
homepage = "https://github.com/jinlow/forust"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pip install forust

To use in a rust project add the following to your Cargo.toml file.
```toml
forust-ml = "0.4.4"
forust-ml = "0.4.5"
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions py-forust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py-forust"
version = "0.4.4"
version = "0.4.5"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.20.0", features = ["extension-module"] }
forust-ml = { version = "0.4.4", path = "../" }
forust-ml = { version = "0.4.5", path = "../" }
numpy = "0.20.0"
ndarray = "0.15.1"
serde_plain = { version = "1.0" }
Expand Down
2 changes: 1 addition & 1 deletion py-forust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl GradientBooster {
.booster
.monotone_constraints
.as_ref()
.unwrap()
.unwrap_or(&HashMap::new())
.iter()
.map(|(f, c)| {
let c_ = match c {
Expand Down
2 changes: 1 addition & 1 deletion rs-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To run this example, add the following code to your `Cargo.toml` file.
```toml
[dependencies]
forust-ml = "0.4.4"
forust-ml = "0.4.5"
polars = "0.28"
reqwest = { version = "0.11", features = ["blocking"] }
```
Expand Down

0 comments on commit 3e2ebe5

Please sign in to comment.