    def array(self):
        """This is a compatibility method that returns the underlying tensor as a numpy array."""
        return self.tensor.numpy()
This is a compatibility method that returns the underlying tensor as a numpy array.
allennlp/data/fields/tensor_field.py