caio.co/de/chuva

No need to `use ndarray::` here

Id
eff74ff7b7318a75d8a8bbc03b695c5b696f8c69
Author
Caio
Commit time
2025-12-01T09:19:26+01:00

Modified chuva/src/lib.rs

@@ -283,8 +283,7
let file = netcdf::open(path.as_ref())?;

// hdf5 /imageK/image_bytes_per_pixel is 2
- use ndarray::Array2;
- let mut buf = Array2::<u16>::zeros((HEIGHT, WIDTH));
+ let mut buf = ndarray::Array2::<u16>::zeros((HEIGHT, WIDTH));
let mut load = |name, z: usize| -> netcdf::Result<()> {
let group = file
.group(name)?
@@ -348,8 +347,7
assert_eq!(4, precip.dimensions().len());

const ENS_SIZE: usize = 20;
- use ndarray::Array3;
- let mut buf = Array3::<u16>::zeros((ENS_SIZE, HEIGHT, WIDTH));
+ let mut buf = ndarray::Array3::<u16>::zeros((ENS_SIZE, HEIGHT, WIDTH));

// XXX This dataset gives predictions for up to 6h ahead, but
// I'm mostly interested in the next 2h (what the nowcast