Skip to content

Commit af54568

Browse files
author
pradeep
committed
fix doc test for count function to use f32 type
If the scalar constant is of type f64, tests are failing on devices that doesn't support double data types. This is a temporary fix.
1 parent 6b61e7d commit af54568

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/algorithm/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ dim_reduce_func_def!("
242242
```rust
243243
use arrayfire::{Dim4, gt, print, randu, count};
244244
let dims = Dim4::new(&[5, 3, 1, 1]);
245-
let a = gt(&randu::<f32>(dims), &0.5, false);
245+
let cnst: f32 = 0.5;
246+
let a = gt(&randu::<f32>(dims), &cnst, false);
246247
print(&a);
247248
let b = count(&a, 0);
248249
print(&b);

0 commit comments

Comments
 (0)