def serialize_numpy_array(nda):
    """ Returns dict for numpy array data and metadata.
        nda.dtype is like (str) 'uint32'
    """
    return {'type' : 'nd',
            'shape': str(nda.shape),
            'size' : str(nda.size), 
            'dtype': str(nda.dtype), 
            'data' : nda.tobytes() # (bytes)
           }