def num_obs_dm(d):
 d = np.asarray(d, order='c')
 is_valid_dm(d, tol=np.inf, throw=True, name='d')
 return d.shape[0]

def num_obs_dm ( d ) : d = np . asarray ( d , order = 'c' ) is_valid_dm ( d , tol = np . inf , throw = True , name = 'd' ) return d . shape [ 0 ]
returns the number of original observations that correspond to a square .