filling arrays with NaNs only if !defined(NDEBUG)