From 1b1b29876dd733316ba220e014fe6f1b7fa5e225 Mon Sep 17 00:00:00 2001 From: Kyle Carow Date: Mon, 27 Nov 2023 14:47:40 -0700 Subject: [PATCH] remove unnecessary ensure; length-1 dimensions in grid work fine --- rust/fastsim-core/src/utils.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rust/fastsim-core/src/utils.rs b/rust/fastsim-core/src/utils.rs index 2320a0fa..f1d8b143 100644 --- a/rust/fastsim-core/src/utils.rs +++ b/rust/fastsim-core/src/utils.rs @@ -287,11 +287,6 @@ pub fn multilinear(point: &[f64], grid: &[Vec], values: &ArrayD) -> an "Length of supplied `grid` must be same as `values` dimensionality: {grid:?} is not {n}-dimensional", ); for i in 0..n { - // TODO: This ensure! could be removed if subsetting got rid of length 1 dimensions in `grid` and `points` as well - anyhow::ensure!( - grid[i].len() > 1, - "Supplied `grid` length must be > 1 for dimension {i}", - ); anyhow::ensure!( grid[i].len() == values.shape()[i], "Supplied `grid` and `values` are not compatible shapes: dimension {i}, lengths {} != {}",