| Server IP : 93.86.61.54 / Your IP : 216.73.216.206 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/scipy/spatial/__pycache__/ |
Upload File : |
o
��Ebw` � @ s� d Z g d�ZddlZddlZddlZddlmZmZm Z m
Z
ddlmZ ddl
mZ ddlmZ dd lmZ d
dlmZ d
dlmZ dd
lmZ dd� Zdd� Zdd� Zdd� Zd�dd�Zd�dd�Zdd� Zdd� Zdd� Zd d!� Z d"d#� Z!d$d%� Z"d&d'� Z#d�d(d)�Z$ej%fd*d+�Z&d�d,d-�Z'd�d.d/�Z(d�d0d1�Z)d�d2d3�Z*d�d5d6�Z+d�d7d8�Z,d�d9d:�Z-d�d;d<�Z.d�d=d>�Z/dd?�d@dA�Z0dBdC� Z1d�dDdE�Z2dFdG� Z3d�dHdI�Z4d�dJdK�Z5d�dLdM�Z6d�ddNdO�dPdQ�Z7d�dRdS�Z8ej9dTdU�d�dVdW��Z:d�dXdY�Z;d�dZd[�Z<d�d\d]�Z=d�d^d_�Z>d�d`da�Z?eeej%db�Z@eeeAdb�ZBee_Cee_DejEd4dc�G ddde� de��ZFejEd4dc�G dfdg� dg��ZGejEd4dc�G dhdi� di��ZHejEd4dc�G djdk� dk��ZIejEd4dc�G dldm� dm��ZJeJdKdKhe5ejKejLdn�eJdMdMhe6ejMejNdn�eJdIh do�e4ejOejPdn�eJdEh dp�e2ejQejRdn�eJd6d6dqhe+eFd6�eHd6�dn�eJd8d8drhe,eFd8�eHd8�dn�eJdYdYhdsge;eFdY�eHdY�dt�eJd1h du�e)ejSejTdn�eJd:h dv�dwdsgee-eGd:d:�eId:d:�dx�eJd<h dy�dwdsge.eFd<�eHd<�dt�eJdQdQdzhe7eFdQ�eHdQ�dn�eJd>d>hdsge/eFd>�eHd>�dt�eJdAdAhdsge0eFdA�eHdA�dt�eJdGh d{�e e3eFdG�eHdG�d|�eJd/h d}�e!e(ejUejVd|�eJd[d[hdsge<eFd[�eHd[�dt�eJd]d]hdsge=eFd]�eHd]�dt�eJdCh d~�e#e1eFdC�eHdC�d|�eJd_d_hdsge>eFd_�eHd_�dt�eJdadahdsge?eFda�eHda�dt�eJd3h d�e*ejWejXdn�eJdSdShdsge8eFdS�eHdS�dt�gZYd�d�� eYD �ZZe[d�d�� eYD ��Z\e]eZ�^� �Z_d�d�� eYD �Z`d�dd��d�d��Zad�d�d��Zbd�d�d��Zcd�d�d��Zdd�d�� Zed�d�� Zfd�d�� Zgd�d�� Zhd�d�� Zid�dd��d�d��ZjdS )�a�
Distance computations (:mod:`scipy.spatial.distance`)
=====================================================
.. sectionauthor:: Damian Eads
Function reference
------------------
Distance matrix computation from a collection of raw observation vectors
stored in a rectangular array.
.. autosummary::
:toctree: generated/
pdist -- pairwise distances between observation vectors.
cdist -- distances between two collections of observation vectors
squareform -- convert distance matrix to a condensed one and vice versa
directed_hausdorff -- directed Hausdorff distance between arrays
Predicates for checking the validity of distance matrices, both
condensed and redundant. Also contained in this module are functions
for computing the number of observations in a distance matrix.
.. autosummary::
:toctree: generated/
is_valid_dm -- checks for a valid distance matrix
is_valid_y -- checks for a valid condensed distance matrix
num_obs_dm -- # of observations in a distance matrix
num_obs_y -- # of observations in a condensed distance matrix
Distance functions between two numeric vectors ``u`` and ``v``. Computing
distances over a large collection of vectors is inefficient for these
functions. Use ``pdist`` for this purpose.
.. autosummary::
:toctree: generated/
braycurtis -- the Bray-Curtis distance.
canberra -- the Canberra distance.
chebyshev -- the Chebyshev distance.
cityblock -- the Manhattan distance.
correlation -- the Correlation distance.
cosine -- the Cosine distance.
euclidean -- the Euclidean distance.
jensenshannon -- the Jensen-Shannon distance.
mahalanobis -- the Mahalanobis distance.
minkowski -- the Minkowski distance.
seuclidean -- the normalized Euclidean distance.
sqeuclidean -- the squared Euclidean distance.
Distance functions between two boolean vectors (representing sets) ``u`` and
``v``. As in the case of numerical vectors, ``pdist`` is more efficient for
computing the distances between all pairs.
.. autosummary::
:toctree: generated/
dice -- the Dice dissimilarity.
hamming -- the Hamming distance.
jaccard -- the Jaccard distance.
kulsinski -- the Kulsinski distance.
kulczynski1 -- the Kulczynski 1 distance.
rogerstanimoto -- the Rogers-Tanimoto dissimilarity.
russellrao -- the Russell-Rao dissimilarity.
sokalmichener -- the Sokal-Michener dissimilarity.
sokalsneath -- the Sokal-Sneath dissimilarity.
yule -- the Yule dissimilarity.
:func:`hamming` also operates over discrete numerical vectors.
)�
braycurtis�canberra�cdist� chebyshev� cityblock�correlation�cosine�dice�directed_hausdorff� euclidean�hamming�is_valid_dm�
is_valid_y�jaccard�
jensenshannon� kulsinski�kulczynski1�mahalanobis�matching� minkowski�
num_obs_dm� num_obs_y�pdist�rogerstanimoto�
russellrao�
seuclidean�
sokalmichener�sokalsneath�sqeuclidean�
squareform�yule� N)�List�Optional�Set�Callable)�partial)�_asarray_validated� )�_distance_wrap)�
_hausdorff� )�norm)�rel_entr)�_distance_pybindc C s | j dur | �� S | S )z4Copy the array if its base points to a parent array.N)�base�copy)�a� r1 �8/usr/lib/python3/dist-packages/scipy/spatial/distance.py�_copy_array_if_base_present� s
r3 c K s>