rtbgym.utils.check_array#

rtbgym.utils.check_array(array, name, expected_dim=1, expected_dtype=None, min_val=None, max_val=None)[source]#

Input validation on array.

Parameters:
  • array (object) – Input array to check.

  • name (str) – Name of the input array.

  • expected_dim (int, default=1) – Expected dimension of the input array.

  • expected_dtype ({type, tuple of type}, default=None) – Expected dtype of the input array.

  • min_val (float, default=None) – Minimum value allowed in the input array.

  • max_val (float, default=None) – Maximum value allowed in the input array.