function tf = anymissing(A)
%ANYMISSING True if at least one element of a codistributed array is missing.
%   TF = ANYMISSING(X)
%   
%   See also ANYMISSING, codistributed.
%   


%   Copyright 2021-2022 The MathWorks, Inc.

if isnumeric(A) || islogical(A)
    tf = hasNaN(A);
else
    tf = spmdReduce(@or, anymissing(getLocalPart(A)));
end
tf = codistributed(tf);