def observation_to_state(self, observation):
    state = 0
    unit = max(self._bin_sizes)
    for (d, o) in enumerate(observation.flatten()):
        state = (state + (np.digitize(o, self._dimension_bins[d]) * pow(unit, d)))
    return state
def observation_to_state(self, observation):
    state = 0
    unit = max(self._bin_sizes)
    for (d, o) in enumerate(observation.flatten()):
        state = (state + (np.digitize(o, self._dimension_bins[d]) * pow(unit, d)))
    return state