ELF          >            @       a          @ 8 	 @                                 P      P                                                                  0       0       0      !      !                   M      ]      ]                               M      ]      ]                               8      8      8      $       $              Ptd   P=      P=      P=      d       d              Qtd                                                  Rtd   M      ]      ]      `      `                      GNU ƾ jOfѮ       !               !                                                                                                                                                                    *                                           _                                                                  y                     ,                       U                      F   "                                         q                                                                                                                                                                                                 N                                                                                                                               9                          `             __gmon_start__ _ITM_deregisterTMCloneTable _ITM_registerTMCloneTable __cxa_finalize PyArg_ParseTupleAndKeywords PyEval_SaveThread PyEval_RestoreThread Py_BuildValue _Py_Dealloc PyExc_ValueError PyErr_Format PyExc_TypeError PyErr_SetString PyInit__lsap PyImport_ImportModule PyObject_GetAttrString PyCapsule_Type PyCapsule_GetPointer PyModule_Create2 PyExc_ModuleNotFoundError PyErr_ExceptionMatches PyErr_Print PyExc_ImportError PyErr_Clear PyExc_RuntimeError _ZdlPvm memmove _Znwm memset _ZSt20__throw_length_errorPKc memcpy _Unwind_Resume __gxx_personality_v0 libstdc++.so.6 libgcc_s.so.1 libc.so.6 GCC_3.0 GLIBC_2.14 GLIBC_2.2.5 CXXABI_1.3 CXXABI_1.3.9 GLIBCXX_3.4                                             B         P&y   Z        P     0      b     ui	   m        3         ӯk   y     yѯ        t)         ]             `      ]                    ]             ]      `             0      `             0      a             0      a             3       a             `a      `a             0      ha             p      xa             3      _                    _                    _                    _                    _                    _         	           _                    _                    _                    _                    a                     `                    `                    `                    `         
            `                    (`                    0`                    8`                    @`                    H`                    P`                    X`                    ``                    h`                    p`                    x`                    `                    `                    `                    `                    `                    `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     HHO  HtH     5O  %O  @ %O  h    %O  h   %O  h   %O  h   %O  h   %O  h   %O  h   %O  h   p%O  h   `%O  h	   P%zO  h
   @%rO  h   0%jO  h    %bO  h   %ZO  h    %RO  h   %JO  h   %BO  h   %:O  h   %2O  h   %*O  h   %"O  h                                                   H=  dH=+  XHt$`HLhH$P  K  H$   >  Ht$`LAH$   H$   H)HucHt$`LHt$`HHt$`LH$   H|$H$   HD$HH)HtHHHH=@*  Hf.     @ H=N  HN  H9tHL  Ht	        H=N  H5N  H)HH?HHHtHL  HtfD      =}N   u+UH=L   HtH=nJ  IdUN  ]     w    AWH1HAVH=M  Hv  AUATUSHHLL$,LD$0HD$0    D$,      HM     H(  h  H|$0E11HA  1HHn  PD  LpMo  H@ L|$8      LL LhLM9INHE1E1HD$@HbM  Hxj j j   HH H   H;M  LE1E1H      Hxj j j   IH H  LELHLD$LL$1LL$LHD$D$,LLLD$E  H|$AA.  A   1LH=!  HH+I   Hm t|I/u/L%@ HQJ  H5  H81 H+t:E1HHL[]A\A]A^A_D  H1J  H5v  H8H+u@ HXfD  HHw H+tRHm uH+f     H@ HI  H5"  H8:H+t<E1@ HHm ; HiI  H5  H8D  Hff.      UH=  SHHH   H5  HSHm H   H   HI  H9C   1HH+HJ  ttH  HJ          &  HJ    5     H  H=I  [] H^ HHaJ  x@ HaH  H8	u%H!H  H5  H8H1[]ÐH=  oHH뼐H)H  H5  H8zH+uH,f.        H5  HG  H81_eHG  H5,  H8$JHG  H5  1H:    &HG  H5  H8HyG  H5  H8D  AWAVAUATUSH  H|$LD$xL$   H   IH   II׉LH9
  
  HD$H    IIHǄ$       HǄ$       M~h?$  1D  Af.wf.{>AHD$HHtH$   HE1HĈ  D[]A\A]A^A_@ HL9uLH<VJ    LT$ HLD$HL$H$   1HHHD$LD$LH<L$J    L$HH\$`L\$kHH1IKHSL$H     HH@L\$LT$ HD$XLHH|$(t0H1HLD$HL$LT$ LD$HL$HD$XLt$`L$   LD$0LL$HL   IH$   fHǄ$       )$   HHHھ   H$   HH$   gLH$   Ld   HHH\$`I<L$HǄ$       HǄ$(      IC?HǄ$0      HL\$H4    HǄ$8      HH$   HǄ$@      H$   L\$HH$H$   H0H1L\$PH$@  LǄ$(      HH    HH$   HLHǃ?HL$8H\$h\$ H$0  $8  RLD$0HǄ$P      HǄ$X      HǄ$`      I@?HǄ$h      HH4    HǄ$p      HH$   H$   LD$0HHD$H$P  H0H1Ǆ$X      H$p  LHH    HH$   HLHǃ?HL$@H\$p$   H$`  $h  mH|$`sH|$( H     HLD$0L\$PL$   t2HD$`H{1LT$PLD$0HPL\$(L\$(LD$0LT$PHD$X@   L$   E1H)H$   HHHHD$0D$ )HHH$   @ IU  L¿   fInHfHnHflfvHfoj  flH fofofHff@H9uLHAtLH)HHH<$H9|$8  H$   1LD$PL\$(LL$ H|$h LL$ L\$(LD$PtH$   H|$8HH!7H|$H9|$@  H$   1LD$PL\$(LL$ H|$p LL$ L\$(LD$Pt&$   @   H|$@)HHHHH!HD$XH9ttH$     HL$0\  HHfHHT tHEE H9t     H @H9uHD$0tHHD H=  H8LL$ LLfL\$(-  A   fHHF?HH$HIH?H:HHH?H)yH@HLHH	H(  HD$Mf(1LI$      f.z	uI<tGHH9tNHJAHL 	X\A\f/vIt f(f/vIHf(H9uf.z   NHIMIuHIHHJ?Ht$HIHH4HH?H:Hʃ?H)Hx/LHH	HHIH   f(LD  H@LHH	VAHt$`HmH$   H|$[H$   H<$JHt$`L=H$   HtH$   H) H\$`LHHHHLH$   H|$LL$ L\$(HPLT$H$HD$ 1H$   LD$(   CMXCff.     HIHIL#tI9tHf(\D AXAHL9uHD$ LD$(Ht$ 1Ht$   ff.     ff.     ff.     f     HIHIL#tf(\L A\AHL9uHt$ D  IT HHIHH9L9uIM9L$   L9T$7  I  HL$xH$   HAH)HHAH9R  HFH9E  LA   fo  1HfInHflfofoHH9uLHAtH|$xHH$   HHE1hfH|$p B$   @   H|$@)HHHH!H|$h H$   H|$8HH!LH<J    L$HgL$HxHD$HIH     LHH$      H1L)HPIL$H$   H$   L9T$#  H|$   M  LL$J<    Ht$HE1IJ    LHH)ff.     ff.     f HHI9uIHIM9uLD$M@  L|$H"1HDL9T$  H|$   HǄ$      MELD$M@tHD$H fW  I 1H|$xHH$   HHHI9H|$HHLL$L$L\$MLH\$H  HHHfHf HfW@H9uLHAH\$HH fWG   H$   H$   9  H$   H$  H9tmL$   LL$xH)1L$   HI4I4IHH9uH$  H)ILD$M@QHHǄ$      LD$M@$qf.     AL\$MHǄ$      ADIHHHHHHHp H     SHH?Ht1Hs H)H    C    HC    C    HC     [ÐH9   AWAVIAUATIUSH_HH9t~I׽   *HL)H~|HLH)HHM,$I9tJL+II$J4H>H;<|HSHCH;<}AHPHHPHLL9|L/HI9uH[]A\A]A^A_D  uH뎐HL/f.     f.     f.     f.     f.     D  HBAWIAVAUIATIAUI?HSIILl$L9:  MIfN<HI9  IIBH HHJHHL0L;O,O9,N4I9H|$ t}LRLH?LHH9~RMK5ff.     ff.     HQL HH?HHHH9}dHLHHMK9|L[]A\A]A^A_    HHH?HHH9iHTHLLHR    LL[]A\A]A^A_    H|$ H$    H|$ HsHHH?HHH9YH냐HH)H=     AWIAVIHAUIIATIUHoSHHM&  MLIL$IMAo$HMuI<K4fofH~OfH9X  L9v  L9T  A$IuILI9}fHff.     HIHI9|I;}JHGfD  H0HHI9I9s;I6IFHwHI$IVII9|II;|fHI9r    HLLLLL)H=   }   MIHIMHhHIILHLHuLIL)H~2fI$LIM IL)1LIIEHHHH[]A\A]A^A_L9L9}M4$HIUI$IT$M$II$IT$IuHAWAVAUATUSHH^H+IIH9  fHG    HM  HIHHE IL`HMHL$H     ItLHS1xLd$LeM9j  LLL)HHHHH  Hʻ   fo  fHfnHfp Lff.     ff.     fD  fofofH fffofbfjX@H9uHHIT   HcH
HJI9   LL)HH  HHH LLL`H      I   LLHI9t]IfD  LHSHCJ4H<H9>   ff.     f     HPHHPHLL9|HLI9uHH[]A\A]A^A_f.     HG    ڍHHcHJHJI9HHBLHL)HH	LHLLbLLLs    HHLI9TL1H=  *  HH                                                                                                                                                                                                                                           O|p invalid cost matrix object cost matrix is infeasible OO numpy._core._multiarray_umath numpy.core._multiarray_umath _ARRAY_API _ARRAY_API is NULL pointer cost_matrix maximize _lsap linear_sum_assignment vector::_M_default_append expected a matrix (2-D array), got a %d array           matrix contains invalid numeric entries _ARRAY_API is not PyCapsule object      module compiled against ABI version 0x%x but this version of numpy is 0x%x      module was compiled against NumPy C-API version 0x%x (NumPy 1.23) but the running NumPy has C-API version 0x%x. Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem.       FATAL: module compiled as unknown endian        FATAL: module compiled as little endian, but detected different endianness at runtime   numpy._core.multiarray failed to import Solves the rectangular linear sum assignment.   Solve the linear sum assignment problem.

Parameters
----------
cost_matrix : array
    The cost matrix of the bipartite graph.

maximize : bool (default: False)
    Calculates a maximum weight matching if true.

Returns
-------
row_ind, col_ind : array
    An array of row indices and one of corresponding column indices giving
    the optimal assignment. The cost of the assignment can be computed
    as ``cost_matrix[row_ind, col_ind].sum()``. The row indices will be
    sorted; in the case of a square cost matrix they will be equal to
    ``numpy.arange(cost_matrix.shape[0])``.

See Also
--------
scipy.sparse.csgraph.min_weight_full_bipartite_matching : for sparse inputs

Notes
-----

The linear sum assignment problem [1]_ is also known as minimum weight
matching in bipartite graphs. A problem instance is described by a matrix
C, where each C[i,j] is the cost of matching vertex i of the first partite
set (a 'worker') and vertex j of the second set (a 'job'). The goal is to
find a complete assignment of workers to jobs of minimal cost.

Formally, let X be a boolean matrix where :math:`X[i,j] = 1` iff row i is
assigned to column j. Then the optimal assignment has cost

.. math::
    \min \sum_i \sum_j C_{i,j} X_{i,j}

where, in the case where the matrix X is square, each row is assigned to
exactly one column, and each column to exactly one row.

This function can also solve a generalization of the classic assignment
problem where the cost matrix is rectangular. If it has more rows than
columns, then not every row needs to be assigned to a column, and vice
versa.

This implementation is a modified Jonker-Volgenant algorithm with no
initialization, described in ref. [2]_.

.. versionadded:: 0.17.0

References
----------

.. [1] https://en.wikipedia.org/wiki/Assignment_problem

.. [2] DF Crouse. On implementing 2D rectangular assignment algorithms.
       *IEEE Transactions on Aerospace and Electronic Systems*,
       52(4):1679-1696, August 2016, :doi:`10.1109/TAES.2016.140952`

Examples
--------
>>> import numpy as np
>>> cost = np.array([[4, 1, 3], [2, 0, 5], [3, 2, 2]])
>>> from scipy.optimize import linear_sum_assignment
>>> row_ind, col_ind = linear_sum_assignment(cost)
>>> col_ind
array([1, 0, 2])
>>> cost[row_ind, col_ind].sum()
5
     cannot create std::vector larger than max_size()                                                         ;d         p8         0  \  X  0t  0  $  |             zR x  $      Hp   FJw ?;*3$"    t   D   p   BJP B(A0A8DXBBM]PBBM
8D0A(B BBBF   4         AHD 
MAEZ
CAB      ?    A}   P         KBE B(D0A8H@
8A0A(B BBBFPX   d  `   FEB E(H0H8
0A(B BBBH
0A(B BBBH  T         TEI I(D0E8G@
8A0A(B BBBA@  H     l   LBB B(A0A8DP
8D0A(B BBBK       zPLR xu!    L   $   @  {   BBB B(A0A8G
8D0A(B BBBE    t   0   p        |           A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 `             ]             3             B             P                           /             ]                           ]                    o    `                                
                                  _                                        @             0	                   	              o          o           o    V      o                                                                                                                                                                           ]                      6      F      V      f      v                                                                  &      6      F      V      f      v                            0      0                                                             0      3      `a                                                              0      p             3                                              GCC: (GNU) 14.2.1 20250110 (Red Hat 14.2.1-7)            GA$3a1                      GA$3a1                       GA$3a1 /      /               GA$3a1       i               GA$3a1 /      /               GA$3a1 /      /               GA$3a1                      GA$3a1 /      /                                                                   *                  C                    N                   P                   c                    y     a                  ]                   `                   ]                                  
    p                 `                  a                  `      h            `a      @       C                        @                                        *                 a                  P=                  /                  _              	    @,            >    '                 a                  ]                  0'                  @'      ?       M    (                ]                 	                                                          >                     Q                     b                      q                                                                                                                                                                                               5  "                   P                     e                     w                                                                                        `                                                                                                
                                          +                     K                     ]                     t                                           rectangular_lsap.cpp _ZL5solvellPdbPlS0_ _ZL5solvellPdbPlS0_.cold crtstuff.c deregister_tm_clones __do_global_dtors_aux completed.0 __do_global_dtors_aux_fini_array_entry frame_dummy __frame_dummy_init_array_entry _lsap.c kwlist.0 PyArray_API moduledef lsap_methods __FRAME_END__ _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElNS0_5__ops15_Iter_comp_iterIZ12argsort_iterIlES5_RKS3_IT_SaISA_EEEUlllE_EEEvSA_SA_T0_T1_ DW.ref.__gxx_personality_v0 __GNU_EH_FRAME_HDR _fini _GLOBAL_OFFSET_TABLE_ _Z12argsort_iterIlESt6vectorIlSaIlEERKS0_IT_SaIS3_EE _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEENS0_5__ops15_Iter_comp_iterIZ12argsort_iterIlES5_RKS3_IT_SaISA_EEEUlllE_EEEvSA_SA_T0_ __TMC_END__ __dso_handle solve_rectangular_linear_sum_assignment _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEllNS0_5__ops15_Iter_comp_iterIZ12argsort_iterIlES5_RKS3_IT_SaISA_EEEUlllE_EEEvSA_T0_SH_T1_T2_ _DYNAMIC _init PyExc_ImportError _ZSt20__throw_length_errorPKc@GLIBCXX_3.4 memset@GLIBC_2.2.5 PyExc_ValueError __gmon_start__ _ZdlPvm@CXXABI_1.3.9 PyCapsule_Type PyExc_TypeError PyExc_ModuleNotFoundError PyErr_Format _ITM_deregisterTMCloneTable PyErr_ExceptionMatches _ITM_registerTMCloneTable PyArg_ParseTupleAndKeywords __cxa_finalize@GLIBC_2.2.5 PyEval_RestoreThread PyEval_SaveThread PyExc_RuntimeError memmove@GLIBC_2.2.5 Py_BuildValue PyObject_GetAttrString PyInit__lsap PyErr_Print _Py_Dealloc PyImport_ImportModule PyErr_Clear PyModule_Create2 PyErr_SetString __gxx_personality_v0@CXXABI_1.3 _Znwm@GLIBCXX_3.4 _Unwind_Resume@GCC_3.0 memcpy@GLIBC_2.14 PyCapsule_GetPointer  .symtab .strtab .shstrtab .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .text .fini .rodata .eh_frame_hdr .eh_frame .gcc_except_table .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .data .bss .comment .gnu.build.attributes                                                                                 8      8      $                              .   o       `      `      $                             8                         0                          @                                                      H   o       V      V      D                            U   o                                               d             0	      0	                                 n      B       @      @                                x                                                         s                           p                            ~                         F              @                            /      /                                                  0       0      P                                          P=      P=      d                                           =      =                                                @      @      ]                                           ]      M                                                ]      M                                                ]      M                                                 ]      M                                              _      O      P                                          _      O                                                `      P                                                  a      Q                                         0               Q      .                                                Q                                                          R      `         #                 	                      XY                                                         _      "                             