Skip to content

Commit 7aa39a3

Browse files
fix(doctests): fix 3 doctest failures breaking CI
1. crystal_encoder::distill — remove unused import `Role` 2. nibble::nibble_propagate_bfs — remove unused import `nibble_unpack` 3. udf_kernels::udf_sigma_classify — swap band/threshold args in doctest assertions (distance=100 with threshold=1000 → Foveal, not distance=1000 with threshold=100 → Reject) All 3 fail under CI's RUSTFLAGS="-D warnings". Now: 335 doctests pass, 0 fail, 7 ignored. Co-authored-by: AdaWorldAPI <AdaWorldAPI@users.noreply.github.com>
1 parent c779c5b commit 7aa39a3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/hpc/crystal_encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ fn distillation_loss(student: &mut Node, teacher: &mut Node, lambda: f32) -> f32
354354
/// # Example
355355
///
356356
/// ```
357-
/// use ndarray::hpc::crystal_encoder::{CrystalEncoder, Role, distill};
357+
/// use ndarray::hpc::crystal_encoder::{CrystalEncoder, distill};
358358
/// use ndarray::hpc::node::Node;
359359
///
360360
/// let teacher = Node::random(42);

src/hpc/nibble.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ pub(crate) unsafe fn nibble_above_threshold_avx2(packed: &[u8], threshold: u8) -
301301
/// # Examples
302302
///
303303
/// ```
304-
/// use ndarray::hpc::nibble::{nibble_pack, nibble_propagate_bfs, nibble_unpack};
304+
/// use ndarray::hpc::nibble::{nibble_pack, nibble_propagate_bfs};
305305
/// let mut packed = nibble_pack(&[5, 3, 10, 1, 0, 15, 2, 7]);
306306
/// let frontier = nibble_propagate_bfs(&mut packed, 3);
307307
/// // After subtracting 3: [2, 0, 7, 0, 0, 12, 0, 4]

src/hpc/udf_kernels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ pub fn udf_nars_revision(freq1: u16, conf1: u16, freq2: u16, conf2: u16) -> (u16
188188
/// ```
189189
/// use ndarray::hpc::udf_kernels::udf_sigma_classify;
190190
///
191-
/// assert_eq!(udf_sigma_classify(1000, 100), "exact");
192-
/// assert_eq!(udf_sigma_classify(1000, 1500), "noise");
191+
/// assert_eq!(udf_sigma_classify(100, 1000), "exact");
192+
/// assert_eq!(udf_sigma_classify(1500, 1000), "noise");
193193
/// ```
194194
pub fn udf_sigma_classify(band: u32, threshold: u64) -> &'static str {
195195
use super::cascade::Band;

0 commit comments

Comments
 (0)