function tf = anynan(A)
%ANYNAN True if at least one element of a codistributed array is Not-a-Number.
%   TF = ANYNAN(X)
%   
%   See also ANYNAN, codistributed.
%   


%   Copyright 2021-2022 The MathWorks, Inc.

% Use the metadata for numeric-ish types. For everything else use the
% standard MATLAB code.
if isnumeric(A) || islogical(A) || ischar(A)
    tf = codistributed(hasNaN(A));
else
    tf = any(isnan(A), "all");
end

