Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For now, we have decided not to not read and convert Python dictionary, so the BL user won’t be able to give a dictionary as a parameter value.

Case of a numpy.nd.array

It is impossible to enter a np.nd.array in BL. So we register such parameter as a STRING and ask the user to enter floats separated by a comma: 10, 15, 20. In the config.json, such parameter will be written as:

Code Block
{
"param_notch_widths": "10, 15, 20"
}
Info

It was decided to enter numpy.nd.array this way on BL to differentiate it from the way it was entered in the config.json.example when the App is run locally (see Parameters conversion).

In the Python file, we added:

Code Block
if isinstance(config['param_notch_widths'], str):
    config['param_notch_widths'] = list(map(float, config['param_notch_widths'].split(', ')))
    config['param_notch_widths'] = np.array(config['param_notch_widths'])

Case of a slice

Case of a tuple

...

Case of a list of integers/floats

Cases when a parameter can be two types