# Check if a (possibly nested) list is real [duplicate]

I have a very large matrix of numbers. I want to check if all its entries are real. At the moment I am using

realQ = And @@ Thread[Flatten[Im @ #] == 0] &


Is there any faster/safer/better way to do it?

• Duplicate: How to check if an expression is a real-valued number With the realQ from this link, you just need to do MatrixQ[mat, realQ] – rm -rf Mar 1 '14 at 21:28
• To check each element, first take a look at rm's link, then use things like VectorQ[..., realQ], MatrixQ[..., realQ], ArrayQ[..., _, realQ], etc. – Szabolcs Mar 1 '14 at 21:36
• .......TensorQ – halirutan Mar 1 '14 at 21:49