(self,
               name: typing.Text,
               shape: typing.Tuple[int, ...],
               lower_bound: _FLOAT_OR_ARRAY = -np.pi,
               upper_bound: _FLOAT_OR_ARRAY = np.pi,
               dtype=np.float64)
Constructs a box type sensor.

    Args:
      name: the name of the sensor
      shape: the shape of the sensor values
      lower_bound: the lower_bound of sensor value, in float or np.array.
      upper_bound: the upper_bound of sensor value, in float or np.array.
      dtype: data type of sensor value
Constructs a box type sensor.
Constructs a box type sensor .
def __init__(self,
               name: typing.Text,
               shape: typing.Tuple[int, ...],
               lower_bound: _FLOAT_OR_ARRAY = -np.pi,
               upper_bound: _FLOAT_OR_ARRAY = np.pi,
               dtype=np.float64) -> None:
    """Constructs a box type sensor.

    Args:
      name: the name of the sensor
      shape: the shape of the sensor values
      lower_bound: the lower_bound of sensor value, in float or np.array.
      upper_bound: the upper_bound of sensor value, in float or np.array.
      dtype: data type of sensor value
    """
    super(BoxSpaceSensor, self).__init__(name)

    self._shape = shape
    self._dtype = dtype

    if isinstance(lower_bound, (float, int)):
      self._lower_bound = np.full(shape, lower_bound, dtype=dtype)
    else:
      self._lower_bound = np.array(lower_bound)

    if isinstance(upper_bound, (float, int)):
      self._upper_bound = np.full(shape, upper_bound, dtype=dtype)
    else:
      self._upper_bound = np.array(upper_bound)
def __init__ ( self , name : typing . Text , shape : typing . Tuple [ int , ... ] , lower_bound : _FLOAT_OR_ARRAY = - np . pi , upper_bound : _FLOAT_OR_ARRAY = np . pi , dtype = np . float64 ) -> None : super ( BoxSpaceSensor , self ) . __init__ ( name ) self . _shape = shape self . _dtype = dtype if isinstance ( lower_bound , ( float , int ) ) : self . _lower_bound = np . full ( shape , lower_bound , dtype = dtype ) else : self . _lower_bound = np . array ( lower_bound ) if isinstance ( upper_bound , ( float , int ) ) : self . _upper_bound = np . full ( shape , upper_bound , dtype = dtype ) else : self . _upper_bound = np . array ( upper_bound )