You don't need that assert. Your code should support all other dtype I think