Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file.

## [0.16.1] - 2025-05-27

### Bug Fixes

- Disable unused faer features (Adrian Seyboldt)


### Performance

- Shortcut for empty posteriors (Adrian Seyboldt)


## [0.16.0] - 2025-05-27

### Bug Fixes
Expand All @@ -13,6 +25,8 @@ All notable changes to this project will be documented in this file.

- Bump arrow version (Adrian Seyboldt)

- Bump version and update changelog (Adrian Seyboldt)


### Performance

Expand All @@ -24,6 +38,11 @@ All notable changes to this project will be documented in this file.
- Remove simd_support feature (Adrian Seyboldt)


### Ci

- Add codecov token (Adrian Seyboldt)


## [0.15.1] - 2025-03-18

### Features
Expand Down
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nuts-rs"
version = "0.16.0"
version = "0.16.1"
authors = [
"Adrian Seyboldt <adrian.seyboldt@gmail.com>",
"PyMC Developers <pymc.devs@gmail.com>",
Expand All @@ -25,11 +25,7 @@ thiserror = "2.0.3"
arrow = { version = "55.1.0", default-features = false, features = ["ffi"] }
rand_chacha = "0.9.0"
anyhow = "1.0.72"
faer = { version = "0.22.6", default-features = false, features = [
"std",
"npy",
"linalg",
] }
faer = { version = "0.22.6", default-features = false, features = ["linalg"] }
pulp = "0.21.4"
rayon = "1.10.0"

Expand Down
7 changes: 7 additions & 0 deletions src/nuts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ where
collector.register_init(math, init, options);

let mut tree = NutsTree::new(init.clone());

if math.dim() == 0 {
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a comment to explain why an early return is appropriate when math.dim() is 0. This will improve maintainability and clarity for future developers.

Copilot uses AI. Check for mistakes.

let info = tree.info(false, None);
collector.register_draw(math, init, &info);
return Ok((init.clone(), info));
}

while tree.depth < options.maxdepth {
let direction: Direction = rng.random();
tree = match tree.extend(math, rng, hamiltonian, direction, collector, options) {
Expand Down
Loading