ndarray icon indicating copy to clipboard operation
ndarray copied to clipboard

ndarray::iter::Iter doesn't implement Debug

Open liam-clink opened this issue 3 years ago • 3 comments
trafficstars

The title says it. What I was trying to do when I discovered this was print a zip of a range and an ndarray.

Like so:

let foo = ndarray::Array1::<f64>::zeros(100);
println!("{:?}", std::iter::zip(0..foo.len(), &foo);

liam-clink avatar Sep 04 '22 23:09 liam-clink

I never thought of printing an iterator before! Anyway, as per the official documentation:

fmt::Debug implementations should be implemented for all public types.

So, yeah, I guess we should do it.

nilgoyette avatar May 27 '23 00:05 nilgoyette

I'm not very experienced with Rust projects, but I'd like to try to implement this. Is Iter found in the iterators/mod.rs file?

biskwikman avatar Jan 26 '24 08:01 biskwikman

Yes, probably. Just clone the project and test, you will see.

nilgoyette avatar Jan 26 '24 21:01 nilgoyette

Fixed in #1353, thanks and thanks @nilgoyette for mentoring

bluss avatar Mar 11 '24 20:03 bluss