def set_datapoint(self, ind, datapoint):
        """ Sets the value of the datapoint at the given index. """
        if ind >= self.num_datapoints:
            raise ValueError('Index %d out of bounds! Tensor has %d datapoints' %(ind, self.num_datapoints))
        self.data[ind, ...] = np.array(datapoint).astype(self.dtype)
def set_datapoint ( self , ind , datapoint ) : if ind >= self . num_datapoints : raise ValueError ( 'Index %d out of bounds! Tensor has %d datapoints' % ( ind , self . num_datapoints ) ) self . data [ ind , ... ] = np . array ( datapoint ) . astype ( self . dtype )
Sets the value of the datapoint at the given index.