def maxinconsts(Z, R):
Z = np.asarray(Z, order='<STR_LIT:c>')<EOL>R = np.asarray(R, order='<STR_LIT:c>')<EOL>is_valid_linkage(Z, throw=True, name='<STR_LIT>')<EOL>is_valid_im(R, throw=True, name='<STR_LIT:R>')<EOL>n = Z.shape[<NUM_LIT:0>] + <NUM_LIT:1><EOL>if Z.shape[<NUM_LIT:0>] != R.shape[<NUM_LIT:0>]:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>MI = np.zeros((n - <NUM_LIT:1>,))<EOL>[Z, R] = _copy_arrays_if_base_present([Z, R])<EOL>_hierarchy.get_max_Rfield_for_each_cluster(Z, R, MI, int(n), <NUM_LIT:3>)<EOL>return MI<EOL>
Returns the maximum inconsistency coefficient for each
non-singleton cluster and its descendents.

Parameters
----------
Z : ndarray
    The hierarchical clustering encoded as a matrix. See
    ``linkage`` for more information.
R : ndarray
    The inconsistency matrix.

Returns
-------
MI : ndarray
    A monotonic ``(n-1)``-sized numpy array of doubles.