You should use astype after generating an array
astype
x = np.random.randn(1000, 2).astype(np.float64) ess = tfp.mcmc.effective_sample_size(x)