def matching(u, v):
u = _validate_vector(u)<EOL>v = _validate_vector(v)<EOL>(nft, ntf) = _nbool_correspond_ft_tf(u, v)<EOL>return float(nft + ntf) / float(len(u))<EOL>
Computes the Matching dissimilarity between two boolean 1-D arrays.

The Matching dissimilarity between two boolean 1-D arrays
`u` and `v`, is defined as

.. math::

   \\frac{c_{TF} + c_{FT}}{n}

where :math:`c_{ij}` is the number of occurrences of
:math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
:math:`k < n`.

Parameters
----------
u : (N,) array_like, bool
    Input array.
v : (N,) array_like, bool
    Input array.

Returns
-------
matching : double
    The Matching dissimilarity between vectors `u` and `v`.