parameters: (arr, diff=None)
return_statement: return blob
docstring: Converts a N-dimensional array to blob proto. If diff is given, also
      convert the diff. You need to make sure that arr and diff have the same
      shape, and this function does not do sanity check.
docstring_summary: Converts a N-dimensional array to blob proto. If diff is given, also
      convert the diff. You need to make sure that arr and diff have the same
      shape, and this function does not do sanity check.
docstring_tokens: Converts a N - dimensional array to blob proto . If diff is given also convert the diff . You need to make sure that arr and diff have the same shape and this function does not do sanity check .
function: def array_to_blobproto(arr, diff=None):
      """Converts a N-dimensional array to blob proto. If diff is given, also
      convert the diff. You need to make sure that arr and diff have the same
      shape, and this function does not do sanity check.
      """
      blob = caffe_pb2.BlobProto()
      blob.shape.dim.extend(arr.shape)
      blob.data.extend(arr.astype(float).flat)
      if diff is not None:
          blob.diff.extend(diff.astype(float).flat)
      return blob
function_tokens: def array_to_blobproto ( arr , diff = None ) : blob = caffe_pb2 . BlobProto ( ) blob . shape . dim . extend ( arr . shape ) blob . data . extend ( arr . astype ( float ) . flat ) if diff is not None : blob . diff . extend ( diff . astype ( float ) . flat ) return blob