class_docstr: A weakly typed Eager Tensor.
docstr: Copy of the contents of this EagerWeakTensor into a NumPy array or scalar.
docstr_tok: ["Copy","of","the","contents","of","this","EagerWeakTensor","into","a","NumPy","array","or","scalar","."]
code: def numpy(self):
      """Copy of the contents of this EagerWeakTensor into a NumPy array or scalar."""
      if not isinstance(self.tensor, ops.EagerTensor):
          raise ValueError(
              "WeakTensor.numpy() is only supported in eager mode."
          )
      return self.tensor.numpy()
  
imports: from typing import Optional
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import composite_tensor_gradient
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import extension_type
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.types import core
label_desc: Use image node_id 1 for calling the EagerWeakTensor obj's underlying member method code with example usage: obj.numpy() and returns: self