class_docstr: Wraps a NumPy array for storage in an object-based checkpoint.
class_docstr_tok: ["Wraps","a","NumPy","array","for","storage","in","an","object-based","checkpoint","."]
docstr: Callback to serialize the array.
docstr_tok: ["Callback","to","serialize","the","array","."]
code: def serialize(self):
      """Callback to serialize the array."""
      string_file = io.BytesIO()
      try:
          numpy.save(string_file, self.array, allow_pickle=False)
          serialized = string_file.getvalue()
      finally:
          string_file.close()
      return serialized
  
imports: import io
  import os
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.client import session
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.module import module
  from tensorflow.python.platform import test
  from tensorflow.python.trackable import python_state
label_desc: Use image node_id 2 for calling the _NumpyWrapper obj's underlying member method code with example usage: obj.serialize() and returns: serialized