class_docstr: A weakly typed Eager Tensor.
class_docstr_tok: ["A","weakly","typed","Eager","Tensor","."]
code: def __array__(self, dtype=None):
      # We need to explicitly call np.array() because
      # self_tensor.__array__() for scalars raise:
      #     ValueError: object __array__ method not producing an array
      # resource_variable_ops also follows the same pattern.
      return np.array(self.tensor.__array__(dtype))
  
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 7 for calling the EagerWeakTensor obj's underlying member method code with example usage: obj.__array__(dtype) and returns: np