added an assert about dtype in gaussian calculation