diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4227e1af3eb1588354d934f5f22d1bbe41ca9ef6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc differ diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ebacb0e83927900d4718b24830c7ec6e6f76c803 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc differ diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62e9da8a0ef5f52999bb4bec6f4073230c8c70c6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc differ diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/__pycache__/test_datatypes.cpython-310.pyc b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/__pycache__/test_datatypes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..959470175b2fba615d413274432da67df33092bf Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/__pycache__/test_datatypes.cpython-310.pyc differ diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt new file mode 100644 index 0000000000000000000000000000000000000000..6c3cff3b12cec4ad050b31cc5d5c327f32784447 --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt @@ -0,0 +1,21 @@ +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 0 1 1 1 +1 1 0 0 0 1 1 +1 0 1 0 1 0 1 +0 0 0 1 0 0 0 +1 0 1 0 1 0 1 +1 1 0 0 0 1 1 +1 1 1 0 1 1 1 +1 0 1 1 1 0 1 +0 0 0 1 0 0 0 +1 0 0 1 0 0 1 +1 1 1 1 1 1 1 +1 0 0 1 0 0 1 +0 0 0 1 0 0 0 +1 0 1 1 1 0 1 diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt new file mode 100644 index 0000000000000000000000000000000000000000..c239b0369c9df3e06df9a2fbf048faec2f84941f --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt @@ -0,0 +1,294 @@ +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +2 2 2 2 2 2 2 +3 3 3 3 3 3 3 +4 4 4 4 4 4 4 +5 5 5 5 5 5 5 +6 6 6 6 6 6 6 +7 7 7 7 7 7 7 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 2 3 4 5 6 7 +8 9 10 11 12 13 14 +15 16 17 18 19 20 21 +22 23 24 25 26 27 28 +29 30 31 32 33 34 35 +36 37 38 39 40 41 42 +43 44 45 46 47 48 49 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 2 3 4 5 6 7 +8 1 2 3 4 5 6 +9 8 1 2 3 4 5 +10 9 8 1 2 3 4 +11 10 9 8 1 2 3 +12 11 10 9 8 1 2 +13 12 11 10 9 8 1 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 2 1 2 1 2 1 +2 1 2 1 2 1 2 +1 2 1 2 1 2 1 +2 1 2 1 2 1 2 +1 2 1 2 1 2 1 +2 1 2 1 2 1 2 +1 2 1 2 1 2 1 +1 2 3 4 5 6 7 +2 3 4 5 6 7 8 +3 4 5 6 7 8 9 +4 5 6 7 8 9 10 +5 6 7 8 9 10 11 +6 7 8 9 10 11 12 +7 8 9 10 11 12 13 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 1 1 1 1 +1 1 1 0 2 2 2 +1 1 0 0 0 2 2 +1 0 3 0 2 0 4 +0 0 0 2 0 0 0 +5 0 2 0 6 0 7 +2 2 0 0 0 7 7 +2 2 2 0 7 7 7 +1 1 1 0 2 2 2 +1 1 0 0 0 2 2 +3 0 1 0 4 0 2 +0 0 0 1 0 0 0 +5 0 6 0 1 0 7 +5 5 0 0 0 1 1 +5 5 5 0 1 1 1 +1 1 1 0 2 2 2 +3 3 0 0 0 4 4 +5 0 6 0 7 0 8 +0 0 0 9 0 0 0 +10 0 11 0 12 0 13 +14 14 0 0 0 15 15 +16 16 16 0 17 17 17 +1 1 1 0 2 3 3 +1 1 0 0 0 3 3 +1 0 4 0 3 0 3 +0 0 0 3 0 0 0 +3 0 3 0 5 0 6 +3 3 0 0 0 6 6 +3 3 7 0 6 6 6 +1 2 3 0 4 5 6 +7 8 0 0 0 9 10 +11 0 12 0 13 0 14 +0 0 0 15 0 0 0 +16 0 17 0 18 0 19 +20 21 0 0 0 22 23 +24 25 26 0 27 28 29 +1 1 1 0 2 2 2 +1 1 0 0 0 2 2 +1 0 3 0 2 0 2 +0 0 0 2 0 0 0 +2 0 2 0 4 0 5 +2 2 0 0 0 5 5 +2 2 2 0 5 5 5 +1 1 1 0 2 2 2 +1 1 0 0 0 2 2 +1 0 3 0 4 0 2 +0 0 0 5 0 0 0 +6 0 7 0 8 0 9 +6 6 0 0 0 9 9 +6 6 6 0 9 9 9 +1 2 3 0 4 5 6 +7 1 0 0 0 4 5 +8 0 1 0 9 0 4 +0 0 0 1 0 0 0 +10 0 11 0 1 0 12 +13 10 0 0 0 1 14 +15 13 10 0 16 17 1 +1 2 3 0 4 5 6 +1 2 0 0 0 5 6 +1 0 7 0 8 0 6 +0 0 0 9 0 0 0 +10 0 11 0 12 0 13 +10 14 0 0 0 15 13 +10 14 16 0 17 15 13 +1 1 1 0 1 1 1 +1 1 0 0 0 1 1 +1 0 1 0 1 0 1 +0 0 0 1 0 0 0 +1 0 1 0 1 0 1 +1 1 0 0 0 1 1 +1 1 1 0 1 1 1 +1 1 2 0 3 3 3 +1 1 0 0 0 3 3 +1 0 1 0 4 0 3 +0 0 0 1 0 0 0 +5 0 6 0 1 0 1 +5 5 0 0 0 1 1 +5 5 5 0 7 1 1 +1 2 1 0 1 3 1 +2 1 0 0 0 1 3 +1 0 1 0 1 0 1 +0 0 0 1 0 0 0 +1 0 1 0 1 0 1 +4 1 0 0 0 1 5 +1 4 1 0 1 5 1 +1 2 3 0 4 5 6 +2 3 0 0 0 6 7 +3 0 8 0 6 0 9 +0 0 0 6 0 0 0 +10 0 6 0 11 0 12 +13 6 0 0 0 12 14 +6 15 16 0 12 14 17 +1 1 1 0 2 2 2 +1 1 0 0 0 2 2 +1 0 1 0 3 0 2 +0 0 0 1 0 0 0 +4 0 5 0 1 0 1 +4 4 0 0 0 1 1 +4 4 4 0 1 1 1 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +4 0 0 5 0 0 5 +5 5 5 5 5 5 5 +5 0 0 5 0 0 6 +0 0 0 7 0 0 0 +8 0 7 7 7 0 9 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +4 0 0 4 0 0 5 +4 4 4 4 4 4 4 +6 0 0 4 0 0 4 +0 0 0 7 0 0 0 +8 0 7 7 7 0 9 +1 0 2 2 2 0 3 +0 0 0 4 0 0 0 +5 0 0 6 0 0 7 +8 8 8 8 8 8 8 +9 0 0 10 0 0 11 +0 0 0 12 0 0 0 +13 0 14 14 14 0 15 +1 0 2 3 3 0 4 +0 0 0 3 0 0 0 +5 0 0 3 0 0 6 +5 5 3 3 3 6 6 +5 0 0 3 0 0 6 +0 0 0 3 0 0 0 +7 0 3 3 8 0 9 +1 0 2 3 4 0 5 +0 0 0 6 0 0 0 +7 0 0 8 0 0 9 +10 11 12 13 14 15 16 +17 0 0 18 0 0 19 +0 0 0 20 0 0 0 +21 0 22 23 24 0 25 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +2 0 0 2 0 0 2 +2 2 2 2 2 2 2 +2 0 0 2 0 0 2 +0 0 0 2 0 0 0 +4 0 2 2 2 0 5 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +2 0 0 2 0 0 2 +2 2 2 2 2 2 2 +2 0 0 2 0 0 2 +0 0 0 2 0 0 0 +4 0 2 2 2 0 5 +1 0 2 3 4 0 5 +0 0 0 2 0 0 0 +6 0 0 7 0 0 8 +9 6 10 11 7 12 13 +14 0 0 10 0 0 12 +0 0 0 15 0 0 0 +16 0 17 18 15 0 19 +1 0 2 3 4 0 5 +0 0 0 3 0 0 0 +6 0 0 3 0 0 7 +6 8 9 3 10 11 7 +6 0 0 3 0 0 7 +0 0 0 3 0 0 0 +12 0 13 3 14 0 15 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +2 0 0 2 0 0 2 +2 2 2 2 2 2 2 +2 0 0 2 0 0 2 +0 0 0 2 0 0 0 +4 0 2 2 2 0 5 +1 0 2 2 3 0 4 +0 0 0 2 0 0 0 +5 0 0 2 0 0 6 +5 5 2 2 2 6 6 +5 0 0 2 0 0 6 +0 0 0 2 0 0 0 +7 0 8 2 2 0 9 +1 0 2 3 2 0 4 +0 0 0 2 0 0 0 +5 0 0 6 0 0 7 +8 5 6 9 6 7 10 +5 0 0 6 0 0 7 +0 0 0 11 0 0 0 +12 0 11 13 11 0 14 +1 0 2 3 4 0 5 +0 0 0 4 0 0 0 +6 0 0 7 0 0 8 +9 10 7 11 12 8 13 +10 0 0 12 0 0 14 +0 0 0 15 0 0 0 +16 0 15 17 18 0 19 +1 0 2 2 2 0 3 +0 0 0 2 0 0 0 +2 0 0 2 0 0 2 +2 2 2 2 2 2 2 +2 0 0 2 0 0 2 +0 0 0 2 0 0 0 +4 0 2 2 2 0 5 diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt new file mode 100644 index 0000000000000000000000000000000000000000..35ae8121364d4fb3292c11f2a72333f456fa9c0a --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt @@ -0,0 +1,42 @@ +0 0 1 +1 1 1 +1 0 0 +1 0 0 +1 1 1 +0 0 1 +0 0 0 +1 1 1 +0 0 0 +0 1 1 +0 1 0 +1 1 0 +0 0 0 +0 0 0 +0 0 0 +0 1 1 +1 1 1 +1 1 0 +0 1 0 +1 1 1 +0 1 0 +1 0 0 +0 1 0 +0 0 1 +0 1 0 +0 1 0 +0 1 0 +1 1 1 +1 1 1 +1 1 1 +1 1 0 +0 1 0 +0 1 1 +1 0 1 +0 1 0 +1 0 1 +0 0 1 +0 1 0 +1 0 0 +1 1 0 +1 1 1 +0 1 1 diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_csc.py b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_csc.py new file mode 100644 index 0000000000000000000000000000000000000000..3fcdeb49cc0a951b9a2df955b971d5148916f289 --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_csc.py @@ -0,0 +1,364 @@ +"""Compressed Sparse Column matrix format""" +__docformat__ = "restructuredtext en" + +__all__ = ['csc_array', 'csc_matrix', 'isspmatrix_csc'] + + +import numpy as np + +from ._matrix import spmatrix +from ._base import _spbase, sparray +from ._sparsetools import csc_tocsr, expandptr +from ._sputils import upcast + +from ._compressed import _cs_matrix + + +class _csc_base(_cs_matrix): + _format = 'csc' + + def transpose(self, axes=None, copy=False): + if axes is not None and axes != (1, 0): + raise ValueError("Sparse arrays/matrices do not support " + "an 'axes' parameter because swapping " + "dimensions is the only logical permutation.") + + M, N = self.shape + + return self._csr_container((self.data, self.indices, + self.indptr), (N, M), copy=copy) + + transpose.__doc__ = _spbase.transpose.__doc__ + + def __iter__(self): + yield from self.tocsr() + + def tocsc(self, copy=False): + if copy: + return self.copy() + else: + return self + + tocsc.__doc__ = _spbase.tocsc.__doc__ + + def tocsr(self, copy=False): + M,N = self.shape + idx_dtype = self._get_index_dtype((self.indptr, self.indices), + maxval=max(self.nnz, N)) + indptr = np.empty(M + 1, dtype=idx_dtype) + indices = np.empty(self.nnz, dtype=idx_dtype) + data = np.empty(self.nnz, dtype=upcast(self.dtype)) + + csc_tocsr(M, N, + self.indptr.astype(idx_dtype), + self.indices.astype(idx_dtype), + self.data, + indptr, + indices, + data) + + A = self._csr_container( + (data, indices, indptr), + shape=self.shape, copy=False + ) + A.has_sorted_indices = True + return A + + tocsr.__doc__ = _spbase.tocsr.__doc__ + + def nonzero(self): + # CSC can't use _cs_matrix's .nonzero method because it + # returns the indices sorted for self transposed. + + # Get row and col indices, from _cs_matrix.tocoo + major_dim, minor_dim = self._swap(self.shape) + minor_indices = self.indices + major_indices = np.empty(len(minor_indices), dtype=self.indices.dtype) + expandptr(major_dim, self.indptr, major_indices) + row, col = self._swap((major_indices, minor_indices)) + + # Remove explicit zeros + nz_mask = self.data != 0 + row = row[nz_mask] + col = col[nz_mask] + + # Sort them to be in C-style order + ind = np.argsort(row, kind='mergesort') + row = row[ind] + col = col[ind] + + return row, col + + nonzero.__doc__ = _cs_matrix.nonzero.__doc__ + + def _getrow(self, i): + """Returns a copy of row i of the matrix, as a (1 x n) + CSR matrix (row vector). + """ + M, N = self.shape + i = int(i) + if i < 0: + i += M + if i < 0 or i >= M: + raise IndexError('index (%d) out of range' % i) + return self._get_submatrix(minor=i).tocsr() + + def _getcol(self, i): + """Returns a copy of column i of the matrix, as a (m x 1) + CSC matrix (column vector). + """ + M, N = self.shape + i = int(i) + if i < 0: + i += N + if i < 0 or i >= N: + raise IndexError('index (%d) out of range' % i) + return self._get_submatrix(major=i, copy=True) + + def _get_intXarray(self, row, col): + return self._major_index_fancy(col)._get_submatrix(minor=row) + + def _get_intXslice(self, row, col): + if col.step in (1, None): + return self._get_submatrix(major=col, minor=row, copy=True) + return self._major_slice(col)._get_submatrix(minor=row) + + def _get_sliceXint(self, row, col): + if row.step in (1, None): + return self._get_submatrix(major=col, minor=row, copy=True) + return self._get_submatrix(major=col)._minor_slice(row) + + def _get_sliceXarray(self, row, col): + return self._major_index_fancy(col)._minor_slice(row) + + def _get_arrayXint(self, row, col): + return self._get_submatrix(major=col)._minor_index_fancy(row) + + def _get_arrayXslice(self, row, col): + return self._major_slice(col)._minor_index_fancy(row) + + # these functions are used by the parent class (_cs_matrix) + # to remove redundancy between csc_array and csr_matrix + @staticmethod + def _swap(x): + """swap the members of x if this is a column-oriented matrix + """ + return x[1], x[0] + + +def isspmatrix_csc(x): + """Is `x` of csc_matrix type? + + Parameters + ---------- + x + object to check for being a csc matrix + + Returns + ------- + bool + True if `x` is a csc matrix, False otherwise + + Examples + -------- + >>> from scipy.sparse import csc_array, csc_matrix, coo_matrix, isspmatrix_csc + >>> isspmatrix_csc(csc_matrix([[5]])) + True + >>> isspmatrix_csc(csc_array([[5]])) + False + >>> isspmatrix_csc(coo_matrix([[5]])) + False + """ + return isinstance(x, csc_matrix) + + +# This namespace class separates array from matrix with isinstance +class csc_array(_csc_base, sparray): + """ + Compressed Sparse Column array. + + This can be instantiated in several ways: + csc_array(D) + where D is a 2-D ndarray + + csc_array(S) + with another sparse array or matrix S (equivalent to S.tocsc()) + + csc_array((M, N), [dtype]) + to construct an empty array with shape (M, N) + dtype is optional, defaulting to dtype='d'. + + csc_array((data, (row_ind, col_ind)), [shape=(M, N)]) + where ``data``, ``row_ind`` and ``col_ind`` satisfy the + relationship ``a[row_ind[k], col_ind[k]] = data[k]``. + + csc_array((data, indices, indptr), [shape=(M, N)]) + is the standard CSC representation where the row indices for + column i are stored in ``indices[indptr[i]:indptr[i+1]]`` + and their corresponding values are stored in + ``data[indptr[i]:indptr[i+1]]``. If the shape parameter is + not supplied, the array dimensions are inferred from + the index arrays. + + Attributes + ---------- + dtype : dtype + Data type of the array + shape : 2-tuple + Shape of the array + ndim : int + Number of dimensions (this is always 2) + nnz + size + data + CSC format data array of the array + indices + CSC format index array of the array + indptr + CSC format index pointer array of the array + has_sorted_indices + has_canonical_format + T + + Notes + ----- + + Sparse arrays can be used in arithmetic operations: they support + addition, subtraction, multiplication, division, and matrix power. + + Advantages of the CSC format + - efficient arithmetic operations CSC + CSC, CSC * CSC, etc. + - efficient column slicing + - fast matrix vector products (CSR, BSR may be faster) + + Disadvantages of the CSC format + - slow row slicing operations (consider CSR) + - changes to the sparsity structure are expensive (consider LIL or DOK) + + Canonical format + - Within each column, indices are sorted by row. + - There are no duplicate entries. + + Examples + -------- + + >>> import numpy as np + >>> from scipy.sparse import csc_array + >>> csc_array((3, 4), dtype=np.int8).toarray() + array([[0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0]], dtype=int8) + + >>> row = np.array([0, 2, 2, 0, 1, 2]) + >>> col = np.array([0, 0, 1, 2, 2, 2]) + >>> data = np.array([1, 2, 3, 4, 5, 6]) + >>> csc_array((data, (row, col)), shape=(3, 3)).toarray() + array([[1, 0, 4], + [0, 0, 5], + [2, 3, 6]]) + + >>> indptr = np.array([0, 2, 3, 6]) + >>> indices = np.array([0, 2, 2, 0, 1, 2]) + >>> data = np.array([1, 2, 3, 4, 5, 6]) + >>> csc_array((data, indices, indptr), shape=(3, 3)).toarray() + array([[1, 0, 4], + [0, 0, 5], + [2, 3, 6]]) + + """ + + +class csc_matrix(spmatrix, _csc_base): + """ + Compressed Sparse Column matrix. + + This can be instantiated in several ways: + csc_matrix(D) + where D is a 2-D ndarray + + csc_matrix(S) + with another sparse array or matrix S (equivalent to S.tocsc()) + + csc_matrix((M, N), [dtype]) + to construct an empty matrix with shape (M, N) + dtype is optional, defaulting to dtype='d'. + + csc_matrix((data, (row_ind, col_ind)), [shape=(M, N)]) + where ``data``, ``row_ind`` and ``col_ind`` satisfy the + relationship ``a[row_ind[k], col_ind[k]] = data[k]``. + + csc_matrix((data, indices, indptr), [shape=(M, N)]) + is the standard CSC representation where the row indices for + column i are stored in ``indices[indptr[i]:indptr[i+1]]`` + and their corresponding values are stored in + ``data[indptr[i]:indptr[i+1]]``. If the shape parameter is + not supplied, the matrix dimensions are inferred from + the index arrays. + + Attributes + ---------- + dtype : dtype + Data type of the matrix + shape : 2-tuple + Shape of the matrix + ndim : int + Number of dimensions (this is always 2) + nnz + size + data + CSC format data array of the matrix + indices + CSC format index array of the matrix + indptr + CSC format index pointer array of the matrix + has_sorted_indices + has_canonical_format + T + + Notes + ----- + + Sparse matrices can be used in arithmetic operations: they support + addition, subtraction, multiplication, division, and matrix power. + + Advantages of the CSC format + - efficient arithmetic operations CSC + CSC, CSC * CSC, etc. + - efficient column slicing + - fast matrix vector products (CSR, BSR may be faster) + + Disadvantages of the CSC format + - slow row slicing operations (consider CSR) + - changes to the sparsity structure are expensive (consider LIL or DOK) + + Canonical format + - Within each column, indices are sorted by row. + - There are no duplicate entries. + + Examples + -------- + + >>> import numpy as np + >>> from scipy.sparse import csc_matrix + >>> csc_matrix((3, 4), dtype=np.int8).toarray() + array([[0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0]], dtype=int8) + + >>> row = np.array([0, 2, 2, 0, 1, 2]) + >>> col = np.array([0, 0, 1, 2, 2, 2]) + >>> data = np.array([1, 2, 3, 4, 5, 6]) + >>> csc_matrix((data, (row, col)), shape=(3, 3)).toarray() + array([[1, 0, 4], + [0, 0, 5], + [2, 3, 6]]) + + >>> indptr = np.array([0, 2, 3, 6]) + >>> indices = np.array([0, 2, 2, 0, 1, 2]) + >>> data = np.array([1, 2, 3, 4, 5, 6]) + >>> csc_matrix((data, indices, indptr), shape=(3, 3)).toarray() + array([[1, 0, 4], + [0, 0, 5], + [2, 3, 6]]) + + """ + diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_data.py b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_data.py new file mode 100644 index 0000000000000000000000000000000000000000..408661ccb4a37aaecbdfc6ae6557ebff468000ed --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_data.py @@ -0,0 +1,506 @@ +"""Base class for sparse matrice with a .data attribute + + subclasses must provide a _with_data() method that + creates a new matrix with the same sparsity pattern + as self but with a different data array + +""" + +import numpy as np + +from ._base import _spbase, _ufuncs_with_fixed_point_at_zero +from ._sputils import isscalarlike, validateaxis + +__all__ = [] + + +# TODO implement all relevant operations +# use .data.__methods__() instead of /=, *=, etc. +class _data_matrix(_spbase): + def __init__(self): + _spbase.__init__(self) + + @property + def dtype(self): + return self.data.dtype + + @dtype.setter + def dtype(self, newtype): + self.data.dtype = newtype + + def _deduped_data(self): + if hasattr(self, 'sum_duplicates'): + self.sum_duplicates() + return self.data + + def __abs__(self): + return self._with_data(abs(self._deduped_data())) + + def __round__(self, ndigits=0): + return self._with_data(np.around(self._deduped_data(), decimals=ndigits)) + + def _real(self): + return self._with_data(self.data.real) + + def _imag(self): + return self._with_data(self.data.imag) + + def __neg__(self): + if self.dtype.kind == 'b': + raise NotImplementedError('negating a boolean sparse array is not ' + 'supported') + return self._with_data(-self.data) + + def __imul__(self, other): # self *= other + if isscalarlike(other): + self.data *= other + return self + else: + return NotImplemented + + def __itruediv__(self, other): # self /= other + if isscalarlike(other): + recip = 1.0 / other + self.data *= recip + return self + else: + return NotImplemented + + def astype(self, dtype, casting='unsafe', copy=True): + dtype = np.dtype(dtype) + if self.dtype != dtype: + matrix = self._with_data( + self.data.astype(dtype, casting=casting, copy=True), + copy=True + ) + return matrix._with_data(matrix._deduped_data(), copy=False) + elif copy: + return self.copy() + else: + return self + + astype.__doc__ = _spbase.astype.__doc__ + + def conjugate(self, copy=True): + if np.issubdtype(self.dtype, np.complexfloating): + return self._with_data(self.data.conjugate(), copy=copy) + elif copy: + return self.copy() + else: + return self + + conjugate.__doc__ = _spbase.conjugate.__doc__ + + def copy(self): + return self._with_data(self.data.copy(), copy=True) + + copy.__doc__ = _spbase.copy.__doc__ + + def count_nonzero(self): + return np.count_nonzero(self._deduped_data()) + + count_nonzero.__doc__ = _spbase.count_nonzero.__doc__ + + def power(self, n, dtype=None): + """ + This function performs element-wise power. + + Parameters + ---------- + n : scalar + n is a non-zero scalar (nonzero avoids dense ones creation) + If zero power is desired, special case it to use `np.ones` + + dtype : If dtype is not specified, the current dtype will be preserved. + + Raises + ------ + NotImplementedError : if n is a zero scalar + If zero power is desired, special case it to use + `np.ones(A.shape, dtype=A.dtype)` + """ + if not isscalarlike(n): + raise NotImplementedError("input is not scalar") + if not n: + raise NotImplementedError( + "zero power is not supported as it would densify the matrix.\n" + "Use `np.ones(A.shape, dtype=A.dtype)` for this case." + ) + + data = self._deduped_data() + if dtype is not None: + data = data.astype(dtype) + return self._with_data(data ** n) + + ########################### + # Multiplication handlers # + ########################### + + def _mul_scalar(self, other): + return self._with_data(self.data * other) + + +# Add the numpy unary ufuncs for which func(0) = 0 to _data_matrix. +for npfunc in _ufuncs_with_fixed_point_at_zero: + name = npfunc.__name__ + + def _create_method(op): + def method(self): + result = op(self._deduped_data()) + return self._with_data(result, copy=True) + + method.__doc__ = (f"Element-wise {name}.\n\n" + f"See `numpy.{name}` for more information.") + method.__name__ = name + + return method + + setattr(_data_matrix, name, _create_method(npfunc)) + + +def _find_missing_index(ind, n): + for k, a in enumerate(ind): + if k != a: + return k + + k += 1 + if k < n: + return k + else: + return -1 + + +class _minmax_mixin: + """Mixin for min and max methods. + + These are not implemented for dia_matrix, hence the separate class. + """ + + def _min_or_max_axis(self, axis, min_or_max): + N = self.shape[axis] + if N == 0: + raise ValueError("zero-size array to reduction operation") + M = self.shape[1 - axis] + idx_dtype = self._get_index_dtype(maxval=M) + + mat = self.tocsc() if axis == 0 else self.tocsr() + mat.sum_duplicates() + + major_index, value = mat._minor_reduce(min_or_max) + not_full = np.diff(mat.indptr)[major_index] < N + value[not_full] = min_or_max(value[not_full], 0) + + mask = value != 0 + major_index = np.compress(mask, major_index) + value = np.compress(mask, value) + + if axis == 0: + return self._coo_container( + (value, (np.zeros(len(value), dtype=idx_dtype), major_index)), + dtype=self.dtype, shape=(1, M) + ) + else: + return self._coo_container( + (value, (major_index, np.zeros(len(value), dtype=idx_dtype))), + dtype=self.dtype, shape=(M, 1) + ) + + def _min_or_max(self, axis, out, min_or_max): + if out is not None: + raise ValueError("Sparse arrays do not support an 'out' parameter.") + + validateaxis(axis) + if self.ndim == 1: + if axis not in (None, 0, -1): + raise ValueError("axis out of range") + axis = None # avoid calling special axis case. no impact on 1d + + if axis is None: + if 0 in self.shape: + raise ValueError("zero-size array to reduction operation") + + zero = self.dtype.type(0) + if self.nnz == 0: + return zero + m = min_or_max.reduce(self._deduped_data().ravel()) + if self.nnz != np.prod(self.shape): + m = min_or_max(zero, m) + return m + + if axis < 0: + axis += 2 + + if (axis == 0) or (axis == 1): + return self._min_or_max_axis(axis, min_or_max) + else: + raise ValueError("axis out of range") + + def _arg_min_or_max_axis(self, axis, argmin_or_argmax, compare): + if self.shape[axis] == 0: + raise ValueError("Cannot apply the operation along a zero-sized dimension.") + + if axis < 0: + axis += 2 + + zero = self.dtype.type(0) + + mat = self.tocsc() if axis == 0 else self.tocsr() + mat.sum_duplicates() + + ret_size, line_size = mat._swap(mat.shape) + ret = np.zeros(ret_size, dtype=int) + + nz_lines, = np.nonzero(np.diff(mat.indptr)) + for i in nz_lines: + p, q = mat.indptr[i:i + 2] + data = mat.data[p:q] + indices = mat.indices[p:q] + extreme_index = argmin_or_argmax(data) + extreme_value = data[extreme_index] + if compare(extreme_value, zero) or q - p == line_size: + ret[i] = indices[extreme_index] + else: + zero_ind = _find_missing_index(indices, line_size) + if extreme_value == zero: + ret[i] = min(extreme_index, zero_ind) + else: + ret[i] = zero_ind + + if axis == 1: + ret = ret.reshape(-1, 1) + + return self._ascontainer(ret) + + def _arg_min_or_max(self, axis, out, argmin_or_argmax, compare): + if out is not None: + raise ValueError("Sparse types do not support an 'out' parameter.") + + validateaxis(axis) + + if self.ndim == 1: + if axis not in (None, 0, -1): + raise ValueError("axis out of range") + axis = None # avoid calling special axis case. no impact on 1d + + if axis is not None: + return self._arg_min_or_max_axis(axis, argmin_or_argmax, compare) + + if 0 in self.shape: + raise ValueError("Cannot apply the operation to an empty matrix.") + + if self.nnz == 0: + return 0 + + zero = self.dtype.type(0) + mat = self.tocoo() + # Convert to canonical form: no duplicates, sorted indices. + mat.sum_duplicates() + extreme_index = argmin_or_argmax(mat.data) + extreme_value = mat.data[extreme_index] + num_col = mat.shape[-1] + + # If the min value is less than zero, or max is greater than zero, + # then we do not need to worry about implicit zeros. + if compare(extreme_value, zero): + # cast to Python int to avoid overflow and RuntimeError + return int(mat.row[extreme_index]) * num_col + int(mat.col[extreme_index]) + + # Cheap test for the rare case where we have no implicit zeros. + size = np.prod(self.shape) + if size == mat.nnz: + return int(mat.row[extreme_index]) * num_col + int(mat.col[extreme_index]) + + # At this stage, any implicit zero could be the min or max value. + # After sum_duplicates(), the `row` and `col` arrays are guaranteed to + # be sorted in C-order, which means the linearized indices are sorted. + linear_indices = mat.row * num_col + mat.col + first_implicit_zero_index = _find_missing_index(linear_indices, size) + if extreme_value == zero: + return min(first_implicit_zero_index, extreme_index) + return first_implicit_zero_index + + def max(self, axis=None, out=None): + """ + Return the maximum of the array/matrix or maximum along an axis. + This takes all elements into account, not just the non-zero ones. + + Parameters + ---------- + axis : {-2, -1, 0, 1, None} optional + Axis along which the sum is computed. The default is to + compute the maximum over all elements, returning + a scalar (i.e., `axis` = `None`). + + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except + for the default value, as this argument is not used. + + Returns + ------- + amax : coo_matrix or scalar + Maximum of `a`. If `axis` is None, the result is a scalar value. + If `axis` is given, the result is a sparse.coo_matrix of dimension + ``a.ndim - 1``. + + See Also + -------- + min : The minimum value of a sparse array/matrix along a given axis. + numpy.matrix.max : NumPy's implementation of 'max' for matrices + + """ + return self._min_or_max(axis, out, np.maximum) + + def min(self, axis=None, out=None): + """ + Return the minimum of the array/matrix or maximum along an axis. + This takes all elements into account, not just the non-zero ones. + + Parameters + ---------- + axis : {-2, -1, 0, 1, None} optional + Axis along which the sum is computed. The default is to + compute the minimum over all elements, returning + a scalar (i.e., `axis` = `None`). + + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except for + the default value, as this argument is not used. + + Returns + ------- + amin : coo_matrix or scalar + Minimum of `a`. If `axis` is None, the result is a scalar value. + If `axis` is given, the result is a sparse.coo_matrix of dimension + ``a.ndim - 1``. + + See Also + -------- + max : The maximum value of a sparse array/matrix along a given axis. + numpy.matrix.min : NumPy's implementation of 'min' for matrices + + """ + return self._min_or_max(axis, out, np.minimum) + + def nanmax(self, axis=None, out=None): + """ + Return the maximum of the array/matrix or maximum along an axis, ignoring any + NaNs. This takes all elements into account, not just the non-zero + ones. + + .. versionadded:: 1.11.0 + + Parameters + ---------- + axis : {-2, -1, 0, 1, None} optional + Axis along which the maximum is computed. The default is to + compute the maximum over all elements, returning + a scalar (i.e., `axis` = `None`). + + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except + for the default value, as this argument is not used. + + Returns + ------- + amax : coo_matrix or scalar + Maximum of `a`. If `axis` is None, the result is a scalar value. + If `axis` is given, the result is a sparse.coo_matrix of dimension + ``a.ndim - 1``. + + See Also + -------- + nanmin : The minimum value of a sparse array/matrix along a given axis, + ignoring NaNs. + max : The maximum value of a sparse array/matrix along a given axis, + propagating NaNs. + numpy.nanmax : NumPy's implementation of 'nanmax'. + + """ + return self._min_or_max(axis, out, np.fmax) + + def nanmin(self, axis=None, out=None): + """ + Return the minimum of the array/matrix or minimum along an axis, ignoring any + NaNs. This takes all elements into account, not just the non-zero + ones. + + .. versionadded:: 1.11.0 + + Parameters + ---------- + axis : {-2, -1, 0, 1, None} optional + Axis along which the minimum is computed. The default is to + compute the minimum over all elements, returning + a scalar (i.e., `axis` = `None`). + + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except for + the default value, as this argument is not used. + + Returns + ------- + amin : coo_matrix or scalar + Minimum of `a`. If `axis` is None, the result is a scalar value. + If `axis` is given, the result is a sparse.coo_matrix of dimension + ``a.ndim - 1``. + + See Also + -------- + nanmax : The maximum value of a sparse array/matrix along a given axis, + ignoring NaNs. + min : The minimum value of a sparse array/matrix along a given axis, + propagating NaNs. + numpy.nanmin : NumPy's implementation of 'nanmin'. + + """ + return self._min_or_max(axis, out, np.fmin) + + def argmax(self, axis=None, out=None): + """Return indices of maximum elements along an axis. + + Implicit zero elements are also taken into account. If there are + several maximum values, the index of the first occurrence is returned. + + Parameters + ---------- + axis : {-2, -1, 0, 1, None}, optional + Axis along which the argmax is computed. If None (default), index + of the maximum element in the flatten data is returned. + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except for + the default value, as this argument is not used. + + Returns + ------- + ind : numpy.matrix or int + Indices of maximum elements. If matrix, its size along `axis` is 1. + """ + return self._arg_min_or_max(axis, out, np.argmax, np.greater) + + def argmin(self, axis=None, out=None): + """Return indices of minimum elements along an axis. + + Implicit zero elements are also taken into account. If there are + several minimum values, the index of the first occurrence is returned. + + Parameters + ---------- + axis : {-2, -1, 0, 1, None}, optional + Axis along which the argmin is computed. If None (default), index + of the minimum element in the flatten data is returned. + out : None, optional + This argument is in the signature *solely* for NumPy + compatibility reasons. Do not pass in anything except for + the default value, as this argument is not used. + + Returns + ------- + ind : numpy.matrix or int + Indices of minimum elements. If matrix, its size along `axis` is 1. + """ + return self._arg_min_or_max(axis, out, np.argmin, np.less) diff --git a/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_sputils.py b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_sputils.py new file mode 100644 index 0000000000000000000000000000000000000000..fa515606006d5084799cd6ac8578e1f88ed51bb9 --- /dev/null +++ b/llmeval-env/lib/python3.10/site-packages/scipy/sparse/_sputils.py @@ -0,0 +1,451 @@ +""" Utility functions for sparse matrix module +""" + +import sys +from typing import Any, Literal, Optional, Union +import operator +import numpy as np +from math import prod +import scipy.sparse as sp +from scipy._lib._util import np_long, np_ulong + + +__all__ = ['upcast', 'getdtype', 'getdata', 'isscalarlike', 'isintlike', + 'isshape', 'issequence', 'isdense', 'ismatrix', 'get_sum_dtype'] + +supported_dtypes = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, + np.uintc, np_long, np_ulong, np.longlong, np.ulonglong, + np.float32, np.float64, np.longdouble, + np.complex64, np.complex128, np.clongdouble] + +_upcast_memo = {} + + +def upcast(*args): + """Returns the nearest supported sparse dtype for the + combination of one or more types. + + upcast(t0, t1, ..., tn) -> T where T is a supported dtype + + Examples + -------- + >>> from scipy.sparse._sputils import upcast + >>> upcast('int32') + + >>> upcast('bool') + + >>> upcast('int32','float32') + + >>> upcast('bool',complex,float) + + + """ + + t = _upcast_memo.get(hash(args)) + if t is not None: + return t + + upcast = np.result_type(*args) + + for t in supported_dtypes: + if np.can_cast(upcast, t): + _upcast_memo[hash(args)] = t + return t + + raise TypeError(f'no supported conversion for types: {args!r}') + + +def upcast_char(*args): + """Same as `upcast` but taking dtype.char as input (faster).""" + t = _upcast_memo.get(args) + if t is not None: + return t + t = upcast(*map(np.dtype, args)) + _upcast_memo[args] = t + return t + + +def upcast_scalar(dtype, scalar): + """Determine data type for binary operation between an array of + type `dtype` and a scalar. + """ + return (np.array([0], dtype=dtype) * scalar).dtype + + +def downcast_intp_index(arr): + """ + Down-cast index array to np.intp dtype if it is of a larger dtype. + + Raise an error if the array contains a value that is too large for + intp. + """ + if arr.dtype.itemsize > np.dtype(np.intp).itemsize: + if arr.size == 0: + return arr.astype(np.intp) + maxval = arr.max() + minval = arr.min() + if maxval > np.iinfo(np.intp).max or minval < np.iinfo(np.intp).min: + raise ValueError("Cannot deal with arrays with indices larger " + "than the machine maximum address size " + "(e.g. 64-bit indices on 32-bit machine).") + return arr.astype(np.intp) + return arr + + +def to_native(A): + """ + Ensure that the data type of the NumPy array `A` has native byte order. + + `A` must be a NumPy array. If the data type of `A` does not have native + byte order, a copy of `A` with a native byte order is returned. Otherwise + `A` is returned. + """ + dt = A.dtype + if dt.isnative: + # Don't call `asarray()` if A is already native, to avoid unnecessarily + # creating a view of the input array. + return A + return np.asarray(A, dtype=dt.newbyteorder('native')) + + +def getdtype(dtype, a=None, default=None): + """Function used to simplify argument processing. If 'dtype' is not + specified (is None), returns a.dtype; otherwise returns a np.dtype + object created from the specified dtype argument. If 'dtype' and 'a' + are both None, construct a data type out of the 'default' parameter. + Furthermore, 'dtype' must be in 'allowed' set. + """ + # TODO is this really what we want? + if dtype is None: + try: + newdtype = a.dtype + except AttributeError as e: + if default is not None: + newdtype = np.dtype(default) + else: + raise TypeError("could not interpret data type") from e + else: + newdtype = np.dtype(dtype) + if newdtype == np.object_: + raise ValueError( + "object dtype is not supported by sparse matrices" + ) + + return newdtype + + +def getdata(obj, dtype=None, copy=False) -> np.ndarray: + """ + This is a wrapper of `np.array(obj, dtype=dtype, copy=copy)` + that will generate a warning if the result is an object array. + """ + data = np.array(obj, dtype=dtype, copy=copy) + # Defer to getdtype for checking that the dtype is OK. + # This is called for the validation only; we don't need the return value. + getdtype(data.dtype) + return data + + +def get_index_dtype(arrays=(), maxval=None, check_contents=False): + """ + Based on input (integer) arrays `a`, determine a suitable index data + type that can hold the data in the arrays. + + Parameters + ---------- + arrays : tuple of array_like + Input arrays whose types/contents to check + maxval : float, optional + Maximum value needed + check_contents : bool, optional + Whether to check the values in the arrays and not just their types. + Default: False (check only the types) + + Returns + ------- + dtype : dtype + Suitable index data type (int32 or int64) + + """ + + int32min = np.int32(np.iinfo(np.int32).min) + int32max = np.int32(np.iinfo(np.int32).max) + + # not using intc directly due to misinteractions with pythran + dtype = np.int32 if np.intc().itemsize == 4 else np.int64 + if maxval is not None: + maxval = np.int64(maxval) + if maxval > int32max: + dtype = np.int64 + + if isinstance(arrays, np.ndarray): + arrays = (arrays,) + + for arr in arrays: + arr = np.asarray(arr) + if not np.can_cast(arr.dtype, np.int32): + if check_contents: + if arr.size == 0: + # a bigger type not needed + continue + elif np.issubdtype(arr.dtype, np.integer): + maxval = arr.max() + minval = arr.min() + if minval >= int32min and maxval <= int32max: + # a bigger type not needed + continue + + dtype = np.int64 + break + + return dtype + + +def get_sum_dtype(dtype: np.dtype) -> np.dtype: + """Mimic numpy's casting for np.sum""" + if dtype.kind == 'u' and np.can_cast(dtype, np.uint): + return np.uint + if np.can_cast(dtype, np.int_): + return np.int_ + return dtype + + +def isscalarlike(x) -> bool: + """Is x either a scalar, an array scalar, or a 0-dim array?""" + return np.isscalar(x) or (isdense(x) and x.ndim == 0) + + +def isintlike(x) -> bool: + """Is x appropriate as an index into a sparse matrix? Returns True + if it can be cast safely to a machine int. + """ + # Fast-path check to eliminate non-scalar values. operator.index would + # catch this case too, but the exception catching is slow. + if np.ndim(x) != 0: + return False + try: + operator.index(x) + except (TypeError, ValueError): + try: + loose_int = bool(int(x) == x) + except (TypeError, ValueError): + return False + if loose_int: + msg = "Inexact indices into sparse matrices are not allowed" + raise ValueError(msg) + return loose_int + return True + + +def isshape(x, nonneg=False, *, allow_1d=False) -> bool: + """Is x a valid tuple of dimensions? + + If nonneg, also checks that the dimensions are non-negative. + If allow_1d, shapes of length 1 or 2 are allowed. + """ + ndim = len(x) + if ndim != 2 and not (allow_1d and ndim == 1): + return False + for d in x: + if not isintlike(d): + return False + if nonneg and d < 0: + return False + return True + + +def issequence(t) -> bool: + return ((isinstance(t, (list, tuple)) and + (len(t) == 0 or np.isscalar(t[0]))) or + (isinstance(t, np.ndarray) and (t.ndim == 1))) + + +def ismatrix(t) -> bool: + return ((isinstance(t, (list, tuple)) and + len(t) > 0 and issequence(t[0])) or + (isinstance(t, np.ndarray) and t.ndim == 2)) + + +def isdense(x) -> bool: + return isinstance(x, np.ndarray) + + +def validateaxis(axis) -> None: + if axis is None: + return + axis_type = type(axis) + + # In NumPy, you can pass in tuples for 'axis', but they are + # not very useful for sparse matrices given their limited + # dimensions, so let's make it explicit that they are not + # allowed to be passed in + if axis_type == tuple: + raise TypeError("Tuples are not accepted for the 'axis' parameter. " + "Please pass in one of the following: " + "{-2, -1, 0, 1, None}.") + + # If not a tuple, check that the provided axis is actually + # an integer and raise a TypeError similar to NumPy's + if not np.issubdtype(np.dtype(axis_type), np.integer): + raise TypeError(f"axis must be an integer, not {axis_type.__name__}") + + if not (-2 <= axis <= 1): + raise ValueError("axis out of range") + + +def check_shape(args, current_shape=None, *, allow_1d=False) -> tuple[int, ...]: + """Imitate numpy.matrix handling of shape arguments + + Parameters + ---------- + args : array_like + Data structures providing information about the shape of the sparse array. + current_shape : tuple, optional + The current shape of the sparse array or matrix. + If None (default), the current shape will be inferred from args. + allow_1d : bool, optional + If True, then 1-D or 2-D arrays are accepted. + If False (default), then only 2-D arrays are accepted and an error is + raised otherwise. + + Returns + ------- + new_shape: tuple + The new shape after validation. + """ + if len(args) == 0: + raise TypeError("function missing 1 required positional argument: " + "'shape'") + if len(args) == 1: + try: + shape_iter = iter(args[0]) + except TypeError: + new_shape = (operator.index(args[0]), ) + else: + new_shape = tuple(operator.index(arg) for arg in shape_iter) + else: + new_shape = tuple(operator.index(arg) for arg in args) + + if current_shape is None: + if allow_1d: + if len(new_shape) not in (1, 2): + raise ValueError('shape must be a 1- or 2-tuple of positive ' + 'integers') + elif len(new_shape) != 2: + raise ValueError('shape must be a 2-tuple of positive integers') + if any(d < 0 for d in new_shape): + raise ValueError("'shape' elements cannot be negative") + else: + # Check the current size only if needed + current_size = prod(current_shape) + + # Check for negatives + negative_indexes = [i for i, x in enumerate(new_shape) if x < 0] + if not negative_indexes: + new_size = prod(new_shape) + if new_size != current_size: + raise ValueError('cannot reshape array of size {} into shape {}' + .format(current_size, new_shape)) + elif len(negative_indexes) == 1: + skip = negative_indexes[0] + specified = prod(new_shape[:skip] + new_shape[skip+1:]) + unspecified, remainder = divmod(current_size, specified) + if remainder != 0: + err_shape = tuple('newshape' if x < 0 else x for x in new_shape) + raise ValueError('cannot reshape array of size {} into shape {}' + ''.format(current_size, err_shape)) + new_shape = new_shape[:skip] + (unspecified,) + new_shape[skip+1:] + else: + raise ValueError('can only specify one unknown dimension') + + if len(new_shape) != 2 and not (allow_1d and len(new_shape) == 1): + raise ValueError('matrix shape must be two-dimensional') + + return new_shape + + +def check_reshape_kwargs(kwargs): + """Unpack keyword arguments for reshape function. + + This is useful because keyword arguments after star arguments are not + allowed in Python 2, but star keyword arguments are. This function unpacks + 'order' and 'copy' from the star keyword arguments (with defaults) and + throws an error for any remaining. + """ + + order = kwargs.pop('order', 'C') + copy = kwargs.pop('copy', False) + if kwargs: # Some unused kwargs remain + raise TypeError('reshape() got unexpected keywords arguments: {}' + .format(', '.join(kwargs.keys()))) + return order, copy + + +def is_pydata_spmatrix(m) -> bool: + """ + Check whether object is pydata/sparse matrix, avoiding importing the module. + """ + base_cls = getattr(sys.modules.get('sparse'), 'SparseArray', None) + return base_cls is not None and isinstance(m, base_cls) + + +def convert_pydata_sparse_to_scipy( + arg: Any, target_format: Optional[Literal["csc", "csr"]] = None +) -> Union[Any, "sp.spmatrix"]: + """ + Convert a pydata/sparse array to scipy sparse matrix, + pass through anything else. + """ + if is_pydata_spmatrix(arg): + arg = arg.to_scipy_sparse() + if target_format is not None: + arg = arg.asformat(target_format) + elif arg.format not in ("csc", "csr"): + arg = arg.tocsc() + return arg + + +############################################################################### +# Wrappers for NumPy types that are deprecated + +# Numpy versions of these functions raise deprecation warnings, the +# ones below do not. + +def matrix(*args, **kwargs): + return np.array(*args, **kwargs).view(np.matrix) + + +def asmatrix(data, dtype=None): + if isinstance(data, np.matrix) and (dtype is None or data.dtype == dtype): + return data + return np.asarray(data, dtype=dtype).view(np.matrix) + +############################################################################### + + +def _todata(s) -> np.ndarray: + """Access nonzero values, possibly after summing duplicates. + + Parameters + ---------- + s : sparse array + Input sparse array. + + Returns + ------- + data: ndarray + Nonzero values of the array, with shape (s.nnz,) + + """ + if isinstance(s, sp._data._data_matrix): + return s._deduped_data() + + if isinstance(s, sp.dok_array): + return np.fromiter(s.values(), dtype=s.dtype, count=s.nnz) + + if isinstance(s, sp.lil_array): + data = np.empty(s.nnz, dtype=s.dtype) + sp._csparsetools.lil_flatten_to_array(s.data, data) + return data + + return s.tocoo()._deduped_data() diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aden b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aden new file mode 100644 index 0000000000000000000000000000000000000000..01c47ccb86ccbde2bf9ad0803298e8df87178a34 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aden differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Anadyr b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Anadyr new file mode 100644 index 0000000000000000000000000000000000000000..551884d322bcd2201b4b9898ec765141277e6eee Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Anadyr differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtau b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtau new file mode 100644 index 0000000000000000000000000000000000000000..3a40d1175a7d81d8a307d0e546a1fe9a40888b29 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtau differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtobe b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtobe new file mode 100644 index 0000000000000000000000000000000000000000..62c5840a83e29b4fcedba95e438581cec96b3cf6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Aqtobe differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ashgabat b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ashgabat new file mode 100644 index 0000000000000000000000000000000000000000..8482167269080ead3a6046ae5e64b56d48dac1dd Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ashgabat differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Atyrau b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Atyrau new file mode 100644 index 0000000000000000000000000000000000000000..cb2c82f657c7380462b3ea38d5e58cc3d692e0b2 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Atyrau differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bahrain b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bahrain new file mode 100644 index 0000000000000000000000000000000000000000..7409d74983c8d0cd8347a663c3bfbc1c041124da Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bahrain differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Baku b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Baku new file mode 100644 index 0000000000000000000000000000000000000000..96203d7a4266cd8646032165950374761090e318 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Baku differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bangkok b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bangkok new file mode 100644 index 0000000000000000000000000000000000000000..ed687d2985c208171adcaa3401496b05325edca4 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Bangkok differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Barnaul b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Barnaul new file mode 100644 index 0000000000000000000000000000000000000000..ff976dd3b27ac5f14dcbac2362f1b4638c5684aa Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Barnaul differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Beirut b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Beirut new file mode 100644 index 0000000000000000000000000000000000000000..55dce5722cc9d913164747da068f37d3529e799f Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Beirut differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Brunei b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Brunei new file mode 100644 index 0000000000000000000000000000000000000000..59bc6e40b7bb0b4eb199dd8c17f416ee00ca4158 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Brunei differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Choibalsan b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Choibalsan new file mode 100644 index 0000000000000000000000000000000000000000..0a948c2eaca30cde2963c330144215ba52d67c5e Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Choibalsan differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chongqing b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chongqing new file mode 100644 index 0000000000000000000000000000000000000000..d6b66984a2f36ae36b35e174756707aa7286c292 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chongqing differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chungking b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chungking new file mode 100644 index 0000000000000000000000000000000000000000..d6b66984a2f36ae36b35e174756707aa7286c292 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Chungking differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Damascus b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Damascus new file mode 100644 index 0000000000000000000000000000000000000000..bd1624de5148d5670e4585dfcb445d8b270c02df Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Damascus differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dhaka b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dhaka new file mode 100644 index 0000000000000000000000000000000000000000..28136808b6d1029676448d8711265d8c55cb4bae Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dhaka differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dubai b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dubai new file mode 100644 index 0000000000000000000000000000000000000000..58d75bc26eec90272e97696f40483eb56c2b8b45 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dubai differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dushanbe b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dushanbe new file mode 100644 index 0000000000000000000000000000000000000000..d83fb076a256817ca0a3ec4e43c7768e6680dc84 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Dushanbe differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Famagusta b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Famagusta new file mode 100644 index 0000000000000000000000000000000000000000..cc44179564afe36db0f1f7aab0a19cbc3e4fa4d0 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Famagusta differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Gaza b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Gaza new file mode 100644 index 0000000000000000000000000000000000000000..0d79662716b445f61e5577bdb09e7c91e4a40d28 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Gaza differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hebron b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hebron new file mode 100644 index 0000000000000000000000000000000000000000..53a3c14312bc770bf9bca1d2e7518763fec7a485 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hebron differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ho_Chi_Minh b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ho_Chi_Minh new file mode 100644 index 0000000000000000000000000000000000000000..86e21b0f524426287fb3b21a82369283c4040c0e Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ho_Chi_Minh differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hong_Kong b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hong_Kong new file mode 100644 index 0000000000000000000000000000000000000000..c80e364801be87687625f72e8e2c3dbd0f7ae4bc Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hong_Kong differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Irkutsk b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Irkutsk new file mode 100644 index 0000000000000000000000000000000000000000..550e2a08773b328683ab10fb9feddee2038e9e58 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Irkutsk differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Istanbul b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Istanbul new file mode 100644 index 0000000000000000000000000000000000000000..c89186687300068ac4e8505cc0012a1dbf6a9960 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Istanbul differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jakarta b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jakarta new file mode 100644 index 0000000000000000000000000000000000000000..c9752d2f23ebbb8b1ca5b8ac604c6f24be5d0def Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jakarta differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jerusalem b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jerusalem new file mode 100644 index 0000000000000000000000000000000000000000..4c49bbf52440631eca750cacb7d79f259eeb8bd2 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Jerusalem differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kabul b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kabul new file mode 100644 index 0000000000000000000000000000000000000000..660ce4cf695702ee8c6eef5c0e2419de37d6df74 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kabul differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kamchatka b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kamchatka new file mode 100644 index 0000000000000000000000000000000000000000..c65155402db6a465c05a8cd71ec7a0fc0f792762 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kamchatka differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kashgar b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kashgar new file mode 100644 index 0000000000000000000000000000000000000000..69ff7f6fb4973efb1185cad9f553f8c770c75934 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kashgar differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kathmandu b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kathmandu new file mode 100644 index 0000000000000000000000000000000000000000..3a0d330ffd2f08396290960527fc8fc186356161 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kathmandu differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Katmandu b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Katmandu new file mode 100644 index 0000000000000000000000000000000000000000..3a0d330ffd2f08396290960527fc8fc186356161 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Katmandu differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Khandyga b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Khandyga new file mode 100644 index 0000000000000000000000000000000000000000..aeb733202acd5d9d2a19a54fc64c226302887423 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Khandyga differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kolkata b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kolkata new file mode 100644 index 0000000000000000000000000000000000000000..00bc80a65e9a7aa470d63fba1ce1b29ef173d922 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kolkata differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Krasnoyarsk b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Krasnoyarsk new file mode 100644 index 0000000000000000000000000000000000000000..e0d4fcb5c3d781943a65dc53cca9fab5d1905f9f Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Krasnoyarsk differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuching b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuching new file mode 100644 index 0000000000000000000000000000000000000000..59bc6e40b7bb0b4eb199dd8c17f416ee00ca4158 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuching differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuwait b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuwait new file mode 100644 index 0000000000000000000000000000000000000000..01c47ccb86ccbde2bf9ad0803298e8df87178a34 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Kuwait differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Magadan b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Magadan new file mode 100644 index 0000000000000000000000000000000000000000..16bac8444656c393288dcc0209a96c7c3f487a19 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Magadan differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Muscat b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Muscat new file mode 100644 index 0000000000000000000000000000000000000000..58d75bc26eec90272e97696f40483eb56c2b8b45 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Muscat differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Novokuznetsk b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Novokuznetsk new file mode 100644 index 0000000000000000000000000000000000000000..9378d50539dfa8f1dabcb40d3720f64906d36202 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Novokuznetsk differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Phnom_Penh b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Phnom_Penh new file mode 100644 index 0000000000000000000000000000000000000000..ed687d2985c208171adcaa3401496b05325edca4 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Phnom_Penh differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pontianak b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pontianak new file mode 100644 index 0000000000000000000000000000000000000000..285bed2c63a5debe034a661431d2a1c03dfb0dad Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pontianak differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pyongyang b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pyongyang new file mode 100644 index 0000000000000000000000000000000000000000..57240cf89fb33139a92451ec2eb99cb67b2f49c1 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Pyongyang differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qatar b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qatar new file mode 100644 index 0000000000000000000000000000000000000000..7409d74983c8d0cd8347a663c3bfbc1c041124da Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qatar differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qostanay b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qostanay new file mode 100644 index 0000000000000000000000000000000000000000..109fe41562e89a026f828125f960498f62fb5d95 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qostanay differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qyzylorda b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qyzylorda new file mode 100644 index 0000000000000000000000000000000000000000..fe4d6c6d6d44f0f6b7dd1f55702c4d640270a1fc Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Qyzylorda differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Rangoon b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Rangoon new file mode 100644 index 0000000000000000000000000000000000000000..14b2ad09ead50a62d5e2b426396c51f9beb293be Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Rangoon differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Riyadh b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Riyadh new file mode 100644 index 0000000000000000000000000000000000000000..01c47ccb86ccbde2bf9ad0803298e8df87178a34 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Riyadh differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Saigon b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Saigon new file mode 100644 index 0000000000000000000000000000000000000000..86e21b0f524426287fb3b21a82369283c4040c0e Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Saigon differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Sakhalin b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Sakhalin new file mode 100644 index 0000000000000000000000000000000000000000..69f0faad1e7247882721bb81a7242ddd4b1d269f Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Sakhalin differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Samarkand b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Samarkand new file mode 100644 index 0000000000000000000000000000000000000000..c43e27c5d4bd341649b3aa32de068d76618c81ed Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Samarkand differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Shanghai b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Shanghai new file mode 100644 index 0000000000000000000000000000000000000000..d6b66984a2f36ae36b35e174756707aa7286c292 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Shanghai differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Singapore b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Singapore new file mode 100644 index 0000000000000000000000000000000000000000..dbbdea3c8149004cfd525a0fc26e5da72b20e8a1 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Singapore differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Srednekolymsk b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Srednekolymsk new file mode 100644 index 0000000000000000000000000000000000000000..7fdee5cbee2b1ba0904a672dde16240404466fb9 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Srednekolymsk differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Taipei b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Taipei new file mode 100644 index 0000000000000000000000000000000000000000..35d89d036d07c3f28dec64092ab1b533c21ae2bc Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Taipei differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tehran b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tehran new file mode 100644 index 0000000000000000000000000000000000000000..824acb0426faaf659a7f209dda6e1ffd0f3ce2ec Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tehran differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimbu b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimbu new file mode 100644 index 0000000000000000000000000000000000000000..0edc72cfe46b1976bff562929501f202a205d0cc Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimbu differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimphu b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimphu new file mode 100644 index 0000000000000000000000000000000000000000..0edc72cfe46b1976bff562929501f202a205d0cc Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Thimphu differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tomsk b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tomsk new file mode 100644 index 0000000000000000000000000000000000000000..c3c307d7b99f39328cf289360526399c55984af6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Tomsk differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ujung_Pandang b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ujung_Pandang new file mode 100644 index 0000000000000000000000000000000000000000..5990010b649745369501c7641c401bcad4345b85 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ujung_Pandang differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulaanbaatar b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulaanbaatar new file mode 100644 index 0000000000000000000000000000000000000000..6f5d3a15abbe48b8a4dc72aadc88c416160a56a6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulaanbaatar differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulan_Bator b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulan_Bator new file mode 100644 index 0000000000000000000000000000000000000000..6f5d3a15abbe48b8a4dc72aadc88c416160a56a6 Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Ulan_Bator differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Vladivostok b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Vladivostok new file mode 100644 index 0000000000000000000000000000000000000000..72a3d4e87a0d6f568eeb84b4a9dfae0b679d23ff Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Vladivostok differ diff --git a/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Yangon b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Yangon new file mode 100644 index 0000000000000000000000000000000000000000..14b2ad09ead50a62d5e2b426396c51f9beb293be Binary files /dev/null and b/llmeval-env/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Yangon differ