add from_ndarray method for Pdata.Mdata