pysted.utils.float_to_array_verifier

pysted.utils.float_to_array_verifier(float_or_array, shape)

Verify if a given input is a float or an array.

If it is a float, it will return an array of shape (shape) filled. If it is an array, it will verify if it is of the appropriate shape. If it is neither, it will return an error

Parameters:
  • float_or_array – Either a float or an array containing floats

  • shape – The shape we want for our array (tuple)

Returns:

An array of the appropriate shape