def getBin(self, theta, thetad, omega, omegad, omegadd):
        bin_indices = [
                np.digitize([theta], self.theta_bounds)[0] - 1,
                np.digitize([thetad], self.thetad_bounds)[0] - 1,
                np.digitize([omega], self.omega_bounds)[0] - 1,
                np.digitize([omegad], self.omegad_bounds)[0] - 1,
                np.digitize([omegadd], self.omegadd_bounds)[0] - 1,
                ]
        linear_index = np.dot(self.magic_array, bin_indices)
        if linear_index > self.outdim-20:
            # DEBUGGING PRINTS
            print "DEBUG"
            print self.isFinished()
            print self.env.getTilt()
            print np.abs(self.env.getTilt())
            print self.max_tilt
            print np.abs(self.env.getTilt()) > self.max_tilt
            print self.env.getSensors()
            print self.magic_array
            print self.getBinIndices(linear_index)
            print linear_index
        return linear_index
dataset/ETHPy150Open chrisdembia/agent-bicycle/randlov1998/tasks.py/LinearFATileCoding3476GoToTask.getBin/original