Stone-Soup icon indicating copy to clipboard operation
Stone-Soup copied to clipboard

Measure class constructor

Open gbellantuono opened this issue 3 years ago • 0 comments

Working on the run manager and the generation of the configuration file we found an issue.

When we generate with the configuration UI the Measure object(for example Mahalanobis), we have 2 or more parameters (mapping and mapping2). The problem is if the user doesn't put any input, we are sending 2 empty arrays. The stone soup serialiser will identify these 2 arrays as input for the Measure constructor and will initialise mapping and mapping2 as an empty array. Because they are empty they will cause a problem with the simulation and give an error.

If these 2 arrays can never be empty, I would suggest modifying the constructor and setting mapping and mapping2 as None if the inputs are empty arrays.

As a temporary solution, we don't pass empty ndarray. We are just concern that this could create issues where we want the array to be empty.

gbellantuono avatar Nov 16 '21 14:11 gbellantuono