Traceplot error when modelling multivariate normal with LKJCholeskyCov

You can avoid this with a mask method. Note first that in python NaN is defined as the number which is not equal to itself:

float(‘nan’) == float(‘nan’)
False

The ValueError: cannot convert float NaN to integer raised because of Pandas doesn’t have the ability to store NaN values for integers. From Pandas v0.24, introduces Nullable Integer Data Types which allows integers to coexist with NaNs. This does allow integer NaNs . This is the pandas integer, instead of the numpy integer. So, use Nullable Integer Data Types (e.g. Int64).

df['x'].astype('Int64')

NB: You have to go through numpy float first and then to nullable Int32, for some reason.