applied-ai-018 commited on
Commit
7145948
·
verified ·
1 Parent(s): 1488479

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. llmeval-env/lib/python3.10/site-packages/scipy/fft/_basic.py +1630 -0
  3. llmeval-env/lib/python3.10/site-packages/scipy/fft/_fftlog.py +223 -0
  4. llmeval-env/lib/python3.10/site-packages/scipy/fft/_fftlog_backend.py +197 -0
  5. llmeval-env/lib/python3.10/site-packages/scipy/fft/_helper.py +313 -0
  6. llmeval-env/lib/python3.10/site-packages/scipy/misc/__init__.py +67 -0
  7. llmeval-env/lib/python3.10/site-packages/scipy/misc/__pycache__/_common.cpython-310.pyc +0 -0
  8. llmeval-env/lib/python3.10/site-packages/scipy/misc/__pycache__/doccer.cpython-310.pyc +0 -0
  9. llmeval-env/lib/python3.10/site-packages/scipy/misc/_common.py +344 -0
  10. llmeval-env/lib/python3.10/site-packages/scipy/misc/ascent.dat +0 -0
  11. llmeval-env/lib/python3.10/site-packages/scipy/misc/common.py +20 -0
  12. llmeval-env/lib/python3.10/site-packages/scipy/misc/doccer.py +45 -0
  13. llmeval-env/lib/python3.10/site-packages/scipy/misc/ecg.dat +0 -0
  14. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/__init__.cpython-310.pyc +0 -0
  15. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_common.cpython-310.pyc +0 -0
  16. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_config.cpython-310.pyc +0 -0
  17. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_doccer.cpython-310.pyc +0 -0
  18. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/test_common.py +26 -0
  19. llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/test_config.py +44 -0
  20. llmeval-env/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so +3 -0
  21. llmeval-env/lib/python3.10/site-packages/scipy/sparse/tests/data/csc_py2.npz +3 -0
  22. llmeval-env/lib/python3.10/site-packages/scipy/sparse/tests/data/csc_py3.npz +3 -0
  23. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/__init__.cpython-310.pyc +0 -0
  24. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_geometric_slerp.cpython-310.pyc +0 -0
  25. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_kdtree.cpython-310.pyc +0 -0
  26. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_plotutils.cpython-310.pyc +0 -0
  27. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_procrustes.cpython-310.pyc +0 -0
  28. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_spherical_voronoi.cpython-310.pyc +0 -0
  29. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/ckdtree.cpython-310.pyc +0 -0
  30. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/distance.cpython-310.pyc +0 -0
  31. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/kdtree.cpython-310.pyc +0 -0
  32. llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/qhull.cpython-310.pyc +0 -0
  33. llmeval-env/lib/python3.10/site-packages/scipy/spatial/qhull_src/COPYING.txt +38 -0
  34. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/__init__.cpython-310.pyc +0 -0
  35. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test__plotutils.cpython-310.pyc +0 -0
  36. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test__procrustes.cpython-310.pyc +0 -0
  37. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_distance.cpython-310.pyc +0 -0
  38. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_hausdorff.cpython-310.pyc +0 -0
  39. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_kdtree.cpython-310.pyc +0 -0
  40. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_qhull.cpython-310.pyc +0 -0
  41. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_slerp.cpython-310.pyc +0 -0
  42. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_spherical_voronoi.cpython-310.pyc +0 -0
  43. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X1.txt +10 -0
  44. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X2.txt +20 -0
  45. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-boolean-inp.txt +20 -0
  46. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt +0 -0
  47. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml.txt +1 -0
  48. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml.txt +1 -0
  49. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml-iris.txt +0 -0
  50. llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml.txt +1 -0
.gitattributes CHANGED
@@ -60,3 +60,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
60
  llmeval-env/bin/python3.10 filter=lfs diff=lfs merge=lfs -text
61
  llmeval-env/bin/python3 filter=lfs diff=lfs merge=lfs -text
62
  llmeval-env/bin/python filter=lfs diff=lfs merge=lfs -text
 
 
60
  llmeval-env/bin/python3.10 filter=lfs diff=lfs merge=lfs -text
61
  llmeval-env/bin/python3 filter=lfs diff=lfs merge=lfs -text
62
  llmeval-env/bin/python filter=lfs diff=lfs merge=lfs -text
63
+ llmeval-env/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
llmeval-env/lib/python3.10/site-packages/scipy/fft/_basic.py ADDED
@@ -0,0 +1,1630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from scipy._lib.uarray import generate_multimethod, Dispatchable
2
+ import numpy as np
3
+
4
+
5
+ def _x_replacer(args, kwargs, dispatchables):
6
+ """
7
+ uarray argument replacer to replace the transform input array (``x``)
8
+ """
9
+ if len(args) > 0:
10
+ return (dispatchables[0],) + args[1:], kwargs
11
+ kw = kwargs.copy()
12
+ kw['x'] = dispatchables[0]
13
+ return args, kw
14
+
15
+
16
+ def _dispatch(func):
17
+ """
18
+ Function annotation that creates a uarray multimethod from the function
19
+ """
20
+ return generate_multimethod(func, _x_replacer, domain="numpy.scipy.fft")
21
+
22
+
23
+ @_dispatch
24
+ def fft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
25
+ plan=None):
26
+ """
27
+ Compute the 1-D discrete Fourier Transform.
28
+
29
+ This function computes the 1-D *n*-point discrete Fourier
30
+ Transform (DFT) with the efficient Fast Fourier Transform (FFT)
31
+ algorithm [1]_.
32
+
33
+ Parameters
34
+ ----------
35
+ x : array_like
36
+ Input array, can be complex.
37
+ n : int, optional
38
+ Length of the transformed axis of the output.
39
+ If `n` is smaller than the length of the input, the input is cropped.
40
+ If it is larger, the input is padded with zeros. If `n` is not given,
41
+ the length of the input along the axis specified by `axis` is used.
42
+ axis : int, optional
43
+ Axis over which to compute the FFT. If not given, the last axis is
44
+ used.
45
+ norm : {"backward", "ortho", "forward"}, optional
46
+ Normalization mode. Default is "backward", meaning no normalization on
47
+ the forward transforms and scaling by ``1/n`` on the `ifft`.
48
+ "forward" instead applies the ``1/n`` factor on the forward transform.
49
+ For ``norm="ortho"``, both directions are scaled by ``1/sqrt(n)``.
50
+
51
+ .. versionadded:: 1.6.0
52
+ ``norm={"forward", "backward"}`` options were added
53
+
54
+ overwrite_x : bool, optional
55
+ If True, the contents of `x` can be destroyed; the default is False.
56
+ See the notes below for more details.
57
+ workers : int, optional
58
+ Maximum number of workers to use for parallel computation. If negative,
59
+ the value wraps around from ``os.cpu_count()``. See below for more
60
+ details.
61
+ plan : object, optional
62
+ This argument is reserved for passing in a precomputed plan provided
63
+ by downstream FFT vendors. It is currently not used in SciPy.
64
+
65
+ .. versionadded:: 1.5.0
66
+
67
+ Returns
68
+ -------
69
+ out : complex ndarray
70
+ The truncated or zero-padded input, transformed along the axis
71
+ indicated by `axis`, or the last one if `axis` is not specified.
72
+
73
+ Raises
74
+ ------
75
+ IndexError
76
+ if `axes` is larger than the last axis of `x`.
77
+
78
+ See Also
79
+ --------
80
+ ifft : The inverse of `fft`.
81
+ fft2 : The 2-D FFT.
82
+ fftn : The N-D FFT.
83
+ rfftn : The N-D FFT of real input.
84
+ fftfreq : Frequency bins for given FFT parameters.
85
+ next_fast_len : Size to pad input to for most efficient transforms
86
+
87
+ Notes
88
+ -----
89
+ FFT (Fast Fourier Transform) refers to a way the discrete Fourier Transform
90
+ (DFT) can be calculated efficiently, by using symmetries in the calculated
91
+ terms. The symmetry is highest when `n` is a power of 2, and the transform
92
+ is therefore most efficient for these sizes. For poorly factorizable sizes,
93
+ `scipy.fft` uses Bluestein's algorithm [2]_ and so is never worse than
94
+ O(`n` log `n`). Further performance improvements may be seen by zero-padding
95
+ the input using `next_fast_len`.
96
+
97
+ If ``x`` is a 1d array, then the `fft` is equivalent to ::
98
+
99
+ y[k] = np.sum(x * np.exp(-2j * np.pi * k * np.arange(n)/n))
100
+
101
+ The frequency term ``f=k/n`` is found at ``y[k]``. At ``y[n/2]`` we reach
102
+ the Nyquist frequency and wrap around to the negative-frequency terms. So,
103
+ for an 8-point transform, the frequencies of the result are
104
+ [0, 1, 2, 3, -4, -3, -2, -1]. To rearrange the fft output so that the
105
+ zero-frequency component is centered, like [-4, -3, -2, -1, 0, 1, 2, 3],
106
+ use `fftshift`.
107
+
108
+ Transforms can be done in single, double, or extended precision (long
109
+ double) floating point. Half precision inputs will be converted to single
110
+ precision and non-floating-point inputs will be converted to double
111
+ precision.
112
+
113
+ If the data type of ``x`` is real, a "real FFT" algorithm is automatically
114
+ used, which roughly halves the computation time. To increase efficiency
115
+ a little further, use `rfft`, which does the same calculation, but only
116
+ outputs half of the symmetrical spectrum. If the data are both real and
117
+ symmetrical, the `dct` can again double the efficiency, by generating
118
+ half of the spectrum from half of the signal.
119
+
120
+ When ``overwrite_x=True`` is specified, the memory referenced by ``x`` may
121
+ be used by the implementation in any way. This may include reusing the
122
+ memory for the result, but this is in no way guaranteed. You should not
123
+ rely on the contents of ``x`` after the transform as this may change in
124
+ future without warning.
125
+
126
+ The ``workers`` argument specifies the maximum number of parallel jobs to
127
+ split the FFT computation into. This will execute independent 1-D
128
+ FFTs within ``x``. So, ``x`` must be at least 2-D and the
129
+ non-transformed axes must be large enough to split into chunks. If ``x`` is
130
+ too small, fewer jobs may be used than requested.
131
+
132
+ References
133
+ ----------
134
+ .. [1] Cooley, James W., and John W. Tukey, 1965, "An algorithm for the
135
+ machine calculation of complex Fourier series," *Math. Comput.*
136
+ 19: 297-301.
137
+ .. [2] Bluestein, L., 1970, "A linear filtering approach to the
138
+ computation of discrete Fourier transform". *IEEE Transactions on
139
+ Audio and Electroacoustics.* 18 (4): 451-455.
140
+
141
+ Examples
142
+ --------
143
+ >>> import scipy.fft
144
+ >>> import numpy as np
145
+ >>> scipy.fft.fft(np.exp(2j * np.pi * np.arange(8) / 8))
146
+ array([-2.33486982e-16+1.14423775e-17j, 8.00000000e+00-1.25557246e-15j,
147
+ 2.33486982e-16+2.33486982e-16j, 0.00000000e+00+1.22464680e-16j,
148
+ -1.14423775e-17+2.33486982e-16j, 0.00000000e+00+5.20784380e-16j,
149
+ 1.14423775e-17+1.14423775e-17j, 0.00000000e+00+1.22464680e-16j])
150
+
151
+ In this example, real input has an FFT which is Hermitian, i.e., symmetric
152
+ in the real part and anti-symmetric in the imaginary part:
153
+
154
+ >>> from scipy.fft import fft, fftfreq, fftshift
155
+ >>> import matplotlib.pyplot as plt
156
+ >>> t = np.arange(256)
157
+ >>> sp = fftshift(fft(np.sin(t)))
158
+ >>> freq = fftshift(fftfreq(t.shape[-1]))
159
+ >>> plt.plot(freq, sp.real, freq, sp.imag)
160
+ [<matplotlib.lines.Line2D object at 0x...>,
161
+ <matplotlib.lines.Line2D object at 0x...>]
162
+ >>> plt.show()
163
+
164
+ """
165
+ return (Dispatchable(x, np.ndarray),)
166
+
167
+
168
+ @_dispatch
169
+ def ifft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
170
+ plan=None):
171
+ """
172
+ Compute the 1-D inverse discrete Fourier Transform.
173
+
174
+ This function computes the inverse of the 1-D *n*-point
175
+ discrete Fourier transform computed by `fft`. In other words,
176
+ ``ifft(fft(x)) == x`` to within numerical accuracy.
177
+
178
+ The input should be ordered in the same way as is returned by `fft`,
179
+ i.e.,
180
+
181
+ * ``x[0]`` should contain the zero frequency term,
182
+ * ``x[1:n//2]`` should contain the positive-frequency terms,
183
+ * ``x[n//2 + 1:]`` should contain the negative-frequency terms, in
184
+ increasing order starting from the most negative frequency.
185
+
186
+ For an even number of input points, ``x[n//2]`` represents the sum of
187
+ the values at the positive and negative Nyquist frequencies, as the two
188
+ are aliased together. See `fft` for details.
189
+
190
+ Parameters
191
+ ----------
192
+ x : array_like
193
+ Input array, can be complex.
194
+ n : int, optional
195
+ Length of the transformed axis of the output.
196
+ If `n` is smaller than the length of the input, the input is cropped.
197
+ If it is larger, the input is padded with zeros. If `n` is not given,
198
+ the length of the input along the axis specified by `axis` is used.
199
+ See notes about padding issues.
200
+ axis : int, optional
201
+ Axis over which to compute the inverse DFT. If not given, the last
202
+ axis is used.
203
+ norm : {"backward", "ortho", "forward"}, optional
204
+ Normalization mode (see `fft`). Default is "backward".
205
+ overwrite_x : bool, optional
206
+ If True, the contents of `x` can be destroyed; the default is False.
207
+ See :func:`fft` for more details.
208
+ workers : int, optional
209
+ Maximum number of workers to use for parallel computation. If negative,
210
+ the value wraps around from ``os.cpu_count()``.
211
+ See :func:`~scipy.fft.fft` for more details.
212
+ plan : object, optional
213
+ This argument is reserved for passing in a precomputed plan provided
214
+ by downstream FFT vendors. It is currently not used in SciPy.
215
+
216
+ .. versionadded:: 1.5.0
217
+
218
+ Returns
219
+ -------
220
+ out : complex ndarray
221
+ The truncated or zero-padded input, transformed along the axis
222
+ indicated by `axis`, or the last one if `axis` is not specified.
223
+
224
+ Raises
225
+ ------
226
+ IndexError
227
+ If `axes` is larger than the last axis of `x`.
228
+
229
+ See Also
230
+ --------
231
+ fft : The 1-D (forward) FFT, of which `ifft` is the inverse.
232
+ ifft2 : The 2-D inverse FFT.
233
+ ifftn : The N-D inverse FFT.
234
+
235
+ Notes
236
+ -----
237
+ If the input parameter `n` is larger than the size of the input, the input
238
+ is padded by appending zeros at the end. Even though this is the common
239
+ approach, it might lead to surprising results. If a different padding is
240
+ desired, it must be performed before calling `ifft`.
241
+
242
+ If ``x`` is a 1-D array, then the `ifft` is equivalent to ::
243
+
244
+ y[k] = np.sum(x * np.exp(2j * np.pi * k * np.arange(n)/n)) / len(x)
245
+
246
+ As with `fft`, `ifft` has support for all floating point types and is
247
+ optimized for real input.
248
+
249
+ Examples
250
+ --------
251
+ >>> import scipy.fft
252
+ >>> import numpy as np
253
+ >>> scipy.fft.ifft([0, 4, 0, 0])
254
+ array([ 1.+0.j, 0.+1.j, -1.+0.j, 0.-1.j]) # may vary
255
+
256
+ Create and plot a band-limited signal with random phases:
257
+
258
+ >>> import matplotlib.pyplot as plt
259
+ >>> rng = np.random.default_rng()
260
+ >>> t = np.arange(400)
261
+ >>> n = np.zeros((400,), dtype=complex)
262
+ >>> n[40:60] = np.exp(1j*rng.uniform(0, 2*np.pi, (20,)))
263
+ >>> s = scipy.fft.ifft(n)
264
+ >>> plt.plot(t, s.real, 'b-', t, s.imag, 'r--')
265
+ [<matplotlib.lines.Line2D object at ...>, <matplotlib.lines.Line2D object at ...>]
266
+ >>> plt.legend(('real', 'imaginary'))
267
+ <matplotlib.legend.Legend object at ...>
268
+ >>> plt.show()
269
+
270
+ """
271
+ return (Dispatchable(x, np.ndarray),)
272
+
273
+
274
+ @_dispatch
275
+ def rfft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
276
+ plan=None):
277
+ """
278
+ Compute the 1-D discrete Fourier Transform for real input.
279
+
280
+ This function computes the 1-D *n*-point discrete Fourier
281
+ Transform (DFT) of a real-valued array by means of an efficient algorithm
282
+ called the Fast Fourier Transform (FFT).
283
+
284
+ Parameters
285
+ ----------
286
+ x : array_like
287
+ Input array
288
+ n : int, optional
289
+ Number of points along transformation axis in the input to use.
290
+ If `n` is smaller than the length of the input, the input is cropped.
291
+ If it is larger, the input is padded with zeros. If `n` is not given,
292
+ the length of the input along the axis specified by `axis` is used.
293
+ axis : int, optional
294
+ Axis over which to compute the FFT. If not given, the last axis is
295
+ used.
296
+ norm : {"backward", "ortho", "forward"}, optional
297
+ Normalization mode (see `fft`). Default is "backward".
298
+ overwrite_x : bool, optional
299
+ If True, the contents of `x` can be destroyed; the default is False.
300
+ See :func:`fft` for more details.
301
+ workers : int, optional
302
+ Maximum number of workers to use for parallel computation. If negative,
303
+ the value wraps around from ``os.cpu_count()``.
304
+ See :func:`~scipy.fft.fft` for more details.
305
+ plan : object, optional
306
+ This argument is reserved for passing in a precomputed plan provided
307
+ by downstream FFT vendors. It is currently not used in SciPy.
308
+
309
+ .. versionadded:: 1.5.0
310
+
311
+ Returns
312
+ -------
313
+ out : complex ndarray
314
+ The truncated or zero-padded input, transformed along the axis
315
+ indicated by `axis`, or the last one if `axis` is not specified.
316
+ If `n` is even, the length of the transformed axis is ``(n/2)+1``.
317
+ If `n` is odd, the length is ``(n+1)/2``.
318
+
319
+ Raises
320
+ ------
321
+ IndexError
322
+ If `axis` is larger than the last axis of `a`.
323
+
324
+ See Also
325
+ --------
326
+ irfft : The inverse of `rfft`.
327
+ fft : The 1-D FFT of general (complex) input.
328
+ fftn : The N-D FFT.
329
+ rfft2 : The 2-D FFT of real input.
330
+ rfftn : The N-D FFT of real input.
331
+
332
+ Notes
333
+ -----
334
+ When the DFT is computed for purely real input, the output is
335
+ Hermitian-symmetric, i.e., the negative frequency terms are just the complex
336
+ conjugates of the corresponding positive-frequency terms, and the
337
+ negative-frequency terms are therefore redundant. This function does not
338
+ compute the negative frequency terms, and the length of the transformed
339
+ axis of the output is therefore ``n//2 + 1``.
340
+
341
+ When ``X = rfft(x)`` and fs is the sampling frequency, ``X[0]`` contains
342
+ the zero-frequency term 0*fs, which is real due to Hermitian symmetry.
343
+
344
+ If `n` is even, ``A[-1]`` contains the term representing both positive
345
+ and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
346
+ real. If `n` is odd, there is no term at fs/2; ``A[-1]`` contains
347
+ the largest positive frequency (fs/2*(n-1)/n), and is complex in the
348
+ general case.
349
+
350
+ If the input `a` contains an imaginary part, it is silently discarded.
351
+
352
+ Examples
353
+ --------
354
+ >>> import scipy.fft
355
+ >>> scipy.fft.fft([0, 1, 0, 0])
356
+ array([ 1.+0.j, 0.-1.j, -1.+0.j, 0.+1.j]) # may vary
357
+ >>> scipy.fft.rfft([0, 1, 0, 0])
358
+ array([ 1.+0.j, 0.-1.j, -1.+0.j]) # may vary
359
+
360
+ Notice how the final element of the `fft` output is the complex conjugate
361
+ of the second element, for real input. For `rfft`, this symmetry is
362
+ exploited to compute only the non-negative frequency terms.
363
+
364
+ """
365
+ return (Dispatchable(x, np.ndarray),)
366
+
367
+
368
+ @_dispatch
369
+ def irfft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
370
+ plan=None):
371
+ """
372
+ Computes the inverse of `rfft`.
373
+
374
+ This function computes the inverse of the 1-D *n*-point
375
+ discrete Fourier Transform of real input computed by `rfft`.
376
+ In other words, ``irfft(rfft(x), len(x)) == x`` to within numerical
377
+ accuracy. (See Notes below for why ``len(a)`` is necessary here.)
378
+
379
+ The input is expected to be in the form returned by `rfft`, i.e., the
380
+ real zero-frequency term followed by the complex positive frequency terms
381
+ in order of increasing frequency. Since the discrete Fourier Transform of
382
+ real input is Hermitian-symmetric, the negative frequency terms are taken
383
+ to be the complex conjugates of the corresponding positive frequency terms.
384
+
385
+ Parameters
386
+ ----------
387
+ x : array_like
388
+ The input array.
389
+ n : int, optional
390
+ Length of the transformed axis of the output.
391
+ For `n` output points, ``n//2+1`` input points are necessary. If the
392
+ input is longer than this, it is cropped. If it is shorter than this,
393
+ it is padded with zeros. If `n` is not given, it is taken to be
394
+ ``2*(m-1)``, where ``m`` is the length of the input along the axis
395
+ specified by `axis`.
396
+ axis : int, optional
397
+ Axis over which to compute the inverse FFT. If not given, the last
398
+ axis is used.
399
+ norm : {"backward", "ortho", "forward"}, optional
400
+ Normalization mode (see `fft`). Default is "backward".
401
+ overwrite_x : bool, optional
402
+ If True, the contents of `x` can be destroyed; the default is False.
403
+ See :func:`fft` for more details.
404
+ workers : int, optional
405
+ Maximum number of workers to use for parallel computation. If negative,
406
+ the value wraps around from ``os.cpu_count()``.
407
+ See :func:`~scipy.fft.fft` for more details.
408
+ plan : object, optional
409
+ This argument is reserved for passing in a precomputed plan provided
410
+ by downstream FFT vendors. It is currently not used in SciPy.
411
+
412
+ .. versionadded:: 1.5.0
413
+
414
+ Returns
415
+ -------
416
+ out : ndarray
417
+ The truncated or zero-padded input, transformed along the axis
418
+ indicated by `axis`, or the last one if `axis` is not specified.
419
+ The length of the transformed axis is `n`, or, if `n` is not given,
420
+ ``2*(m-1)`` where ``m`` is the length of the transformed axis of the
421
+ input. To get an odd number of output points, `n` must be specified.
422
+
423
+ Raises
424
+ ------
425
+ IndexError
426
+ If `axis` is larger than the last axis of `x`.
427
+
428
+ See Also
429
+ --------
430
+ rfft : The 1-D FFT of real input, of which `irfft` is inverse.
431
+ fft : The 1-D FFT.
432
+ irfft2 : The inverse of the 2-D FFT of real input.
433
+ irfftn : The inverse of the N-D FFT of real input.
434
+
435
+ Notes
436
+ -----
437
+ Returns the real valued `n`-point inverse discrete Fourier transform
438
+ of `x`, where `x` contains the non-negative frequency terms of a
439
+ Hermitian-symmetric sequence. `n` is the length of the result, not the
440
+ input.
441
+
442
+ If you specify an `n` such that `a` must be zero-padded or truncated, the
443
+ extra/removed values will be added/removed at high frequencies. One can
444
+ thus resample a series to `m` points via Fourier interpolation by:
445
+ ``a_resamp = irfft(rfft(a), m)``.
446
+
447
+ The default value of `n` assumes an even output length. By the Hermitian
448
+ symmetry, the last imaginary component must be 0 and so is ignored. To
449
+ avoid losing information, the correct length of the real input *must* be
450
+ given.
451
+
452
+ Examples
453
+ --------
454
+ >>> import scipy.fft
455
+ >>> scipy.fft.ifft([1, -1j, -1, 1j])
456
+ array([0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j]) # may vary
457
+ >>> scipy.fft.irfft([1, -1j, -1])
458
+ array([0., 1., 0., 0.])
459
+
460
+ Notice how the last term in the input to the ordinary `ifft` is the
461
+ complex conjugate of the second term, and the output has zero imaginary
462
+ part everywhere. When calling `irfft`, the negative frequencies are not
463
+ specified, and the output array is purely real.
464
+
465
+ """
466
+ return (Dispatchable(x, np.ndarray),)
467
+
468
+
469
+ @_dispatch
470
+ def hfft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
471
+ plan=None):
472
+ """
473
+ Compute the FFT of a signal that has Hermitian symmetry, i.e., a real
474
+ spectrum.
475
+
476
+ Parameters
477
+ ----------
478
+ x : array_like
479
+ The input array.
480
+ n : int, optional
481
+ Length of the transformed axis of the output. For `n` output
482
+ points, ``n//2 + 1`` input points are necessary. If the input is
483
+ longer than this, it is cropped. If it is shorter than this, it is
484
+ padded with zeros. If `n` is not given, it is taken to be ``2*(m-1)``,
485
+ where ``m`` is the length of the input along the axis specified by
486
+ `axis`.
487
+ axis : int, optional
488
+ Axis over which to compute the FFT. If not given, the last
489
+ axis is used.
490
+ norm : {"backward", "ortho", "forward"}, optional
491
+ Normalization mode (see `fft`). Default is "backward".
492
+ overwrite_x : bool, optional
493
+ If True, the contents of `x` can be destroyed; the default is False.
494
+ See `fft` for more details.
495
+ workers : int, optional
496
+ Maximum number of workers to use for parallel computation. If negative,
497
+ the value wraps around from ``os.cpu_count()``.
498
+ See :func:`~scipy.fft.fft` for more details.
499
+ plan : object, optional
500
+ This argument is reserved for passing in a precomputed plan provided
501
+ by downstream FFT vendors. It is currently not used in SciPy.
502
+
503
+ .. versionadded:: 1.5.0
504
+
505
+ Returns
506
+ -------
507
+ out : ndarray
508
+ The truncated or zero-padded input, transformed along the axis
509
+ indicated by `axis`, or the last one if `axis` is not specified.
510
+ The length of the transformed axis is `n`, or, if `n` is not given,
511
+ ``2*m - 2``, where ``m`` is the length of the transformed axis of
512
+ the input. To get an odd number of output points, `n` must be
513
+ specified, for instance, as ``2*m - 1`` in the typical case,
514
+
515
+ Raises
516
+ ------
517
+ IndexError
518
+ If `axis` is larger than the last axis of `a`.
519
+
520
+ See Also
521
+ --------
522
+ rfft : Compute the 1-D FFT for real input.
523
+ ihfft : The inverse of `hfft`.
524
+ hfftn : Compute the N-D FFT of a Hermitian signal.
525
+
526
+ Notes
527
+ -----
528
+ `hfft`/`ihfft` are a pair analogous to `rfft`/`irfft`, but for the
529
+ opposite case: here the signal has Hermitian symmetry in the time
530
+ domain and is real in the frequency domain. So, here, it's `hfft`, for
531
+ which you must supply the length of the result if it is to be odd.
532
+ * even: ``ihfft(hfft(a, 2*len(a) - 2) == a``, within roundoff error,
533
+ * odd: ``ihfft(hfft(a, 2*len(a) - 1) == a``, within roundoff error.
534
+
535
+ Examples
536
+ --------
537
+ >>> from scipy.fft import fft, hfft
538
+ >>> import numpy as np
539
+ >>> a = 2 * np.pi * np.arange(10) / 10
540
+ >>> signal = np.cos(a) + 3j * np.sin(3 * a)
541
+ >>> fft(signal).round(10)
542
+ array([ -0.+0.j, 5.+0.j, -0.+0.j, 15.-0.j, 0.+0.j, 0.+0.j,
543
+ -0.+0.j, -15.-0.j, 0.+0.j, 5.+0.j])
544
+ >>> hfft(signal[:6]).round(10) # Input first half of signal
545
+ array([ 0., 5., 0., 15., -0., 0., 0., -15., -0., 5.])
546
+ >>> hfft(signal, 10) # Input entire signal and truncate
547
+ array([ 0., 5., 0., 15., -0., 0., 0., -15., -0., 5.])
548
+ """
549
+ return (Dispatchable(x, np.ndarray),)
550
+
551
+
552
+ @_dispatch
553
+ def ihfft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
554
+ plan=None):
555
+ """
556
+ Compute the inverse FFT of a signal that has Hermitian symmetry.
557
+
558
+ Parameters
559
+ ----------
560
+ x : array_like
561
+ Input array.
562
+ n : int, optional
563
+ Length of the inverse FFT, the number of points along
564
+ transformation axis in the input to use. If `n` is smaller than
565
+ the length of the input, the input is cropped. If it is larger,
566
+ the input is padded with zeros. If `n` is not given, the length of
567
+ the input along the axis specified by `axis` is used.
568
+ axis : int, optional
569
+ Axis over which to compute the inverse FFT. If not given, the last
570
+ axis is used.
571
+ norm : {"backward", "ortho", "forward"}, optional
572
+ Normalization mode (see `fft`). Default is "backward".
573
+ overwrite_x : bool, optional
574
+ If True, the contents of `x` can be destroyed; the default is False.
575
+ See `fft` for more details.
576
+ workers : int, optional
577
+ Maximum number of workers to use for parallel computation. If negative,
578
+ the value wraps around from ``os.cpu_count()``.
579
+ See :func:`~scipy.fft.fft` for more details.
580
+ plan : object, optional
581
+ This argument is reserved for passing in a precomputed plan provided
582
+ by downstream FFT vendors. It is currently not used in SciPy.
583
+
584
+ .. versionadded:: 1.5.0
585
+
586
+ Returns
587
+ -------
588
+ out : complex ndarray
589
+ The truncated or zero-padded input, transformed along the axis
590
+ indicated by `axis`, or the last one if `axis` is not specified.
591
+ The length of the transformed axis is ``n//2 + 1``.
592
+
593
+ See Also
594
+ --------
595
+ hfft, irfft
596
+
597
+ Notes
598
+ -----
599
+ `hfft`/`ihfft` are a pair analogous to `rfft`/`irfft`, but for the
600
+ opposite case: here, the signal has Hermitian symmetry in the time
601
+ domain and is real in the frequency domain. So, here, it's `hfft`, for
602
+ which you must supply the length of the result if it is to be odd:
603
+ * even: ``ihfft(hfft(a, 2*len(a) - 2) == a``, within roundoff error,
604
+ * odd: ``ihfft(hfft(a, 2*len(a) - 1) == a``, within roundoff error.
605
+
606
+ Examples
607
+ --------
608
+ >>> from scipy.fft import ifft, ihfft
609
+ >>> import numpy as np
610
+ >>> spectrum = np.array([ 15, -4, 0, -1, 0, -4])
611
+ >>> ifft(spectrum)
612
+ array([1.+0.j, 2.+0.j, 3.+0.j, 4.+0.j, 3.+0.j, 2.+0.j]) # may vary
613
+ >>> ihfft(spectrum)
614
+ array([ 1.-0.j, 2.-0.j, 3.-0.j, 4.-0.j]) # may vary
615
+ """
616
+ return (Dispatchable(x, np.ndarray),)
617
+
618
+
619
+ @_dispatch
620
+ def fftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
621
+ plan=None):
622
+ """
623
+ Compute the N-D discrete Fourier Transform.
624
+
625
+ This function computes the N-D discrete Fourier Transform over
626
+ any number of axes in an M-D array by means of the Fast Fourier
627
+ Transform (FFT).
628
+
629
+ Parameters
630
+ ----------
631
+ x : array_like
632
+ Input array, can be complex.
633
+ s : sequence of ints, optional
634
+ Shape (length of each transformed axis) of the output
635
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
636
+ This corresponds to ``n`` for ``fft(x, n)``.
637
+ Along any axis, if the given shape is smaller than that of the input,
638
+ the input is cropped. If it is larger, the input is padded with zeros.
639
+ if `s` is not given, the shape of the input along the axes specified
640
+ by `axes` is used.
641
+ axes : sequence of ints, optional
642
+ Axes over which to compute the FFT. If not given, the last ``len(s)``
643
+ axes are used, or all axes if `s` is also not specified.
644
+ norm : {"backward", "ortho", "forward"}, optional
645
+ Normalization mode (see `fft`). Default is "backward".
646
+ overwrite_x : bool, optional
647
+ If True, the contents of `x` can be destroyed; the default is False.
648
+ See :func:`fft` for more details.
649
+ workers : int, optional
650
+ Maximum number of workers to use for parallel computation. If negative,
651
+ the value wraps around from ``os.cpu_count()``.
652
+ See :func:`~scipy.fft.fft` for more details.
653
+ plan : object, optional
654
+ This argument is reserved for passing in a precomputed plan provided
655
+ by downstream FFT vendors. It is currently not used in SciPy.
656
+
657
+ .. versionadded:: 1.5.0
658
+
659
+ Returns
660
+ -------
661
+ out : complex ndarray
662
+ The truncated or zero-padded input, transformed along the axes
663
+ indicated by `axes`, or by a combination of `s` and `x`,
664
+ as explained in the parameters section above.
665
+
666
+ Raises
667
+ ------
668
+ ValueError
669
+ If `s` and `axes` have different length.
670
+ IndexError
671
+ If an element of `axes` is larger than the number of axes of `x`.
672
+
673
+ See Also
674
+ --------
675
+ ifftn : The inverse of `fftn`, the inverse N-D FFT.
676
+ fft : The 1-D FFT, with definitions and conventions used.
677
+ rfftn : The N-D FFT of real input.
678
+ fft2 : The 2-D FFT.
679
+ fftshift : Shifts zero-frequency terms to centre of array.
680
+
681
+ Notes
682
+ -----
683
+ The output, analogously to `fft`, contains the term for zero frequency in
684
+ the low-order corner of all axes, the positive frequency terms in the
685
+ first half of all axes, the term for the Nyquist frequency in the middle
686
+ of all axes and the negative frequency terms in the second half of all
687
+ axes, in order of decreasingly negative frequency.
688
+
689
+ Examples
690
+ --------
691
+ >>> import scipy.fft
692
+ >>> import numpy as np
693
+ >>> x = np.mgrid[:3, :3, :3][0]
694
+ >>> scipy.fft.fftn(x, axes=(1, 2))
695
+ array([[[ 0.+0.j, 0.+0.j, 0.+0.j], # may vary
696
+ [ 0.+0.j, 0.+0.j, 0.+0.j],
697
+ [ 0.+0.j, 0.+0.j, 0.+0.j]],
698
+ [[ 9.+0.j, 0.+0.j, 0.+0.j],
699
+ [ 0.+0.j, 0.+0.j, 0.+0.j],
700
+ [ 0.+0.j, 0.+0.j, 0.+0.j]],
701
+ [[18.+0.j, 0.+0.j, 0.+0.j],
702
+ [ 0.+0.j, 0.+0.j, 0.+0.j],
703
+ [ 0.+0.j, 0.+0.j, 0.+0.j]]])
704
+ >>> scipy.fft.fftn(x, (2, 2), axes=(0, 1))
705
+ array([[[ 2.+0.j, 2.+0.j, 2.+0.j], # may vary
706
+ [ 0.+0.j, 0.+0.j, 0.+0.j]],
707
+ [[-2.+0.j, -2.+0.j, -2.+0.j],
708
+ [ 0.+0.j, 0.+0.j, 0.+0.j]]])
709
+
710
+ >>> import matplotlib.pyplot as plt
711
+ >>> rng = np.random.default_rng()
712
+ >>> [X, Y] = np.meshgrid(2 * np.pi * np.arange(200) / 12,
713
+ ... 2 * np.pi * np.arange(200) / 34)
714
+ >>> S = np.sin(X) + np.cos(Y) + rng.uniform(0, 1, X.shape)
715
+ >>> FS = scipy.fft.fftn(S)
716
+ >>> plt.imshow(np.log(np.abs(scipy.fft.fftshift(FS))**2))
717
+ <matplotlib.image.AxesImage object at 0x...>
718
+ >>> plt.show()
719
+
720
+ """
721
+ return (Dispatchable(x, np.ndarray),)
722
+
723
+
724
+ @_dispatch
725
+ def ifftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
726
+ plan=None):
727
+ """
728
+ Compute the N-D inverse discrete Fourier Transform.
729
+
730
+ This function computes the inverse of the N-D discrete
731
+ Fourier Transform over any number of axes in an M-D array by
732
+ means of the Fast Fourier Transform (FFT). In other words,
733
+ ``ifftn(fftn(x)) == x`` to within numerical accuracy.
734
+
735
+ The input, analogously to `ifft`, should be ordered in the same way as is
736
+ returned by `fftn`, i.e., it should have the term for zero frequency
737
+ in all axes in the low-order corner, the positive frequency terms in the
738
+ first half of all axes, the term for the Nyquist frequency in the middle
739
+ of all axes and the negative frequency terms in the second half of all
740
+ axes, in order of decreasingly negative frequency.
741
+
742
+ Parameters
743
+ ----------
744
+ x : array_like
745
+ Input array, can be complex.
746
+ s : sequence of ints, optional
747
+ Shape (length of each transformed axis) of the output
748
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
749
+ This corresponds to ``n`` for ``ifft(x, n)``.
750
+ Along any axis, if the given shape is smaller than that of the input,
751
+ the input is cropped. If it is larger, the input is padded with zeros.
752
+ if `s` is not given, the shape of the input along the axes specified
753
+ by `axes` is used. See notes for issue on `ifft` zero padding.
754
+ axes : sequence of ints, optional
755
+ Axes over which to compute the IFFT. If not given, the last ``len(s)``
756
+ axes are used, or all axes if `s` is also not specified.
757
+ norm : {"backward", "ortho", "forward"}, optional
758
+ Normalization mode (see `fft`). Default is "backward".
759
+ overwrite_x : bool, optional
760
+ If True, the contents of `x` can be destroyed; the default is False.
761
+ See :func:`fft` for more details.
762
+ workers : int, optional
763
+ Maximum number of workers to use for parallel computation. If negative,
764
+ the value wraps around from ``os.cpu_count()``.
765
+ See :func:`~scipy.fft.fft` for more details.
766
+ plan : object, optional
767
+ This argument is reserved for passing in a precomputed plan provided
768
+ by downstream FFT vendors. It is currently not used in SciPy.
769
+
770
+ .. versionadded:: 1.5.0
771
+
772
+ Returns
773
+ -------
774
+ out : complex ndarray
775
+ The truncated or zero-padded input, transformed along the axes
776
+ indicated by `axes`, or by a combination of `s` or `x`,
777
+ as explained in the parameters section above.
778
+
779
+ Raises
780
+ ------
781
+ ValueError
782
+ If `s` and `axes` have different length.
783
+ IndexError
784
+ If an element of `axes` is larger than the number of axes of `x`.
785
+
786
+ See Also
787
+ --------
788
+ fftn : The forward N-D FFT, of which `ifftn` is the inverse.
789
+ ifft : The 1-D inverse FFT.
790
+ ifft2 : The 2-D inverse FFT.
791
+ ifftshift : Undoes `fftshift`, shifts zero-frequency terms to beginning
792
+ of array.
793
+
794
+ Notes
795
+ -----
796
+ Zero-padding, analogously with `ifft`, is performed by appending zeros to
797
+ the input along the specified dimension. Although this is the common
798
+ approach, it might lead to surprising results. If another form of zero
799
+ padding is desired, it must be performed before `ifftn` is called.
800
+
801
+ Examples
802
+ --------
803
+ >>> import scipy.fft
804
+ >>> import numpy as np
805
+ >>> x = np.eye(4)
806
+ >>> scipy.fft.ifftn(scipy.fft.fftn(x, axes=(0,)), axes=(1,))
807
+ array([[1.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], # may vary
808
+ [0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j],
809
+ [0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j],
810
+ [0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j]])
811
+
812
+
813
+ Create and plot an image with band-limited frequency content:
814
+
815
+ >>> import matplotlib.pyplot as plt
816
+ >>> rng = np.random.default_rng()
817
+ >>> n = np.zeros((200,200), dtype=complex)
818
+ >>> n[60:80, 20:40] = np.exp(1j*rng.uniform(0, 2*np.pi, (20, 20)))
819
+ >>> im = scipy.fft.ifftn(n).real
820
+ >>> plt.imshow(im)
821
+ <matplotlib.image.AxesImage object at 0x...>
822
+ >>> plt.show()
823
+
824
+ """
825
+ return (Dispatchable(x, np.ndarray),)
826
+
827
+
828
+ @_dispatch
829
+ def fft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
830
+ plan=None):
831
+ """
832
+ Compute the 2-D discrete Fourier Transform
833
+
834
+ This function computes the N-D discrete Fourier Transform
835
+ over any axes in an M-D array by means of the
836
+ Fast Fourier Transform (FFT). By default, the transform is computed over
837
+ the last two axes of the input array, i.e., a 2-dimensional FFT.
838
+
839
+ Parameters
840
+ ----------
841
+ x : array_like
842
+ Input array, can be complex
843
+ s : sequence of ints, optional
844
+ Shape (length of each transformed axis) of the output
845
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
846
+ This corresponds to ``n`` for ``fft(x, n)``.
847
+ Along each axis, if the given shape is smaller than that of the input,
848
+ the input is cropped. If it is larger, the input is padded with zeros.
849
+ if `s` is not given, the shape of the input along the axes specified
850
+ by `axes` is used.
851
+ axes : sequence of ints, optional
852
+ Axes over which to compute the FFT. If not given, the last two axes are
853
+ used.
854
+ norm : {"backward", "ortho", "forward"}, optional
855
+ Normalization mode (see `fft`). Default is "backward".
856
+ overwrite_x : bool, optional
857
+ If True, the contents of `x` can be destroyed; the default is False.
858
+ See :func:`fft` for more details.
859
+ workers : int, optional
860
+ Maximum number of workers to use for parallel computation. If negative,
861
+ the value wraps around from ``os.cpu_count()``.
862
+ See :func:`~scipy.fft.fft` for more details.
863
+ plan : object, optional
864
+ This argument is reserved for passing in a precomputed plan provided
865
+ by downstream FFT vendors. It is currently not used in SciPy.
866
+
867
+ .. versionadded:: 1.5.0
868
+
869
+ Returns
870
+ -------
871
+ out : complex ndarray
872
+ The truncated or zero-padded input, transformed along the axes
873
+ indicated by `axes`, or the last two axes if `axes` is not given.
874
+
875
+ Raises
876
+ ------
877
+ ValueError
878
+ If `s` and `axes` have different length, or `axes` not given and
879
+ ``len(s) != 2``.
880
+ IndexError
881
+ If an element of `axes` is larger than the number of axes of `x`.
882
+
883
+ See Also
884
+ --------
885
+ ifft2 : The inverse 2-D FFT.
886
+ fft : The 1-D FFT.
887
+ fftn : The N-D FFT.
888
+ fftshift : Shifts zero-frequency terms to the center of the array.
889
+ For 2-D input, swaps first and third quadrants, and second
890
+ and fourth quadrants.
891
+
892
+ Notes
893
+ -----
894
+ `fft2` is just `fftn` with a different default for `axes`.
895
+
896
+ The output, analogously to `fft`, contains the term for zero frequency in
897
+ the low-order corner of the transformed axes, the positive frequency terms
898
+ in the first half of these axes, the term for the Nyquist frequency in the
899
+ middle of the axes and the negative frequency terms in the second half of
900
+ the axes, in order of decreasingly negative frequency.
901
+
902
+ See `fftn` for details and a plotting example, and `fft` for
903
+ definitions and conventions used.
904
+
905
+
906
+ Examples
907
+ --------
908
+ >>> import scipy.fft
909
+ >>> import numpy as np
910
+ >>> x = np.mgrid[:5, :5][0]
911
+ >>> scipy.fft.fft2(x)
912
+ array([[ 50. +0.j , 0. +0.j , 0. +0.j , # may vary
913
+ 0. +0.j , 0. +0.j ],
914
+ [-12.5+17.20477401j, 0. +0.j , 0. +0.j ,
915
+ 0. +0.j , 0. +0.j ],
916
+ [-12.5 +4.0614962j , 0. +0.j , 0. +0.j ,
917
+ 0. +0.j , 0. +0.j ],
918
+ [-12.5 -4.0614962j , 0. +0.j , 0. +0.j ,
919
+ 0. +0.j , 0. +0.j ],
920
+ [-12.5-17.20477401j, 0. +0.j , 0. +0.j ,
921
+ 0. +0.j , 0. +0.j ]])
922
+
923
+ """
924
+ return (Dispatchable(x, np.ndarray),)
925
+
926
+
927
+ @_dispatch
928
+ def ifft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
929
+ plan=None):
930
+ """
931
+ Compute the 2-D inverse discrete Fourier Transform.
932
+
933
+ This function computes the inverse of the 2-D discrete Fourier
934
+ Transform over any number of axes in an M-D array by means of
935
+ the Fast Fourier Transform (FFT). In other words, ``ifft2(fft2(x)) == x``
936
+ to within numerical accuracy. By default, the inverse transform is
937
+ computed over the last two axes of the input array.
938
+
939
+ The input, analogously to `ifft`, should be ordered in the same way as is
940
+ returned by `fft2`, i.e., it should have the term for zero frequency
941
+ in the low-order corner of the two axes, the positive frequency terms in
942
+ the first half of these axes, the term for the Nyquist frequency in the
943
+ middle of the axes and the negative frequency terms in the second half of
944
+ both axes, in order of decreasingly negative frequency.
945
+
946
+ Parameters
947
+ ----------
948
+ x : array_like
949
+ Input array, can be complex.
950
+ s : sequence of ints, optional
951
+ Shape (length of each axis) of the output (``s[0]`` refers to axis 0,
952
+ ``s[1]`` to axis 1, etc.). This corresponds to `n` for ``ifft(x, n)``.
953
+ Along each axis, if the given shape is smaller than that of the input,
954
+ the input is cropped. If it is larger, the input is padded with zeros.
955
+ if `s` is not given, the shape of the input along the axes specified
956
+ by `axes` is used. See notes for issue on `ifft` zero padding.
957
+ axes : sequence of ints, optional
958
+ Axes over which to compute the FFT. If not given, the last two
959
+ axes are used.
960
+ norm : {"backward", "ortho", "forward"}, optional
961
+ Normalization mode (see `fft`). Default is "backward".
962
+ overwrite_x : bool, optional
963
+ If True, the contents of `x` can be destroyed; the default is False.
964
+ See :func:`fft` for more details.
965
+ workers : int, optional
966
+ Maximum number of workers to use for parallel computation. If negative,
967
+ the value wraps around from ``os.cpu_count()``.
968
+ See :func:`~scipy.fft.fft` for more details.
969
+ plan : object, optional
970
+ This argument is reserved for passing in a precomputed plan provided
971
+ by downstream FFT vendors. It is currently not used in SciPy.
972
+
973
+ .. versionadded:: 1.5.0
974
+
975
+ Returns
976
+ -------
977
+ out : complex ndarray
978
+ The truncated or zero-padded input, transformed along the axes
979
+ indicated by `axes`, or the last two axes if `axes` is not given.
980
+
981
+ Raises
982
+ ------
983
+ ValueError
984
+ If `s` and `axes` have different length, or `axes` not given and
985
+ ``len(s) != 2``.
986
+ IndexError
987
+ If an element of `axes` is larger than the number of axes of `x`.
988
+
989
+ See Also
990
+ --------
991
+ fft2 : The forward 2-D FFT, of which `ifft2` is the inverse.
992
+ ifftn : The inverse of the N-D FFT.
993
+ fft : The 1-D FFT.
994
+ ifft : The 1-D inverse FFT.
995
+
996
+ Notes
997
+ -----
998
+ `ifft2` is just `ifftn` with a different default for `axes`.
999
+
1000
+ See `ifftn` for details and a plotting example, and `fft` for
1001
+ definition and conventions used.
1002
+
1003
+ Zero-padding, analogously with `ifft`, is performed by appending zeros to
1004
+ the input along the specified dimension. Although this is the common
1005
+ approach, it might lead to surprising results. If another form of zero
1006
+ padding is desired, it must be performed before `ifft2` is called.
1007
+
1008
+ Examples
1009
+ --------
1010
+ >>> import scipy.fft
1011
+ >>> import numpy as np
1012
+ >>> x = 4 * np.eye(4)
1013
+ >>> scipy.fft.ifft2(x)
1014
+ array([[1.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], # may vary
1015
+ [0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j],
1016
+ [0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j],
1017
+ [0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j]])
1018
+
1019
+ """
1020
+ return (Dispatchable(x, np.ndarray),)
1021
+
1022
+
1023
+ @_dispatch
1024
+ def rfftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
1025
+ plan=None):
1026
+ """
1027
+ Compute the N-D discrete Fourier Transform for real input.
1028
+
1029
+ This function computes the N-D discrete Fourier Transform over
1030
+ any number of axes in an M-D real array by means of the Fast
1031
+ Fourier Transform (FFT). By default, all axes are transformed, with the
1032
+ real transform performed over the last axis, while the remaining
1033
+ transforms are complex.
1034
+
1035
+ Parameters
1036
+ ----------
1037
+ x : array_like
1038
+ Input array, taken to be real.
1039
+ s : sequence of ints, optional
1040
+ Shape (length along each transformed axis) to use from the input.
1041
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
1042
+ The final element of `s` corresponds to `n` for ``rfft(x, n)``, while
1043
+ for the remaining axes, it corresponds to `n` for ``fft(x, n)``.
1044
+ Along any axis, if the given shape is smaller than that of the input,
1045
+ the input is cropped. If it is larger, the input is padded with zeros.
1046
+ if `s` is not given, the shape of the input along the axes specified
1047
+ by `axes` is used.
1048
+ axes : sequence of ints, optional
1049
+ Axes over which to compute the FFT. If not given, the last ``len(s)``
1050
+ axes are used, or all axes if `s` is also not specified.
1051
+ norm : {"backward", "ortho", "forward"}, optional
1052
+ Normalization mode (see `fft`). Default is "backward".
1053
+ overwrite_x : bool, optional
1054
+ If True, the contents of `x` can be destroyed; the default is False.
1055
+ See :func:`fft` for more details.
1056
+ workers : int, optional
1057
+ Maximum number of workers to use for parallel computation. If negative,
1058
+ the value wraps around from ``os.cpu_count()``.
1059
+ See :func:`~scipy.fft.fft` for more details.
1060
+ plan : object, optional
1061
+ This argument is reserved for passing in a precomputed plan provided
1062
+ by downstream FFT vendors. It is currently not used in SciPy.
1063
+
1064
+ .. versionadded:: 1.5.0
1065
+
1066
+ Returns
1067
+ -------
1068
+ out : complex ndarray
1069
+ The truncated or zero-padded input, transformed along the axes
1070
+ indicated by `axes`, or by a combination of `s` and `x`,
1071
+ as explained in the parameters section above.
1072
+ The length of the last axis transformed will be ``s[-1]//2+1``,
1073
+ while the remaining transformed axes will have lengths according to
1074
+ `s`, or unchanged from the input.
1075
+
1076
+ Raises
1077
+ ------
1078
+ ValueError
1079
+ If `s` and `axes` have different length.
1080
+ IndexError
1081
+ If an element of `axes` is larger than the number of axes of `x`.
1082
+
1083
+ See Also
1084
+ --------
1085
+ irfftn : The inverse of `rfftn`, i.e., the inverse of the N-D FFT
1086
+ of real input.
1087
+ fft : The 1-D FFT, with definitions and conventions used.
1088
+ rfft : The 1-D FFT of real input.
1089
+ fftn : The N-D FFT.
1090
+ rfft2 : The 2-D FFT of real input.
1091
+
1092
+ Notes
1093
+ -----
1094
+ The transform for real input is performed over the last transformation
1095
+ axis, as by `rfft`, then the transform over the remaining axes is
1096
+ performed as by `fftn`. The order of the output is as for `rfft` for the
1097
+ final transformation axis, and as for `fftn` for the remaining
1098
+ transformation axes.
1099
+
1100
+ See `fft` for details, definitions and conventions used.
1101
+
1102
+ Examples
1103
+ --------
1104
+ >>> import scipy.fft
1105
+ >>> import numpy as np
1106
+ >>> x = np.ones((2, 2, 2))
1107
+ >>> scipy.fft.rfftn(x)
1108
+ array([[[8.+0.j, 0.+0.j], # may vary
1109
+ [0.+0.j, 0.+0.j]],
1110
+ [[0.+0.j, 0.+0.j],
1111
+ [0.+0.j, 0.+0.j]]])
1112
+
1113
+ >>> scipy.fft.rfftn(x, axes=(2, 0))
1114
+ array([[[4.+0.j, 0.+0.j], # may vary
1115
+ [4.+0.j, 0.+0.j]],
1116
+ [[0.+0.j, 0.+0.j],
1117
+ [0.+0.j, 0.+0.j]]])
1118
+
1119
+ """
1120
+ return (Dispatchable(x, np.ndarray),)
1121
+
1122
+
1123
+ @_dispatch
1124
+ def rfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
1125
+ plan=None):
1126
+ """
1127
+ Compute the 2-D FFT of a real array.
1128
+
1129
+ Parameters
1130
+ ----------
1131
+ x : array
1132
+ Input array, taken to be real.
1133
+ s : sequence of ints, optional
1134
+ Shape of the FFT.
1135
+ axes : sequence of ints, optional
1136
+ Axes over which to compute the FFT.
1137
+ norm : {"backward", "ortho", "forward"}, optional
1138
+ Normalization mode (see `fft`). Default is "backward".
1139
+ overwrite_x : bool, optional
1140
+ If True, the contents of `x` can be destroyed; the default is False.
1141
+ See :func:`fft` for more details.
1142
+ workers : int, optional
1143
+ Maximum number of workers to use for parallel computation. If negative,
1144
+ the value wraps around from ``os.cpu_count()``.
1145
+ See :func:`~scipy.fft.fft` for more details.
1146
+ plan : object, optional
1147
+ This argument is reserved for passing in a precomputed plan provided
1148
+ by downstream FFT vendors. It is currently not used in SciPy.
1149
+
1150
+ .. versionadded:: 1.5.0
1151
+
1152
+ Returns
1153
+ -------
1154
+ out : ndarray
1155
+ The result of the real 2-D FFT.
1156
+
1157
+ See Also
1158
+ --------
1159
+ irfft2 : The inverse of the 2-D FFT of real input.
1160
+ rfft : The 1-D FFT of real input.
1161
+ rfftn : Compute the N-D discrete Fourier Transform for real
1162
+ input.
1163
+
1164
+ Notes
1165
+ -----
1166
+ This is really just `rfftn` with different default behavior.
1167
+ For more details see `rfftn`.
1168
+
1169
+ """
1170
+ return (Dispatchable(x, np.ndarray),)
1171
+
1172
+
1173
+ @_dispatch
1174
+ def irfftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
1175
+ plan=None):
1176
+ """
1177
+ Computes the inverse of `rfftn`
1178
+
1179
+ This function computes the inverse of the N-D discrete
1180
+ Fourier Transform for real input over any number of axes in an
1181
+ M-D array by means of the Fast Fourier Transform (FFT). In
1182
+ other words, ``irfftn(rfftn(x), x.shape) == x`` to within numerical
1183
+ accuracy. (The ``a.shape`` is necessary like ``len(a)`` is for `irfft`,
1184
+ and for the same reason.)
1185
+
1186
+ The input should be ordered in the same way as is returned by `rfftn`,
1187
+ i.e., as for `irfft` for the final transformation axis, and as for `ifftn`
1188
+ along all the other axes.
1189
+
1190
+ Parameters
1191
+ ----------
1192
+ x : array_like
1193
+ Input array.
1194
+ s : sequence of ints, optional
1195
+ Shape (length of each transformed axis) of the output
1196
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). `s` is also the
1197
+ number of input points used along this axis, except for the last axis,
1198
+ where ``s[-1]//2+1`` points of the input are used.
1199
+ Along any axis, if the shape indicated by `s` is smaller than that of
1200
+ the input, the input is cropped. If it is larger, the input is padded
1201
+ with zeros. If `s` is not given, the shape of the input along the axes
1202
+ specified by axes is used. Except for the last axis which is taken to be
1203
+ ``2*(m-1)``, where ``m`` is the length of the input along that axis.
1204
+ axes : sequence of ints, optional
1205
+ Axes over which to compute the inverse FFT. If not given, the last
1206
+ `len(s)` axes are used, or all axes if `s` is also not specified.
1207
+ norm : {"backward", "ortho", "forward"}, optional
1208
+ Normalization mode (see `fft`). Default is "backward".
1209
+ overwrite_x : bool, optional
1210
+ If True, the contents of `x` can be destroyed; the default is False.
1211
+ See :func:`fft` for more details.
1212
+ workers : int, optional
1213
+ Maximum number of workers to use for parallel computation. If negative,
1214
+ the value wraps around from ``os.cpu_count()``.
1215
+ See :func:`~scipy.fft.fft` for more details.
1216
+ plan : object, optional
1217
+ This argument is reserved for passing in a precomputed plan provided
1218
+ by downstream FFT vendors. It is currently not used in SciPy.
1219
+
1220
+ .. versionadded:: 1.5.0
1221
+
1222
+ Returns
1223
+ -------
1224
+ out : ndarray
1225
+ The truncated or zero-padded input, transformed along the axes
1226
+ indicated by `axes`, or by a combination of `s` or `x`,
1227
+ as explained in the parameters section above.
1228
+ The length of each transformed axis is as given by the corresponding
1229
+ element of `s`, or the length of the input in every axis except for the
1230
+ last one if `s` is not given. In the final transformed axis the length
1231
+ of the output when `s` is not given is ``2*(m-1)``, where ``m`` is the
1232
+ length of the final transformed axis of the input. To get an odd
1233
+ number of output points in the final axis, `s` must be specified.
1234
+
1235
+ Raises
1236
+ ------
1237
+ ValueError
1238
+ If `s` and `axes` have different length.
1239
+ IndexError
1240
+ If an element of `axes` is larger than the number of axes of `x`.
1241
+
1242
+ See Also
1243
+ --------
1244
+ rfftn : The forward N-D FFT of real input,
1245
+ of which `ifftn` is the inverse.
1246
+ fft : The 1-D FFT, with definitions and conventions used.
1247
+ irfft : The inverse of the 1-D FFT of real input.
1248
+ irfft2 : The inverse of the 2-D FFT of real input.
1249
+
1250
+ Notes
1251
+ -----
1252
+ See `fft` for definitions and conventions used.
1253
+
1254
+ See `rfft` for definitions and conventions used for real input.
1255
+
1256
+ The default value of `s` assumes an even output length in the final
1257
+ transformation axis. When performing the final complex to real
1258
+ transformation, the Hermitian symmetry requires that the last imaginary
1259
+ component along that axis must be 0 and so it is ignored. To avoid losing
1260
+ information, the correct length of the real input *must* be given.
1261
+
1262
+ Examples
1263
+ --------
1264
+ >>> import scipy.fft
1265
+ >>> import numpy as np
1266
+ >>> x = np.zeros((3, 2, 2))
1267
+ >>> x[0, 0, 0] = 3 * 2 * 2
1268
+ >>> scipy.fft.irfftn(x)
1269
+ array([[[1., 1.],
1270
+ [1., 1.]],
1271
+ [[1., 1.],
1272
+ [1., 1.]],
1273
+ [[1., 1.],
1274
+ [1., 1.]]])
1275
+
1276
+ """
1277
+ return (Dispatchable(x, np.ndarray),)
1278
+
1279
+
1280
+ @_dispatch
1281
+ def irfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
1282
+ plan=None):
1283
+ """
1284
+ Computes the inverse of `rfft2`
1285
+
1286
+ Parameters
1287
+ ----------
1288
+ x : array_like
1289
+ The input array
1290
+ s : sequence of ints, optional
1291
+ Shape of the real output to the inverse FFT.
1292
+ axes : sequence of ints, optional
1293
+ The axes over which to compute the inverse fft.
1294
+ Default is the last two axes.
1295
+ norm : {"backward", "ortho", "forward"}, optional
1296
+ Normalization mode (see `fft`). Default is "backward".
1297
+ overwrite_x : bool, optional
1298
+ If True, the contents of `x` can be destroyed; the default is False.
1299
+ See :func:`fft` for more details.
1300
+ workers : int, optional
1301
+ Maximum number of workers to use for parallel computation. If negative,
1302
+ the value wraps around from ``os.cpu_count()``.
1303
+ See :func:`~scipy.fft.fft` for more details.
1304
+ plan : object, optional
1305
+ This argument is reserved for passing in a precomputed plan provided
1306
+ by downstream FFT vendors. It is currently not used in SciPy.
1307
+
1308
+ .. versionadded:: 1.5.0
1309
+
1310
+ Returns
1311
+ -------
1312
+ out : ndarray
1313
+ The result of the inverse real 2-D FFT.
1314
+
1315
+ See Also
1316
+ --------
1317
+ rfft2 : The 2-D FFT of real input.
1318
+ irfft : The inverse of the 1-D FFT of real input.
1319
+ irfftn : The inverse of the N-D FFT of real input.
1320
+
1321
+ Notes
1322
+ -----
1323
+ This is really `irfftn` with different defaults.
1324
+ For more details see `irfftn`.
1325
+
1326
+ """
1327
+ return (Dispatchable(x, np.ndarray),)
1328
+
1329
+
1330
+ @_dispatch
1331
+ def hfftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
1332
+ plan=None):
1333
+ """
1334
+ Compute the N-D FFT of Hermitian symmetric complex input, i.e., a
1335
+ signal with a real spectrum.
1336
+
1337
+ This function computes the N-D discrete Fourier Transform for a
1338
+ Hermitian symmetric complex input over any number of axes in an
1339
+ M-D array by means of the Fast Fourier Transform (FFT). In other
1340
+ words, ``ihfftn(hfftn(x, s)) == x`` to within numerical accuracy. (``s``
1341
+ here is ``x.shape`` with ``s[-1] = x.shape[-1] * 2 - 1``, this is necessary
1342
+ for the same reason ``x.shape`` would be necessary for `irfft`.)
1343
+
1344
+ Parameters
1345
+ ----------
1346
+ x : array_like
1347
+ Input array.
1348
+ s : sequence of ints, optional
1349
+ Shape (length of each transformed axis) of the output
1350
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). `s` is also the
1351
+ number of input points used along this axis, except for the last axis,
1352
+ where ``s[-1]//2+1`` points of the input are used.
1353
+ Along any axis, if the shape indicated by `s` is smaller than that of
1354
+ the input, the input is cropped. If it is larger, the input is padded
1355
+ with zeros. If `s` is not given, the shape of the input along the axes
1356
+ specified by axes is used. Except for the last axis which is taken to be
1357
+ ``2*(m-1)`` where ``m`` is the length of the input along that axis.
1358
+ axes : sequence of ints, optional
1359
+ Axes over which to compute the inverse FFT. If not given, the last
1360
+ `len(s)` axes are used, or all axes if `s` is also not specified.
1361
+ norm : {"backward", "ortho", "forward"}, optional
1362
+ Normalization mode (see `fft`). Default is "backward".
1363
+ overwrite_x : bool, optional
1364
+ If True, the contents of `x` can be destroyed; the default is False.
1365
+ See :func:`fft` for more details.
1366
+ workers : int, optional
1367
+ Maximum number of workers to use for parallel computation. If negative,
1368
+ the value wraps around from ``os.cpu_count()``.
1369
+ See :func:`~scipy.fft.fft` for more details.
1370
+ plan : object, optional
1371
+ This argument is reserved for passing in a precomputed plan provided
1372
+ by downstream FFT vendors. It is currently not used in SciPy.
1373
+
1374
+ .. versionadded:: 1.5.0
1375
+
1376
+ Returns
1377
+ -------
1378
+ out : ndarray
1379
+ The truncated or zero-padded input, transformed along the axes
1380
+ indicated by `axes`, or by a combination of `s` or `x`,
1381
+ as explained in the parameters section above.
1382
+ The length of each transformed axis is as given by the corresponding
1383
+ element of `s`, or the length of the input in every axis except for the
1384
+ last one if `s` is not given. In the final transformed axis the length
1385
+ of the output when `s` is not given is ``2*(m-1)`` where ``m`` is the
1386
+ length of the final transformed axis of the input. To get an odd
1387
+ number of output points in the final axis, `s` must be specified.
1388
+
1389
+ Raises
1390
+ ------
1391
+ ValueError
1392
+ If `s` and `axes` have different length.
1393
+ IndexError
1394
+ If an element of `axes` is larger than the number of axes of `x`.
1395
+
1396
+ See Also
1397
+ --------
1398
+ ihfftn : The inverse N-D FFT with real spectrum. Inverse of `hfftn`.
1399
+ fft : The 1-D FFT, with definitions and conventions used.
1400
+ rfft : Forward FFT of real input.
1401
+
1402
+ Notes
1403
+ -----
1404
+ For a 1-D signal ``x`` to have a real spectrum, it must satisfy
1405
+ the Hermitian property::
1406
+
1407
+ x[i] == np.conj(x[-i]) for all i
1408
+
1409
+ This generalizes into higher dimensions by reflecting over each axis in
1410
+ turn::
1411
+
1412
+ x[i, j, k, ...] == np.conj(x[-i, -j, -k, ...]) for all i, j, k, ...
1413
+
1414
+ This should not be confused with a Hermitian matrix, for which the
1415
+ transpose is its own conjugate::
1416
+
1417
+ x[i, j] == np.conj(x[j, i]) for all i, j
1418
+
1419
+
1420
+ The default value of `s` assumes an even output length in the final
1421
+ transformation axis. When performing the final complex to real
1422
+ transformation, the Hermitian symmetry requires that the last imaginary
1423
+ component along that axis must be 0 and so it is ignored. To avoid losing
1424
+ information, the correct length of the real input *must* be given.
1425
+
1426
+ Examples
1427
+ --------
1428
+ >>> import scipy.fft
1429
+ >>> import numpy as np
1430
+ >>> x = np.ones((3, 2, 2))
1431
+ >>> scipy.fft.hfftn(x)
1432
+ array([[[12., 0.],
1433
+ [ 0., 0.]],
1434
+ [[ 0., 0.],
1435
+ [ 0., 0.]],
1436
+ [[ 0., 0.],
1437
+ [ 0., 0.]]])
1438
+
1439
+ """
1440
+ return (Dispatchable(x, np.ndarray),)
1441
+
1442
+
1443
+ @_dispatch
1444
+ def hfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
1445
+ plan=None):
1446
+ """
1447
+ Compute the 2-D FFT of a Hermitian complex array.
1448
+
1449
+ Parameters
1450
+ ----------
1451
+ x : array
1452
+ Input array, taken to be Hermitian complex.
1453
+ s : sequence of ints, optional
1454
+ Shape of the real output.
1455
+ axes : sequence of ints, optional
1456
+ Axes over which to compute the FFT.
1457
+ norm : {"backward", "ortho", "forward"}, optional
1458
+ Normalization mode (see `fft`). Default is "backward".
1459
+ overwrite_x : bool, optional
1460
+ If True, the contents of `x` can be destroyed; the default is False.
1461
+ See `fft` for more details.
1462
+ workers : int, optional
1463
+ Maximum number of workers to use for parallel computation. If negative,
1464
+ the value wraps around from ``os.cpu_count()``.
1465
+ See :func:`~scipy.fft.fft` for more details.
1466
+ plan : object, optional
1467
+ This argument is reserved for passing in a precomputed plan provided
1468
+ by downstream FFT vendors. It is currently not used in SciPy.
1469
+
1470
+ .. versionadded:: 1.5.0
1471
+
1472
+ Returns
1473
+ -------
1474
+ out : ndarray
1475
+ The real result of the 2-D Hermitian complex real FFT.
1476
+
1477
+ See Also
1478
+ --------
1479
+ hfftn : Compute the N-D discrete Fourier Transform for Hermitian
1480
+ complex input.
1481
+
1482
+ Notes
1483
+ -----
1484
+ This is really just `hfftn` with different default behavior.
1485
+ For more details see `hfftn`.
1486
+
1487
+ """
1488
+ return (Dispatchable(x, np.ndarray),)
1489
+
1490
+
1491
+ @_dispatch
1492
+ def ihfftn(x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *,
1493
+ plan=None):
1494
+ """
1495
+ Compute the N-D inverse discrete Fourier Transform for a real
1496
+ spectrum.
1497
+
1498
+ This function computes the N-D inverse discrete Fourier Transform
1499
+ over any number of axes in an M-D real array by means of the Fast
1500
+ Fourier Transform (FFT). By default, all axes are transformed, with the
1501
+ real transform performed over the last axis, while the remaining transforms
1502
+ are complex.
1503
+
1504
+ Parameters
1505
+ ----------
1506
+ x : array_like
1507
+ Input array, taken to be real.
1508
+ s : sequence of ints, optional
1509
+ Shape (length along each transformed axis) to use from the input.
1510
+ (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
1511
+ Along any axis, if the given shape is smaller than that of the input,
1512
+ the input is cropped. If it is larger, the input is padded with zeros.
1513
+ if `s` is not given, the shape of the input along the axes specified
1514
+ by `axes` is used.
1515
+ axes : sequence of ints, optional
1516
+ Axes over which to compute the FFT. If not given, the last ``len(s)``
1517
+ axes are used, or all axes if `s` is also not specified.
1518
+ norm : {"backward", "ortho", "forward"}, optional
1519
+ Normalization mode (see `fft`). Default is "backward".
1520
+ overwrite_x : bool, optional
1521
+ If True, the contents of `x` can be destroyed; the default is False.
1522
+ See :func:`fft` for more details.
1523
+ workers : int, optional
1524
+ Maximum number of workers to use for parallel computation. If negative,
1525
+ the value wraps around from ``os.cpu_count()``.
1526
+ See :func:`~scipy.fft.fft` for more details.
1527
+ plan : object, optional
1528
+ This argument is reserved for passing in a precomputed plan provided
1529
+ by downstream FFT vendors. It is currently not used in SciPy.
1530
+
1531
+ .. versionadded:: 1.5.0
1532
+
1533
+ Returns
1534
+ -------
1535
+ out : complex ndarray
1536
+ The truncated or zero-padded input, transformed along the axes
1537
+ indicated by `axes`, or by a combination of `s` and `x`,
1538
+ as explained in the parameters section above.
1539
+ The length of the last axis transformed will be ``s[-1]//2+1``,
1540
+ while the remaining transformed axes will have lengths according to
1541
+ `s`, or unchanged from the input.
1542
+
1543
+ Raises
1544
+ ------
1545
+ ValueError
1546
+ If `s` and `axes` have different length.
1547
+ IndexError
1548
+ If an element of `axes` is larger than the number of axes of `x`.
1549
+
1550
+ See Also
1551
+ --------
1552
+ hfftn : The forward N-D FFT of Hermitian input.
1553
+ hfft : The 1-D FFT of Hermitian input.
1554
+ fft : The 1-D FFT, with definitions and conventions used.
1555
+ fftn : The N-D FFT.
1556
+ hfft2 : The 2-D FFT of Hermitian input.
1557
+
1558
+ Notes
1559
+ -----
1560
+ The transform for real input is performed over the last transformation
1561
+ axis, as by `ihfft`, then the transform over the remaining axes is
1562
+ performed as by `ifftn`. The order of the output is the positive part of
1563
+ the Hermitian output signal, in the same format as `rfft`.
1564
+
1565
+ Examples
1566
+ --------
1567
+ >>> import scipy.fft
1568
+ >>> import numpy as np
1569
+ >>> x = np.ones((2, 2, 2))
1570
+ >>> scipy.fft.ihfftn(x)
1571
+ array([[[1.+0.j, 0.+0.j], # may vary
1572
+ [0.+0.j, 0.+0.j]],
1573
+ [[0.+0.j, 0.+0.j],
1574
+ [0.+0.j, 0.+0.j]]])
1575
+ >>> scipy.fft.ihfftn(x, axes=(2, 0))
1576
+ array([[[1.+0.j, 0.+0.j], # may vary
1577
+ [1.+0.j, 0.+0.j]],
1578
+ [[0.+0.j, 0.+0.j],
1579
+ [0.+0.j, 0.+0.j]]])
1580
+
1581
+ """
1582
+ return (Dispatchable(x, np.ndarray),)
1583
+
1584
+
1585
+ @_dispatch
1586
+ def ihfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None, *,
1587
+ plan=None):
1588
+ """
1589
+ Compute the 2-D inverse FFT of a real spectrum.
1590
+
1591
+ Parameters
1592
+ ----------
1593
+ x : array_like
1594
+ The input array
1595
+ s : sequence of ints, optional
1596
+ Shape of the real input to the inverse FFT.
1597
+ axes : sequence of ints, optional
1598
+ The axes over which to compute the inverse fft.
1599
+ Default is the last two axes.
1600
+ norm : {"backward", "ortho", "forward"}, optional
1601
+ Normalization mode (see `fft`). Default is "backward".
1602
+ overwrite_x : bool, optional
1603
+ If True, the contents of `x` can be destroyed; the default is False.
1604
+ See :func:`fft` for more details.
1605
+ workers : int, optional
1606
+ Maximum number of workers to use for parallel computation. If negative,
1607
+ the value wraps around from ``os.cpu_count()``.
1608
+ See :func:`~scipy.fft.fft` for more details.
1609
+ plan : object, optional
1610
+ This argument is reserved for passing in a precomputed plan provided
1611
+ by downstream FFT vendors. It is currently not used in SciPy.
1612
+
1613
+ .. versionadded:: 1.5.0
1614
+
1615
+ Returns
1616
+ -------
1617
+ out : ndarray
1618
+ The result of the inverse real 2-D FFT.
1619
+
1620
+ See Also
1621
+ --------
1622
+ ihfftn : Compute the inverse of the N-D FFT of Hermitian input.
1623
+
1624
+ Notes
1625
+ -----
1626
+ This is really `ihfftn` with different defaults.
1627
+ For more details see `ihfftn`.
1628
+
1629
+ """
1630
+ return (Dispatchable(x, np.ndarray),)
llmeval-env/lib/python3.10/site-packages/scipy/fft/_fftlog.py ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Fast Hankel transforms using the FFTLog algorithm.
2
+
3
+ The implementation closely follows the Fortran code of Hamilton (2000).
4
+
5
+ added: 14/11/2020 Nicolas Tessore <[email protected]>
6
+ """
7
+
8
+ from ._basic import _dispatch
9
+ from scipy._lib.uarray import Dispatchable
10
+ from ._fftlog_backend import fhtoffset
11
+ import numpy as np
12
+
13
+ __all__ = ['fht', 'ifht', 'fhtoffset']
14
+
15
+
16
+ @_dispatch
17
+ def fht(a, dln, mu, offset=0.0, bias=0.0):
18
+ r'''Compute the fast Hankel transform.
19
+
20
+ Computes the discrete Hankel transform of a logarithmically spaced periodic
21
+ sequence using the FFTLog algorithm [1]_, [2]_.
22
+
23
+ Parameters
24
+ ----------
25
+ a : array_like (..., n)
26
+ Real periodic input array, uniformly logarithmically spaced. For
27
+ multidimensional input, the transform is performed over the last axis.
28
+ dln : float
29
+ Uniform logarithmic spacing of the input array.
30
+ mu : float
31
+ Order of the Hankel transform, any positive or negative real number.
32
+ offset : float, optional
33
+ Offset of the uniform logarithmic spacing of the output array.
34
+ bias : float, optional
35
+ Exponent of power law bias, any positive or negative real number.
36
+
37
+ Returns
38
+ -------
39
+ A : array_like (..., n)
40
+ The transformed output array, which is real, periodic, uniformly
41
+ logarithmically spaced, and of the same shape as the input array.
42
+
43
+ See Also
44
+ --------
45
+ ifht : The inverse of `fht`.
46
+ fhtoffset : Return an optimal offset for `fht`.
47
+
48
+ Notes
49
+ -----
50
+ This function computes a discrete version of the Hankel transform
51
+
52
+ .. math::
53
+
54
+ A(k) = \int_{0}^{\infty} \! a(r) \, J_\mu(kr) \, k \, dr \;,
55
+
56
+ where :math:`J_\mu` is the Bessel function of order :math:`\mu`. The index
57
+ :math:`\mu` may be any real number, positive or negative. Note that the
58
+ numerical Hankel transform uses an integrand of :math:`k \, dr`, while the
59
+ mathematical Hankel transform is commonly defined using :math:`r \, dr`.
60
+
61
+ The input array `a` is a periodic sequence of length :math:`n`, uniformly
62
+ logarithmically spaced with spacing `dln`,
63
+
64
+ .. math::
65
+
66
+ a_j = a(r_j) \;, \quad
67
+ r_j = r_c \exp[(j-j_c) \, \mathtt{dln}]
68
+
69
+ centred about the point :math:`r_c`. Note that the central index
70
+ :math:`j_c = (n-1)/2` is half-integral if :math:`n` is even, so that
71
+ :math:`r_c` falls between two input elements. Similarly, the output
72
+ array `A` is a periodic sequence of length :math:`n`, also uniformly
73
+ logarithmically spaced with spacing `dln`
74
+
75
+ .. math::
76
+
77
+ A_j = A(k_j) \;, \quad
78
+ k_j = k_c \exp[(j-j_c) \, \mathtt{dln}]
79
+
80
+ centred about the point :math:`k_c`.
81
+
82
+ The centre points :math:`r_c` and :math:`k_c` of the periodic intervals may
83
+ be chosen arbitrarily, but it would be usual to choose the product
84
+ :math:`k_c r_c = k_j r_{n-1-j} = k_{n-1-j} r_j` to be unity. This can be
85
+ changed using the `offset` parameter, which controls the logarithmic offset
86
+ :math:`\log(k_c) = \mathtt{offset} - \log(r_c)` of the output array.
87
+ Choosing an optimal value for `offset` may reduce ringing of the discrete
88
+ Hankel transform.
89
+
90
+ If the `bias` parameter is nonzero, this function computes a discrete
91
+ version of the biased Hankel transform
92
+
93
+ .. math::
94
+
95
+ A(k) = \int_{0}^{\infty} \! a_q(r) \, (kr)^q \, J_\mu(kr) \, k \, dr
96
+
97
+ where :math:`q` is the value of `bias`, and a power law bias
98
+ :math:`a_q(r) = a(r) \, (kr)^{-q}` is applied to the input sequence.
99
+ Biasing the transform can help approximate the continuous transform of
100
+ :math:`a(r)` if there is a value :math:`q` such that :math:`a_q(r)` is
101
+ close to a periodic sequence, in which case the resulting :math:`A(k)` will
102
+ be close to the continuous transform.
103
+
104
+ References
105
+ ----------
106
+ .. [1] Talman J. D., 1978, J. Comp. Phys., 29, 35
107
+ .. [2] Hamilton A. J. S., 2000, MNRAS, 312, 257 (astro-ph/9905191)
108
+
109
+ Examples
110
+ --------
111
+
112
+ This example is the adapted version of ``fftlogtest.f`` which is provided
113
+ in [2]_. It evaluates the integral
114
+
115
+ .. math::
116
+
117
+ \int^\infty_0 r^{\mu+1} \exp(-r^2/2) J_\mu(k, r) k dr
118
+ = k^{\mu+1} \exp(-k^2/2) .
119
+
120
+ >>> import numpy as np
121
+ >>> from scipy import fft
122
+ >>> import matplotlib.pyplot as plt
123
+
124
+ Parameters for the transform.
125
+
126
+ >>> mu = 0.0 # Order mu of Bessel function
127
+ >>> r = np.logspace(-7, 1, 128) # Input evaluation points
128
+ >>> dln = np.log(r[1]/r[0]) # Step size
129
+ >>> offset = fft.fhtoffset(dln, initial=-6*np.log(10), mu=mu)
130
+ >>> k = np.exp(offset)/r[::-1] # Output evaluation points
131
+
132
+ Define the analytical function.
133
+
134
+ >>> def f(x, mu):
135
+ ... """Analytical function: x^(mu+1) exp(-x^2/2)."""
136
+ ... return x**(mu + 1)*np.exp(-x**2/2)
137
+
138
+ Evaluate the function at ``r`` and compute the corresponding values at
139
+ ``k`` using FFTLog.
140
+
141
+ >>> a_r = f(r, mu)
142
+ >>> fht = fft.fht(a_r, dln, mu=mu, offset=offset)
143
+
144
+ For this example we can actually compute the analytical response (which in
145
+ this case is the same as the input function) for comparison and compute the
146
+ relative error.
147
+
148
+ >>> a_k = f(k, mu)
149
+ >>> rel_err = abs((fht-a_k)/a_k)
150
+
151
+ Plot the result.
152
+
153
+ >>> figargs = {'sharex': True, 'sharey': True, 'constrained_layout': True}
154
+ >>> fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 4), **figargs)
155
+ >>> ax1.set_title(r'$r^{\mu+1}\ \exp(-r^2/2)$')
156
+ >>> ax1.loglog(r, a_r, 'k', lw=2)
157
+ >>> ax1.set_xlabel('r')
158
+ >>> ax2.set_title(r'$k^{\mu+1} \exp(-k^2/2)$')
159
+ >>> ax2.loglog(k, a_k, 'k', lw=2, label='Analytical')
160
+ >>> ax2.loglog(k, fht, 'C3--', lw=2, label='FFTLog')
161
+ >>> ax2.set_xlabel('k')
162
+ >>> ax2.legend(loc=3, framealpha=1)
163
+ >>> ax2.set_ylim([1e-10, 1e1])
164
+ >>> ax2b = ax2.twinx()
165
+ >>> ax2b.loglog(k, rel_err, 'C0', label='Rel. Error (-)')
166
+ >>> ax2b.set_ylabel('Rel. Error (-)', color='C0')
167
+ >>> ax2b.tick_params(axis='y', labelcolor='C0')
168
+ >>> ax2b.legend(loc=4, framealpha=1)
169
+ >>> ax2b.set_ylim([1e-9, 1e-3])
170
+ >>> plt.show()
171
+
172
+ '''
173
+ return (Dispatchable(a, np.ndarray),)
174
+
175
+
176
+ @_dispatch
177
+ def ifht(A, dln, mu, offset=0.0, bias=0.0):
178
+ r"""Compute the inverse fast Hankel transform.
179
+
180
+ Computes the discrete inverse Hankel transform of a logarithmically spaced
181
+ periodic sequence. This is the inverse operation to `fht`.
182
+
183
+ Parameters
184
+ ----------
185
+ A : array_like (..., n)
186
+ Real periodic input array, uniformly logarithmically spaced. For
187
+ multidimensional input, the transform is performed over the last axis.
188
+ dln : float
189
+ Uniform logarithmic spacing of the input array.
190
+ mu : float
191
+ Order of the Hankel transform, any positive or negative real number.
192
+ offset : float, optional
193
+ Offset of the uniform logarithmic spacing of the output array.
194
+ bias : float, optional
195
+ Exponent of power law bias, any positive or negative real number.
196
+
197
+ Returns
198
+ -------
199
+ a : array_like (..., n)
200
+ The transformed output array, which is real, periodic, uniformly
201
+ logarithmically spaced, and of the same shape as the input array.
202
+
203
+ See Also
204
+ --------
205
+ fht : Definition of the fast Hankel transform.
206
+ fhtoffset : Return an optimal offset for `ifht`.
207
+
208
+ Notes
209
+ -----
210
+ This function computes a discrete version of the Hankel transform
211
+
212
+ .. math::
213
+
214
+ a(r) = \int_{0}^{\infty} \! A(k) \, J_\mu(kr) \, r \, dk \;,
215
+
216
+ where :math:`J_\mu` is the Bessel function of order :math:`\mu`. The index
217
+ :math:`\mu` may be any real number, positive or negative. Note that the
218
+ numerical inverse Hankel transform uses an integrand of :math:`r \, dk`, while the
219
+ mathematical inverse Hankel transform is commonly defined using :math:`k \, dk`.
220
+
221
+ See `fht` for further details.
222
+ """
223
+ return (Dispatchable(A, np.ndarray),)
llmeval-env/lib/python3.10/site-packages/scipy/fft/_fftlog_backend.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from warnings import warn
3
+ from ._basic import rfft, irfft
4
+ from ..special import loggamma, poch
5
+
6
+ from scipy._lib._array_api import array_namespace, copy
7
+
8
+ __all__ = ['fht', 'ifht', 'fhtoffset']
9
+
10
+ # constants
11
+ LN_2 = np.log(2)
12
+
13
+
14
+ def fht(a, dln, mu, offset=0.0, bias=0.0):
15
+ xp = array_namespace(a)
16
+
17
+ # size of transform
18
+ n = a.shape[-1]
19
+
20
+ # bias input array
21
+ if bias != 0:
22
+ # a_q(r) = a(r) (r/r_c)^{-q}
23
+ j_c = (n-1)/2
24
+ j = xp.arange(n, dtype=xp.float64)
25
+ a = a * xp.exp(-bias*(j - j_c)*dln)
26
+
27
+ # compute FHT coefficients
28
+ u = xp.asarray(fhtcoeff(n, dln, mu, offset=offset, bias=bias))
29
+
30
+ # transform
31
+ A = _fhtq(a, u, xp=xp)
32
+
33
+ # bias output array
34
+ if bias != 0:
35
+ # A(k) = A_q(k) (k/k_c)^{-q} (k_c r_c)^{-q}
36
+ A *= xp.exp(-bias*((j - j_c)*dln + offset))
37
+
38
+ return A
39
+
40
+
41
+ def ifht(A, dln, mu, offset=0.0, bias=0.0):
42
+ xp = array_namespace(A)
43
+
44
+ # size of transform
45
+ n = A.shape[-1]
46
+
47
+ # bias input array
48
+ if bias != 0:
49
+ # A_q(k) = A(k) (k/k_c)^{q} (k_c r_c)^{q}
50
+ j_c = (n-1)/2
51
+ j = xp.arange(n, dtype=xp.float64)
52
+ A = A * xp.exp(bias*((j - j_c)*dln + offset))
53
+
54
+ # compute FHT coefficients
55
+ u = xp.asarray(fhtcoeff(n, dln, mu, offset=offset, bias=bias, inverse=True))
56
+
57
+ # transform
58
+ a = _fhtq(A, u, inverse=True, xp=xp)
59
+
60
+ # bias output array
61
+ if bias != 0:
62
+ # a(r) = a_q(r) (r/r_c)^{q}
63
+ a /= xp.exp(-bias*(j - j_c)*dln)
64
+
65
+ return a
66
+
67
+
68
+ def fhtcoeff(n, dln, mu, offset=0.0, bias=0.0, inverse=False):
69
+ """Compute the coefficient array for a fast Hankel transform."""
70
+ lnkr, q = offset, bias
71
+
72
+ # Hankel transform coefficients
73
+ # u_m = (kr)^{-i 2m pi/(n dlnr)} U_mu(q + i 2m pi/(n dlnr))
74
+ # with U_mu(x) = 2^x Gamma((mu+1+x)/2)/Gamma((mu+1-x)/2)
75
+ xp = (mu+1+q)/2
76
+ xm = (mu+1-q)/2
77
+ y = np.linspace(0, np.pi*(n//2)/(n*dln), n//2+1)
78
+ u = np.empty(n//2+1, dtype=complex)
79
+ v = np.empty(n//2+1, dtype=complex)
80
+ u.imag[:] = y
81
+ u.real[:] = xm
82
+ loggamma(u, out=v)
83
+ u.real[:] = xp
84
+ loggamma(u, out=u)
85
+ y *= 2*(LN_2 - lnkr)
86
+ u.real -= v.real
87
+ u.real += LN_2*q
88
+ u.imag += v.imag
89
+ u.imag += y
90
+ np.exp(u, out=u)
91
+
92
+ # fix last coefficient to be real
93
+ u.imag[-1] = 0
94
+
95
+ # deal with special cases
96
+ if not np.isfinite(u[0]):
97
+ # write u_0 = 2^q Gamma(xp)/Gamma(xm) = 2^q poch(xm, xp-xm)
98
+ # poch() handles special cases for negative integers correctly
99
+ u[0] = 2**q * poch(xm, xp-xm)
100
+ # the coefficient may be inf or 0, meaning the transform or the
101
+ # inverse transform, respectively, is singular
102
+
103
+ # check for singular transform or singular inverse transform
104
+ if np.isinf(u[0]) and not inverse:
105
+ warn('singular transform; consider changing the bias', stacklevel=3)
106
+ # fix coefficient to obtain (potentially correct) transform anyway
107
+ u = copy(u)
108
+ u[0] = 0
109
+ elif u[0] == 0 and inverse:
110
+ warn('singular inverse transform; consider changing the bias', stacklevel=3)
111
+ # fix coefficient to obtain (potentially correct) inverse anyway
112
+ u = copy(u)
113
+ u[0] = np.inf
114
+
115
+ return u
116
+
117
+
118
+ def fhtoffset(dln, mu, initial=0.0, bias=0.0):
119
+ """Return optimal offset for a fast Hankel transform.
120
+
121
+ Returns an offset close to `initial` that fulfils the low-ringing
122
+ condition of [1]_ for the fast Hankel transform `fht` with logarithmic
123
+ spacing `dln`, order `mu` and bias `bias`.
124
+
125
+ Parameters
126
+ ----------
127
+ dln : float
128
+ Uniform logarithmic spacing of the transform.
129
+ mu : float
130
+ Order of the Hankel transform, any positive or negative real number.
131
+ initial : float, optional
132
+ Initial value for the offset. Returns the closest value that fulfils
133
+ the low-ringing condition.
134
+ bias : float, optional
135
+ Exponent of power law bias, any positive or negative real number.
136
+
137
+ Returns
138
+ -------
139
+ offset : float
140
+ Optimal offset of the uniform logarithmic spacing of the transform that
141
+ fulfils a low-ringing condition.
142
+
143
+ Examples
144
+ --------
145
+ >>> from scipy.fft import fhtoffset
146
+ >>> dln = 0.1
147
+ >>> mu = 2.0
148
+ >>> initial = 0.5
149
+ >>> bias = 0.0
150
+ >>> offset = fhtoffset(dln, mu, initial, bias)
151
+ >>> offset
152
+ 0.5454581477676637
153
+
154
+ See Also
155
+ --------
156
+ fht : Definition of the fast Hankel transform.
157
+
158
+ References
159
+ ----------
160
+ .. [1] Hamilton A. J. S., 2000, MNRAS, 312, 257 (astro-ph/9905191)
161
+
162
+ """
163
+
164
+ lnkr, q = initial, bias
165
+
166
+ xp = (mu+1+q)/2
167
+ xm = (mu+1-q)/2
168
+ y = np.pi/(2*dln)
169
+ zp = loggamma(xp + 1j*y)
170
+ zm = loggamma(xm + 1j*y)
171
+ arg = (LN_2 - lnkr)/dln + (zp.imag + zm.imag)/np.pi
172
+ return lnkr + (arg - np.round(arg))*dln
173
+
174
+
175
+ def _fhtq(a, u, inverse=False, *, xp=None):
176
+ """Compute the biased fast Hankel transform.
177
+
178
+ This is the basic FFTLog routine.
179
+ """
180
+ if xp is None:
181
+ xp = np
182
+
183
+ # size of transform
184
+ n = a.shape[-1]
185
+
186
+ # biased fast Hankel transform via real FFT
187
+ A = rfft(a, axis=-1)
188
+ if not inverse:
189
+ # forward transform
190
+ A *= u
191
+ else:
192
+ # backward transform
193
+ A /= xp.conj(u)
194
+ A = irfft(A, n, axis=-1)
195
+ A = xp.flip(A, axis=-1)
196
+
197
+ return A
llmeval-env/lib/python3.10/site-packages/scipy/fft/_helper.py ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from functools import update_wrapper, lru_cache
2
+ import inspect
3
+
4
+ from ._pocketfft import helper as _helper
5
+
6
+ import numpy as np
7
+ from scipy._lib._array_api import array_namespace
8
+
9
+
10
+ def next_fast_len(target, real=False):
11
+ """Find the next fast size of input data to ``fft``, for zero-padding, etc.
12
+
13
+ SciPy's FFT algorithms gain their speed by a recursive divide and conquer
14
+ strategy. This relies on efficient functions for small prime factors of the
15
+ input length. Thus, the transforms are fastest when using composites of the
16
+ prime factors handled by the fft implementation. If there are efficient
17
+ functions for all radices <= `n`, then the result will be a number `x`
18
+ >= ``target`` with only prime factors < `n`. (Also known as `n`-smooth
19
+ numbers)
20
+
21
+ Parameters
22
+ ----------
23
+ target : int
24
+ Length to start searching from. Must be a positive integer.
25
+ real : bool, optional
26
+ True if the FFT involves real input or output (e.g., `rfft` or `hfft`
27
+ but not `fft`). Defaults to False.
28
+
29
+ Returns
30
+ -------
31
+ out : int
32
+ The smallest fast length greater than or equal to ``target``.
33
+
34
+ Notes
35
+ -----
36
+ The result of this function may change in future as performance
37
+ considerations change, for example, if new prime factors are added.
38
+
39
+ Calling `fft` or `ifft` with real input data performs an ``'R2C'``
40
+ transform internally.
41
+
42
+ Examples
43
+ --------
44
+ On a particular machine, an FFT of prime length takes 11.4 ms:
45
+
46
+ >>> from scipy import fft
47
+ >>> import numpy as np
48
+ >>> rng = np.random.default_rng()
49
+ >>> min_len = 93059 # prime length is worst case for speed
50
+ >>> a = rng.standard_normal(min_len)
51
+ >>> b = fft.fft(a)
52
+
53
+ Zero-padding to the next regular length reduces computation time to
54
+ 1.6 ms, a speedup of 7.3 times:
55
+
56
+ >>> fft.next_fast_len(min_len, real=True)
57
+ 93312
58
+ >>> b = fft.fft(a, 93312)
59
+
60
+ Rounding up to the next power of 2 is not optimal, taking 3.0 ms to
61
+ compute; 1.9 times longer than the size given by ``next_fast_len``:
62
+
63
+ >>> b = fft.fft(a, 131072)
64
+
65
+ """
66
+ pass
67
+
68
+
69
+ # Directly wrap the c-function good_size but take the docstring etc., from the
70
+ # next_fast_len function above
71
+ _sig = inspect.signature(next_fast_len)
72
+ next_fast_len = update_wrapper(lru_cache(_helper.good_size), next_fast_len)
73
+ next_fast_len.__wrapped__ = _helper.good_size
74
+ next_fast_len.__signature__ = _sig
75
+
76
+
77
+ def _init_nd_shape_and_axes(x, shape, axes):
78
+ """Handle shape and axes arguments for N-D transforms.
79
+
80
+ Returns the shape and axes in a standard form, taking into account negative
81
+ values and checking for various potential errors.
82
+
83
+ Parameters
84
+ ----------
85
+ x : array_like
86
+ The input array.
87
+ shape : int or array_like of ints or None
88
+ The shape of the result. If both `shape` and `axes` (see below) are
89
+ None, `shape` is ``x.shape``; if `shape` is None but `axes` is
90
+ not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
91
+ If `shape` is -1, the size of the corresponding dimension of `x` is
92
+ used.
93
+ axes : int or array_like of ints or None
94
+ Axes along which the calculation is computed.
95
+ The default is over all axes.
96
+ Negative indices are automatically converted to their positive
97
+ counterparts.
98
+
99
+ Returns
100
+ -------
101
+ shape : tuple
102
+ The shape of the result as a tuple of integers.
103
+ axes : list
104
+ Axes along which the calculation is computed, as a list of integers.
105
+
106
+ """
107
+ x = np.asarray(x)
108
+ return _helper._init_nd_shape_and_axes(x, shape, axes)
109
+
110
+
111
+ def fftfreq(n, d=1.0, *, xp=None, device=None):
112
+ """Return the Discrete Fourier Transform sample frequencies.
113
+
114
+ The returned float array `f` contains the frequency bin centers in cycles
115
+ per unit of the sample spacing (with zero at the start). For instance, if
116
+ the sample spacing is in seconds, then the frequency unit is cycles/second.
117
+
118
+ Given a window length `n` and a sample spacing `d`::
119
+
120
+ f = [0, 1, ..., n/2-1, -n/2, ..., -1] / (d*n) if n is even
121
+ f = [0, 1, ..., (n-1)/2, -(n-1)/2, ..., -1] / (d*n) if n is odd
122
+
123
+ Parameters
124
+ ----------
125
+ n : int
126
+ Window length.
127
+ d : scalar, optional
128
+ Sample spacing (inverse of the sampling rate). Defaults to 1.
129
+ xp : array_namespace, optional
130
+ The namespace for the return array. Default is None, where NumPy is used.
131
+ device : device, optional
132
+ The device for the return array.
133
+ Only valid when `xp.fft.fftfreq` implements the device parameter.
134
+
135
+ Returns
136
+ -------
137
+ f : ndarray
138
+ Array of length `n` containing the sample frequencies.
139
+
140
+ Examples
141
+ --------
142
+ >>> import numpy as np
143
+ >>> import scipy.fft
144
+ >>> signal = np.array([-2, 8, 6, 4, 1, 0, 3, 5], dtype=float)
145
+ >>> fourier = scipy.fft.fft(signal)
146
+ >>> n = signal.size
147
+ >>> timestep = 0.1
148
+ >>> freq = scipy.fft.fftfreq(n, d=timestep)
149
+ >>> freq
150
+ array([ 0. , 1.25, 2.5 , ..., -3.75, -2.5 , -1.25])
151
+
152
+ """
153
+ xp = np if xp is None else xp
154
+ # numpy does not yet support the `device` keyword
155
+ # `xp.__name__ != 'numpy'` should be removed when numpy is compatible
156
+ if hasattr(xp, 'fft') and xp.__name__ != 'numpy':
157
+ return xp.fft.fftfreq(n, d=d, device=device)
158
+ if device is not None:
159
+ raise ValueError('device parameter is not supported for input array type')
160
+ return np.fft.fftfreq(n, d=d)
161
+
162
+
163
+ def rfftfreq(n, d=1.0, *, xp=None, device=None):
164
+ """Return the Discrete Fourier Transform sample frequencies
165
+ (for usage with rfft, irfft).
166
+
167
+ The returned float array `f` contains the frequency bin centers in cycles
168
+ per unit of the sample spacing (with zero at the start). For instance, if
169
+ the sample spacing is in seconds, then the frequency unit is cycles/second.
170
+
171
+ Given a window length `n` and a sample spacing `d`::
172
+
173
+ f = [0, 1, ..., n/2-1, n/2] / (d*n) if n is even
174
+ f = [0, 1, ..., (n-1)/2-1, (n-1)/2] / (d*n) if n is odd
175
+
176
+ Unlike `fftfreq` (but like `scipy.fftpack.rfftfreq`)
177
+ the Nyquist frequency component is considered to be positive.
178
+
179
+ Parameters
180
+ ----------
181
+ n : int
182
+ Window length.
183
+ d : scalar, optional
184
+ Sample spacing (inverse of the sampling rate). Defaults to 1.
185
+ xp : array_namespace, optional
186
+ The namespace for the return array. Default is None, where NumPy is used.
187
+ device : device, optional
188
+ The device for the return array.
189
+ Only valid when `xp.fft.rfftfreq` implements the device parameter.
190
+
191
+ Returns
192
+ -------
193
+ f : ndarray
194
+ Array of length ``n//2 + 1`` containing the sample frequencies.
195
+
196
+ Examples
197
+ --------
198
+ >>> import numpy as np
199
+ >>> import scipy.fft
200
+ >>> signal = np.array([-2, 8, 6, 4, 1, 0, 3, 5, -3, 4], dtype=float)
201
+ >>> fourier = scipy.fft.rfft(signal)
202
+ >>> n = signal.size
203
+ >>> sample_rate = 100
204
+ >>> freq = scipy.fft.fftfreq(n, d=1./sample_rate)
205
+ >>> freq
206
+ array([ 0., 10., 20., ..., -30., -20., -10.])
207
+ >>> freq = scipy.fft.rfftfreq(n, d=1./sample_rate)
208
+ >>> freq
209
+ array([ 0., 10., 20., 30., 40., 50.])
210
+
211
+ """
212
+ xp = np if xp is None else xp
213
+ # numpy does not yet support the `device` keyword
214
+ # `xp.__name__ != 'numpy'` should be removed when numpy is compatible
215
+ if hasattr(xp, 'fft') and xp.__name__ != 'numpy':
216
+ return xp.fft.rfftfreq(n, d=d, device=device)
217
+ if device is not None:
218
+ raise ValueError('device parameter is not supported for input array type')
219
+ return np.fft.rfftfreq(n, d=d)
220
+
221
+
222
+ def fftshift(x, axes=None):
223
+ """Shift the zero-frequency component to the center of the spectrum.
224
+
225
+ This function swaps half-spaces for all axes listed (defaults to all).
226
+ Note that ``y[0]`` is the Nyquist component only if ``len(x)`` is even.
227
+
228
+ Parameters
229
+ ----------
230
+ x : array_like
231
+ Input array.
232
+ axes : int or shape tuple, optional
233
+ Axes over which to shift. Default is None, which shifts all axes.
234
+
235
+ Returns
236
+ -------
237
+ y : ndarray
238
+ The shifted array.
239
+
240
+ See Also
241
+ --------
242
+ ifftshift : The inverse of `fftshift`.
243
+
244
+ Examples
245
+ --------
246
+ >>> import numpy as np
247
+ >>> freqs = np.fft.fftfreq(10, 0.1)
248
+ >>> freqs
249
+ array([ 0., 1., 2., ..., -3., -2., -1.])
250
+ >>> np.fft.fftshift(freqs)
251
+ array([-5., -4., -3., -2., -1., 0., 1., 2., 3., 4.])
252
+
253
+ Shift the zero-frequency component only along the second axis:
254
+
255
+ >>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
256
+ >>> freqs
257
+ array([[ 0., 1., 2.],
258
+ [ 3., 4., -4.],
259
+ [-3., -2., -1.]])
260
+ >>> np.fft.fftshift(freqs, axes=(1,))
261
+ array([[ 2., 0., 1.],
262
+ [-4., 3., 4.],
263
+ [-1., -3., -2.]])
264
+
265
+ """
266
+ xp = array_namespace(x)
267
+ if hasattr(xp, 'fft'):
268
+ return xp.fft.fftshift(x, axes=axes)
269
+ x = np.asarray(x)
270
+ y = np.fft.fftshift(x, axes=axes)
271
+ return xp.asarray(y)
272
+
273
+
274
+ def ifftshift(x, axes=None):
275
+ """The inverse of `fftshift`. Although identical for even-length `x`, the
276
+ functions differ by one sample for odd-length `x`.
277
+
278
+ Parameters
279
+ ----------
280
+ x : array_like
281
+ Input array.
282
+ axes : int or shape tuple, optional
283
+ Axes over which to calculate. Defaults to None, which shifts all axes.
284
+
285
+ Returns
286
+ -------
287
+ y : ndarray
288
+ The shifted array.
289
+
290
+ See Also
291
+ --------
292
+ fftshift : Shift zero-frequency component to the center of the spectrum.
293
+
294
+ Examples
295
+ --------
296
+ >>> import numpy as np
297
+ >>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
298
+ >>> freqs
299
+ array([[ 0., 1., 2.],
300
+ [ 3., 4., -4.],
301
+ [-3., -2., -1.]])
302
+ >>> np.fft.ifftshift(np.fft.fftshift(freqs))
303
+ array([[ 0., 1., 2.],
304
+ [ 3., 4., -4.],
305
+ [-3., -2., -1.]])
306
+
307
+ """
308
+ xp = array_namespace(x)
309
+ if hasattr(xp, 'fft'):
310
+ return xp.fft.ifftshift(x, axes=axes)
311
+ x = np.asarray(x)
312
+ y = np.fft.ifftshift(x, axes=axes)
313
+ return xp.asarray(y)
llmeval-env/lib/python3.10/site-packages/scipy/misc/__init__.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ==========================================
3
+ Miscellaneous routines (:mod:`scipy.misc`)
4
+ ==========================================
5
+
6
+ .. currentmodule:: scipy.misc
7
+
8
+ .. deprecated:: 1.10.0
9
+
10
+ This module is deprecated and will be completely
11
+ removed in SciPy v2.0.0.
12
+
13
+ Various utilities that don't have another home.
14
+
15
+ .. autosummary::
16
+ :toctree: generated/
17
+
18
+ ascent - Get example image for processing
19
+ central_diff_weights - Weights for an n-point central mth derivative
20
+ derivative - Find the nth derivative of a function at a point
21
+ face - Get example image for processing
22
+ electrocardiogram - Load an example of a 1-D signal
23
+
24
+ """
25
+
26
+
27
+ from ._common import *
28
+ from . import _common
29
+ import warnings
30
+
31
+ # Deprecated namespaces, to be removed in v2.0.0
32
+ from . import common, doccer
33
+
34
+ __all__ = _common.__all__
35
+
36
+ dataset_methods = ['ascent', 'face', 'electrocardiogram']
37
+
38
+
39
+ def __dir__():
40
+ return __all__
41
+
42
+
43
+ def __getattr__(name):
44
+ if name not in __all__:
45
+ raise AttributeError(
46
+ "scipy.misc is deprecated and has no attribute "
47
+ f"{name}.")
48
+
49
+ if name in dataset_methods:
50
+ msg = ("The module `scipy.misc` is deprecated and will be "
51
+ "completely removed in SciPy v2.0.0. "
52
+ f"All dataset methods including {name}, must be imported "
53
+ "directly from the new `scipy.datasets` module.")
54
+ else:
55
+ msg = (f"The method `{name}` from the `scipy.misc` namespace is"
56
+ " deprecated, and will be removed in SciPy v1.12.0.")
57
+
58
+ warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
59
+
60
+ return getattr(name)
61
+
62
+
63
+ del _common
64
+
65
+ from scipy._lib._testutils import PytestTester
66
+ test = PytestTester(__name__)
67
+ del PytestTester
llmeval-env/lib/python3.10/site-packages/scipy/misc/__pycache__/_common.cpython-310.pyc ADDED
Binary file (11.3 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/__pycache__/doccer.cpython-310.pyc ADDED
Binary file (1.42 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/_common.py ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Functions which are common and require SciPy Base and Level 1 SciPy
3
+ (special, linalg)
4
+ """
5
+
6
+ from scipy._lib.deprecation import _deprecated
7
+ from scipy._lib._finite_differences import _central_diff_weights, _derivative
8
+ from numpy import array, frombuffer, load
9
+
10
+
11
+ __all__ = ['central_diff_weights', 'derivative', 'ascent', 'face',
12
+ 'electrocardiogram']
13
+
14
+
15
+ @_deprecated(msg="scipy.misc.central_diff_weights is deprecated in "
16
+ "SciPy v1.10.0; and will be completely removed in "
17
+ "SciPy v1.12.0. You may consider using "
18
+ "findiff: https://github.com/maroba/findiff or "
19
+ "numdifftools: https://github.com/pbrod/numdifftools")
20
+ def central_diff_weights(Np, ndiv=1):
21
+ """
22
+ Return weights for an Np-point central derivative.
23
+
24
+ Assumes equally-spaced function points.
25
+
26
+ If weights are in the vector w, then
27
+ derivative is w[0] * f(x-ho*dx) + ... + w[-1] * f(x+h0*dx)
28
+
29
+ .. deprecated:: 1.10.0
30
+ `central_diff_weights` has been deprecated from
31
+ `scipy.misc.central_diff_weights` in SciPy 1.10.0 and
32
+ it will be completely removed in SciPy 1.12.0.
33
+ You may consider using
34
+ findiff: https://github.com/maroba/findiff or
35
+ numdifftools: https://github.com/pbrod/numdifftools
36
+
37
+ Parameters
38
+ ----------
39
+ Np : int
40
+ Number of points for the central derivative.
41
+ ndiv : int, optional
42
+ Number of divisions. Default is 1.
43
+
44
+ Returns
45
+ -------
46
+ w : ndarray
47
+ Weights for an Np-point central derivative. Its size is `Np`.
48
+
49
+ Notes
50
+ -----
51
+ Can be inaccurate for a large number of points.
52
+
53
+ Examples
54
+ --------
55
+ We can calculate a derivative value of a function.
56
+
57
+ >>> from scipy.misc import central_diff_weights
58
+ >>> def f(x):
59
+ ... return 2 * x**2 + 3
60
+ >>> x = 3.0 # derivative point
61
+ >>> h = 0.1 # differential step
62
+ >>> Np = 3 # point number for central derivative
63
+ >>> weights = central_diff_weights(Np) # weights for first derivative
64
+ >>> vals = [f(x + (i - Np/2) * h) for i in range(Np)]
65
+ >>> sum(w * v for (w, v) in zip(weights, vals))/h
66
+ 11.79999999999998
67
+
68
+ This value is close to the analytical solution:
69
+ f'(x) = 4x, so f'(3) = 12
70
+
71
+ References
72
+ ----------
73
+ .. [1] https://en.wikipedia.org/wiki/Finite_difference
74
+
75
+ """
76
+ return _central_diff_weights(Np, ndiv)
77
+
78
+
79
+ @_deprecated(msg="scipy.misc.derivative is deprecated in "
80
+ "SciPy v1.10.0; and will be completely removed in "
81
+ "SciPy v1.12.0. You may consider using "
82
+ "findiff: https://github.com/maroba/findiff or "
83
+ "numdifftools: https://github.com/pbrod/numdifftools")
84
+ def derivative(func, x0, dx=1.0, n=1, args=(), order=3):
85
+ """
86
+ Find the nth derivative of a function at a point.
87
+
88
+ Given a function, use a central difference formula with spacing `dx` to
89
+ compute the nth derivative at `x0`.
90
+
91
+ .. deprecated:: 1.10.0
92
+ `derivative` has been deprecated from `scipy.misc.derivative`
93
+ in SciPy 1.10.0 and it will be completely removed in SciPy 1.12.0.
94
+ You may consider using
95
+ findiff: https://github.com/maroba/findiff or
96
+ numdifftools: https://github.com/pbrod/numdifftools
97
+
98
+ Parameters
99
+ ----------
100
+ func : function
101
+ Input function.
102
+ x0 : float
103
+ The point at which the nth derivative is found.
104
+ dx : float, optional
105
+ Spacing.
106
+ n : int, optional
107
+ Order of the derivative. Default is 1.
108
+ args : tuple, optional
109
+ Arguments
110
+ order : int, optional
111
+ Number of points to use, must be odd.
112
+
113
+ Notes
114
+ -----
115
+ Decreasing the step size too small can result in round-off error.
116
+
117
+ Examples
118
+ --------
119
+ >>> from scipy.misc import derivative
120
+ >>> def f(x):
121
+ ... return x**3 + x**2
122
+ >>> derivative(f, 1.0, dx=1e-6)
123
+ 4.9999999999217337
124
+
125
+ """
126
+ return _derivative(func, x0, dx, n, args, order)
127
+
128
+
129
+ @_deprecated(msg="scipy.misc.ascent has been deprecated in SciPy v1.10.0;"
130
+ " and will be completely removed in SciPy v1.12.0. "
131
+ "Dataset methods have moved into the scipy.datasets "
132
+ "module. Use scipy.datasets.ascent instead.")
133
+ def ascent():
134
+ """
135
+ Get an 8-bit grayscale bit-depth, 512 x 512 derived image for easy use in demos
136
+
137
+ The image is derived from accent-to-the-top.jpg at
138
+ http://www.public-domain-image.com/people-public-domain-images-pictures/
139
+
140
+ .. deprecated:: 1.10.0
141
+ `ascent` has been deprecated from `scipy.misc.ascent`
142
+ in SciPy 1.10.0 and it will be completely removed in SciPy 1.12.0.
143
+ Dataset methods have moved into the `scipy.datasets` module.
144
+ Use `scipy.datasets.ascent` instead.
145
+
146
+ Parameters
147
+ ----------
148
+ None
149
+
150
+ Returns
151
+ -------
152
+ ascent : ndarray
153
+ convenient image to use for testing and demonstration
154
+
155
+ Examples
156
+ --------
157
+ >>> import scipy.misc
158
+ >>> ascent = scipy.misc.ascent()
159
+ >>> ascent.shape
160
+ (512, 512)
161
+ >>> ascent.max()
162
+ 255
163
+
164
+ >>> import matplotlib.pyplot as plt
165
+ >>> plt.gray()
166
+ >>> plt.imshow(ascent)
167
+ >>> plt.show()
168
+
169
+ """
170
+ import pickle
171
+ import os
172
+ fname = os.path.join(os.path.dirname(__file__),'ascent.dat')
173
+ with open(fname, 'rb') as f:
174
+ ascent = array(pickle.load(f))
175
+ return ascent
176
+
177
+
178
+ @_deprecated(msg="scipy.misc.face has been deprecated in SciPy v1.10.0; "
179
+ "and will be completely removed in SciPy v1.12.0. "
180
+ "Dataset methods have moved into the scipy.datasets "
181
+ "module. Use scipy.datasets.face instead.")
182
+ def face(gray=False):
183
+ """
184
+ Get a 1024 x 768, color image of a raccoon face.
185
+
186
+ raccoon-procyon-lotor.jpg at http://www.public-domain-image.com
187
+
188
+ .. deprecated:: 1.10.0
189
+ `face` has been deprecated from `scipy.misc.face`
190
+ in SciPy 1.10.0 and it will be completely removed in SciPy 1.12.0.
191
+ Dataset methods have moved into the `scipy.datasets` module.
192
+ Use `scipy.datasets.face` instead.
193
+
194
+ Parameters
195
+ ----------
196
+ gray : bool, optional
197
+ If True return 8-bit grey-scale image, otherwise return a color image
198
+
199
+ Returns
200
+ -------
201
+ face : ndarray
202
+ image of a raccoon face
203
+
204
+ Examples
205
+ --------
206
+ >>> import scipy.misc
207
+ >>> face = scipy.misc.face()
208
+ >>> face.shape
209
+ (768, 1024, 3)
210
+ >>> face.max()
211
+ 255
212
+ >>> face.dtype
213
+ dtype('uint8')
214
+
215
+ >>> import matplotlib.pyplot as plt
216
+ >>> plt.gray()
217
+ >>> plt.imshow(face)
218
+ >>> plt.show()
219
+
220
+ """
221
+ import bz2
222
+ import os
223
+ with open(os.path.join(os.path.dirname(__file__), 'face.dat'), 'rb') as f:
224
+ rawdata = f.read()
225
+ data = bz2.decompress(rawdata)
226
+ face = frombuffer(data, dtype='uint8')
227
+ face.shape = (768, 1024, 3)
228
+ if gray is True:
229
+ face = (0.21 * face[:,:,0]
230
+ + 0.71 * face[:,:,1]
231
+ + 0.07 * face[:,:,2]).astype('uint8')
232
+ return face
233
+
234
+
235
+ @_deprecated(msg="scipy.misc.electrocardiogram has been "
236
+ "deprecated in SciPy v1.10.0; and will "
237
+ "be completely removed in SciPy v1.12.0. "
238
+ "Dataset methods have moved into the scipy.datasets "
239
+ "module. Use scipy.datasets.electrocardiogram instead.")
240
+ def electrocardiogram():
241
+ """
242
+ Load an electrocardiogram as an example for a 1-D signal.
243
+
244
+ The returned signal is a 5 minute long electrocardiogram (ECG), a medical
245
+ recording of the heart's electrical activity, sampled at 360 Hz.
246
+
247
+ .. deprecated:: 1.10.0
248
+ `electrocardiogram` has been deprecated from
249
+ `scipy.misc.electrocardiogram` in SciPy 1.10.0 and it will be
250
+ completely removed in SciPy 1.12.0.
251
+ Dataset methods have moved into the `scipy.datasets` module.
252
+ Use `scipy.datasets.electrocardiogram` instead.
253
+
254
+ Returns
255
+ -------
256
+ ecg : ndarray
257
+ The electrocardiogram in millivolt (mV) sampled at 360 Hz.
258
+
259
+ Notes
260
+ -----
261
+ The provided signal is an excerpt (19:35 to 24:35) from the `record 208`_
262
+ (lead MLII) provided by the MIT-BIH Arrhythmia Database [1]_ on
263
+ PhysioNet [2]_. The excerpt includes noise induced artifacts, typical
264
+ heartbeats as well as pathological changes.
265
+
266
+ .. _record 208: https://physionet.org/physiobank/database/html/mitdbdir/records.htm#208
267
+
268
+ .. versionadded:: 1.1.0
269
+
270
+ References
271
+ ----------
272
+ .. [1] Moody GB, Mark RG. The impact of the MIT-BIH Arrhythmia Database.
273
+ IEEE Eng in Med and Biol 20(3):45-50 (May-June 2001).
274
+ (PMID: 11446209); :doi:`10.13026/C2F305`
275
+ .. [2] Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh,
276
+ Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank,
277
+ PhysioToolkit, and PhysioNet: Components of a New Research Resource
278
+ for Complex Physiologic Signals. Circulation 101(23):e215-e220;
279
+ :doi:`10.1161/01.CIR.101.23.e215`
280
+
281
+ Examples
282
+ --------
283
+ >>> from scipy.misc import electrocardiogram
284
+ >>> ecg = electrocardiogram()
285
+ >>> ecg
286
+ array([-0.245, -0.215, -0.185, ..., -0.405, -0.395, -0.385])
287
+ >>> ecg.shape, ecg.mean(), ecg.std()
288
+ ((108000,), -0.16510875, 0.5992473991177294)
289
+
290
+ As stated the signal features several areas with a different morphology.
291
+ E.g., the first few seconds show the electrical activity of a heart in
292
+ normal sinus rhythm as seen below.
293
+
294
+ >>> import numpy as np
295
+ >>> import matplotlib.pyplot as plt
296
+ >>> fs = 360
297
+ >>> time = np.arange(ecg.size) / fs
298
+ >>> plt.plot(time, ecg)
299
+ >>> plt.xlabel("time in s")
300
+ >>> plt.ylabel("ECG in mV")
301
+ >>> plt.xlim(9, 10.2)
302
+ >>> plt.ylim(-1, 1.5)
303
+ >>> plt.show()
304
+
305
+ After second 16, however, the first premature ventricular contractions, also
306
+ called extrasystoles, appear. These have a different morphology compared to
307
+ typical heartbeats. The difference can easily be observed in the following
308
+ plot.
309
+
310
+ >>> plt.plot(time, ecg)
311
+ >>> plt.xlabel("time in s")
312
+ >>> plt.ylabel("ECG in mV")
313
+ >>> plt.xlim(46.5, 50)
314
+ >>> plt.ylim(-2, 1.5)
315
+ >>> plt.show()
316
+
317
+ At several points large artifacts disturb the recording, e.g.:
318
+
319
+ >>> plt.plot(time, ecg)
320
+ >>> plt.xlabel("time in s")
321
+ >>> plt.ylabel("ECG in mV")
322
+ >>> plt.xlim(207, 215)
323
+ >>> plt.ylim(-2, 3.5)
324
+ >>> plt.show()
325
+
326
+ Finally, examining the power spectrum reveals that most of the biosignal is
327
+ made up of lower frequencies. At 60 Hz the noise induced by the mains
328
+ electricity can be clearly observed.
329
+
330
+ >>> from scipy.signal import welch
331
+ >>> f, Pxx = welch(ecg, fs=fs, nperseg=2048, scaling="spectrum")
332
+ >>> plt.semilogy(f, Pxx)
333
+ >>> plt.xlabel("Frequency in Hz")
334
+ >>> plt.ylabel("Power spectrum of the ECG in mV**2")
335
+ >>> plt.xlim(f[[0, -1]])
336
+ >>> plt.show()
337
+ """
338
+ import os
339
+ file_path = os.path.join(os.path.dirname(__file__), "ecg.dat")
340
+ with load(file_path) as file:
341
+ ecg = file["ecg"].astype(int) # np.uint16 -> int
342
+ # Convert raw output of ADC to mV: (ecg - adc_zero) / adc_gain
343
+ ecg = (ecg - 1024) / 200.0
344
+ return ecg
llmeval-env/lib/python3.10/site-packages/scipy/misc/ascent.dat ADDED
The diff for this file is too large to render. See raw diff
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/common.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is not meant for public use and will be removed in SciPy v2.0.0.
2
+ # Use the `scipy.datasets` namespace for importing the dataset functions
3
+ # included below.
4
+
5
+ from scipy._lib.deprecation import _sub_module_deprecation
6
+
7
+ __all__ = [ # noqa: F822
8
+ 'central_diff_weights', 'derivative', 'ascent', 'face',
9
+ 'electrocardiogram', 'array', 'load'
10
+ ]
11
+
12
+
13
+ def __dir__():
14
+ return __all__
15
+
16
+
17
+ def __getattr__(name):
18
+ return _sub_module_deprecation(sub_package="misc", module="common",
19
+ private_modules=["_common"], all=__all__,
20
+ attribute=name)
llmeval-env/lib/python3.10/site-packages/scipy/misc/doccer.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is not meant for public use and will be removed in SciPy v2.0.0.
2
+
3
+ from importlib import import_module
4
+ import warnings
5
+
6
+ __all__ = [ # noqa: F822
7
+ 'docformat', 'inherit_docstring_from', 'indentcount_lines',
8
+ 'filldoc', 'unindent_dict', 'unindent_string', 'extend_notes_in_docstring',
9
+ 'replace_notes_in_docstring'
10
+ ]
11
+
12
+
13
+ def __dir__():
14
+ return __all__
15
+
16
+
17
+ def __getattr__(name):
18
+ if name not in __all__:
19
+ raise AttributeError(
20
+ f"`scipy.misc.doccer` has no attribute `{name}`; furthermore, "
21
+ f"`scipy.misc.doccer` is deprecated and will be removed in SciPy 2.0.0."
22
+ )
23
+
24
+ attr = getattr(import_module("scipy._lib.doccer"), name, None)
25
+
26
+ if attr is not None:
27
+ message = (
28
+ f"Please import `{name}` from the `scipy._lib.doccer` namespace; "
29
+ f"the `scipy.misc.doccer` namespace is deprecated and "
30
+ f"will be removed in SciPy 2.0.0."
31
+ )
32
+ else:
33
+ message = (
34
+ f"`scipy.misc.doccer.{name}` is deprecated along with "
35
+ f"the `scipy.misc.doccer` namespace. "
36
+ f"`scipy.misc.doccer.{name}` will be removed in SciPy 1.13.0, and "
37
+ f"the `scipy.misc.doccer` namespace will be removed in SciPy 2.0.0."
38
+ )
39
+
40
+ warnings.warn(message, category=DeprecationWarning, stacklevel=2)
41
+
42
+ try:
43
+ return getattr(import_module("scipy._lib.doccer"), name)
44
+ except AttributeError as e:
45
+ raise e
llmeval-env/lib/python3.10/site-packages/scipy/misc/ecg.dat ADDED
Binary file (119 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (189 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_common.cpython-310.pyc ADDED
Binary file (1.12 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_config.cpython-310.pyc ADDED
Binary file (2.09 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/__pycache__/test_doccer.cpython-310.pyc ADDED
Binary file (4.1 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/test_common.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from numpy.testing import assert_equal, assert_almost_equal, suppress_warnings
2
+
3
+ from scipy.misc import face, ascent, electrocardiogram
4
+
5
+
6
+ def test_face():
7
+ with suppress_warnings() as sup:
8
+ sup.filter(category=DeprecationWarning)
9
+ assert_equal(face().shape, (768, 1024, 3))
10
+
11
+
12
+ def test_ascent():
13
+ with suppress_warnings() as sup:
14
+ sup.filter(category=DeprecationWarning)
15
+ assert_equal(ascent().shape, (512, 512))
16
+
17
+
18
+ def test_electrocardiogram():
19
+ with suppress_warnings() as sup:
20
+ sup.filter(category=DeprecationWarning)
21
+ # Test shape, dtype and stats of signal
22
+ ecg = electrocardiogram()
23
+ assert ecg.dtype == float
24
+ assert_equal(ecg.shape, (108000,))
25
+ assert_almost_equal(ecg.mean(), -0.16510875)
26
+ assert_almost_equal(ecg.std(), 0.5992473991177294)
llmeval-env/lib/python3.10/site-packages/scipy/misc/tests/test_config.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Check the SciPy config is valid.
3
+ """
4
+ import scipy
5
+ import pytest
6
+ from unittest.mock import patch
7
+
8
+ pytestmark = pytest.mark.skipif(
9
+ not hasattr(scipy.__config__, "_built_with_meson"),
10
+ reason="Requires Meson builds",
11
+ )
12
+
13
+
14
+ class TestSciPyConfigs:
15
+ REQUIRED_CONFIG_KEYS = [
16
+ "Compilers",
17
+ "Machine Information",
18
+ "Python Information",
19
+ ]
20
+
21
+ @patch("scipy.__config__._check_pyyaml")
22
+ def test_pyyaml_not_found(self, mock_yaml_importer):
23
+ mock_yaml_importer.side_effect = ModuleNotFoundError()
24
+ with pytest.warns(UserWarning):
25
+ scipy.show_config()
26
+
27
+ def test_dict_mode(self):
28
+ config = scipy.show_config(mode="dicts")
29
+
30
+ assert isinstance(config, dict)
31
+ assert all([key in config for key in self.REQUIRED_CONFIG_KEYS]), (
32
+ "Required key missing,"
33
+ " see index of `False` with `REQUIRED_CONFIG_KEYS`"
34
+ )
35
+
36
+ def test_invalid_mode(self):
37
+ with pytest.raises(AttributeError):
38
+ scipy.show_config(mode="foo")
39
+
40
+ def test_warn_to_add_tests(self):
41
+ assert len(scipy.__config__.DisplayModes) == 2, (
42
+ "New mode detected,"
43
+ " please add UT if applicable and increment this count"
44
+ )
llmeval-env/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ef6387fd6b0c1b0457883a70156943caf83138aa1b55ec81185f26db324bfee
3
+ size 4045920
llmeval-env/lib/python3.10/site-packages/scipy/sparse/tests/data/csc_py2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bac27f1a3eb1fdd102dae39b7dd61ce83e82f096388e344e14285071984d01fa
3
+ size 846
llmeval-env/lib/python3.10/site-packages/scipy/sparse/tests/data/csc_py3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b1b84315c7077417e720512d086a5a6217c2875b818d27704ae9b7237c69dfe
3
+ size 851
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (3.98 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_geometric_slerp.cpython-310.pyc ADDED
Binary file (7.22 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_kdtree.cpython-310.pyc ADDED
Binary file (34.4 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_plotutils.cpython-310.pyc ADDED
Binary file (6.68 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_procrustes.cpython-310.pyc ADDED
Binary file (4.28 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/_spherical_voronoi.cpython-310.pyc ADDED
Binary file (11.9 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/ckdtree.cpython-310.pyc ADDED
Binary file (684 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/distance.cpython-310.pyc ADDED
Binary file (80.5 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/kdtree.cpython-310.pyc ADDED
Binary file (699 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/__pycache__/qhull.cpython-310.pyc ADDED
Binary file (671 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/qhull_src/COPYING.txt ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Qhull, Copyright (c) 1993-2019
2
+
3
+ C.B. Barber
4
+ Arlington, MA
5
+
6
+ and
7
+
8
+ The National Science and Technology Research Center for
9
+ Computation and Visualization of Geometric Structures
10
+ (The Geometry Center)
11
+ University of Minnesota
12
+
13
14
+
15
+ This software includes Qhull from C.B. Barber and The Geometry Center.
16
+ Qhull is copyrighted as noted above. Qhull is free software and may
17
+ be obtained via http from www.qhull.org. It may be freely copied, modified,
18
+ and redistributed under the following conditions:
19
+
20
+ 1. All copyright notices must remain intact in all files.
21
+
22
+ 2. A copy of this text file must be distributed along with any copies
23
+ of Qhull that you redistribute; this includes copies that you have
24
+ modified, or copies of programs or other software products that
25
+ include Qhull.
26
+
27
+ 3. If you modify Qhull, you must include a notice giving the
28
+ name of the person performing the modification, the date of
29
+ modification, and the reason for such modification.
30
+
31
+ 4. When distributing modified versions of Qhull, or other software
32
+ products that include Qhull, you must provide notice that the original
33
+ source code may be obtained as noted above.
34
+
35
+ 5. There is no warranty or other guarantee of fitness for Qhull, it is
36
+ provided solely "as is". Bug reports or fixes may be sent to
37
+ [email protected]; the authors may or may not act on them as
38
+ they desire.
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (192 Bytes). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test__plotutils.cpython-310.pyc ADDED
Binary file (2.88 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test__procrustes.cpython-310.pyc ADDED
Binary file (3.74 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_distance.cpython-310.pyc ADDED
Binary file (70.1 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_hausdorff.cpython-310.pyc ADDED
Binary file (5.37 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_kdtree.cpython-310.pyc ADDED
Binary file (50 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_qhull.cpython-310.pyc ADDED
Binary file (32.9 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_slerp.cpython-310.pyc ADDED
Binary file (9.34 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/__pycache__/test_spherical_voronoi.cpython-310.pyc ADDED
Binary file (13.6 kB). View file
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X1.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ 1.147593763490969421e-01 8.926156143344999849e-01 1.437758624645746330e-02 1.803435962879929022e-02 5.533046214065578949e-01 5.554315640747428118e-01 4.497546637814608950e-02 4.438089247948049376e-01 7.984582810220538507e-01 2.752880789161644692e-01 1.344667112315823809e-01 9.230479561452992199e-01 6.040471462941819913e-01 3.797251652770228247e-01 4.316042735592399149e-01 5.312356915348823705e-01 4.348143005129563310e-01 3.111531488508799681e-01 9.531194313908697424e-04 8.212995023500069269e-02 6.689953269869852726e-01 9.914864535288493430e-01 8.037556036341153565e-01
2
+ 9.608925123801395074e-01 2.974451233678974127e-01 9.001110330654185088e-01 5.824163330415995654e-01 7.308574928293812834e-01 2.276154562412870952e-01 7.306791076039623745e-01 8.677244866905511333e-01 9.160806456176984192e-01 6.157216959991280714e-01 5.149053524695440531e-01 3.056427344890983999e-01 9.790557366933895223e-01 4.484995861076724877e-01 4.776550391081165747e-01 7.210436977670631187e-01 9.136399501661039979e-01 4.260275733550000776e-02 5.943900041968954717e-01 3.864571606342745991e-01 9.442027665110838131e-01 4.779949058608601309e-02 6.107551944250865228e-01
3
+ 3.297286578103622023e-01 5.980207401936733502e-01 3.673301293561567205e-01 2.585830520887681949e-01 4.660558746104259686e-01 6.083795956610364986e-01 4.535206368070313632e-01 6.873989778785424276e-01 5.130152688495458468e-01 7.665877846542720198e-01 3.444402973525138023e-01 3.583658123644906102e-02 7.924818220986856732e-01 8.746685720522412444e-01 3.010105569182431884e-01 6.012239357385538163e-01 6.233737362204671006e-01 4.830438698668915176e-01 2.317286885842551047e-02 7.585989958123050547e-01 7.108257632278830451e-01 1.551024884178199281e-01 2.665485998155288083e-01
4
+ 2.456278068903017253e-02 4.148739837711815648e-01 1.986372227934196655e-01 6.920408530298168825e-01 1.003067576685774398e-01 7.421560456480125190e-01 1.808453980608998313e-01 4.251297882537475870e-01 6.773002683522370004e-01 4.084108792570182445e-01 7.462888013191590897e-01 8.069930220529277776e-01 9.211110587681808903e-01 4.141491046181076108e-01 7.486318689260342829e-01 9.515405507589296263e-01 4.634288892577109742e-03 8.027593488166355762e-01 3.010346805217798405e-01 8.663248877242523127e-01 2.479968181181605447e-01 5.619851096054278017e-01 3.903886764590250857e-01
5
+ 7.122019976035700584e-01 6.188878051047785878e-01 7.290897087051201320e-01 6.334802157757637442e-01 5.523084734954342156e-01 5.614937129563645213e-01 2.496741051791574462e-01 5.972227939599233926e-01 1.786590597761109622e-01 2.609525984850900038e-01 7.210438943286010538e-01 2.211429064605652250e-01 9.140497572472672250e-02 1.430242193668443962e-01 7.856446942916397447e-01 4.635256358156553125e-01 5.278744289813760426e-01 3.702808015407184072e-01 5.527073830480792038e-01 6.370732917599846168e-01 9.953487928925482953e-01 3.021789770611936765e-01 3.354901923998221402e-02
6
+ 6.509638560895427695e-01 8.387598220902757751e-01 7.761375971745763103e-01 1.481627639227802717e-01 3.529474982902305324e-01 4.883093646287851586e-01 9.652923033658690199e-01 9.500680513565308294e-01 3.061885005078281985e-01 7.271902818906019750e-01 2.358962978196710303e-03 7.359889703223099211e-01 8.988893768074724955e-01 4.135279653937307121e-02 8.516441856688283796e-01 4.889597623270667270e-01 5.575909822114655245e-01 9.010853652261575641e-01 2.912844516556202246e-01 9.088759383368658629e-01 8.104351227460024898e-01 8.080695436776826890e-01 1.430530913253185155e-01
7
+ 8.048001196608134400e-01 3.066089444418462762e-02 9.021887554292090661e-01 6.154331491807940591e-02 1.378912575206647784e-02 5.775720193142440673e-01 1.219298963069791464e-01 1.883270243412101808e-01 5.569262398688379356e-02 8.964817777510125651e-02 7.977092785346929782e-01 4.878149375226197293e-01 4.511973131518809410e-02 1.858690046801604323e-01 6.947686471083162063e-01 5.884058794291086025e-01 8.638884676612634816e-01 3.855470871341656336e-01 3.495049047300468059e-01 2.767740932353948136e-01 4.731087031714035218e-01 6.679001673437914288e-01 7.502944200696660682e-01
8
+ 6.527328264244687261e-01 8.289483383553154505e-01 9.179741348282299818e-01 1.065639864466713105e-01 6.253616929058514184e-01 5.927750325266062381e-01 3.039157425463192563e-01 2.452766763359194302e-01 6.514027700704632107e-01 5.529218485487964463e-01 4.941158239308394151e-01 6.605306467722642516e-01 2.273688037050677346e-01 4.282616592244774534e-01 2.956128257930247250e-01 1.154803628237965896e-01 9.228220410235263849e-01 6.663525307676617659e-01 1.908852615936970087e-01 9.921383408926374159e-01 4.988716450388516188e-01 1.014900352736023414e-01 3.363930180244284474e-01
9
+ 2.914369076275757919e-01 5.196673601143533272e-01 7.420144907858341465e-01 1.768984185504740569e-01 5.296766993228564369e-01 5.922023566159900776e-01 5.965161262020234334e-01 3.810272333046110793e-01 8.368797246118340194e-01 7.896422363801189892e-01 9.655797561098209414e-01 4.430034032346981121e-01 2.780869795706976122e-01 3.047310845416009162e-01 8.051138863500326703e-01 6.731468634690835895e-01 4.743383036815584930e-01 9.530709614322225853e-01 7.753587619850917934e-01 2.801137109357491051e-01 6.182543660889736614e-01 5.005218857766725593e-01 9.071447804755052857e-01
10
+ 2.075071644012620453e-01 4.834950086973934802e-01 3.037011473860764532e-01 6.476084284887700937e-01 8.107195771564194020e-01 7.869075869075803364e-01 6.851234019375299633e-01 3.544187468104398331e-02 4.847673235908021017e-01 5.690262846164507726e-01 1.663354142616256803e-01 9.692796809752548537e-01 4.133441725866372485e-01 6.729167604487583665e-01 3.998813427407297283e-01 8.272617414104491695e-01 2.129248316324727774e-01 6.517004761357130249e-01 7.363013506605019520e-01 4.072375306356985636e-01 4.463336683526665238e-01 5.485059309728204102e-01 1.981745754527846071e-01
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X2.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 7.680465556300619667e-02 4.675022344069014180e-01 8.955498989131543963e-01 3.816236071436276411e-01 1.109030077070989329e-01 2.318928815459808668e-02 7.477394240984251983e-01 1.202289789304434864e-01 8.007290497575981769e-01 6.795195698871731027e-01 6.568225762396605605e-01 2.231475263228478445e-01 7.064624077661341151e-02 1.081656666815267176e-02 1.592069359090128033e-01 1.363392203645097389e-01 9.277020735447568667e-01 8.103136564528209407e-01 5.229467676276455812e-02 7.708020259874025504e-01 6.527954747473352359e-02 5.516397414886525796e-01 3.653371861367954443e-01
2
+ 8.144399106025798085e-01 7.731852525462976633e-01 6.909477620673205589e-01 9.696063817000286633e-01 4.297887511677249694e-01 6.989600553425188156e-01 7.310201335033380543e-01 3.135256147868910048e-01 5.715578037275241829e-01 3.935000744675094531e-01 2.057715781268398825e-01 5.892508589665171881e-01 8.512951599236765476e-01 9.569808799061578775e-01 6.164885878024699561e-01 4.714185430004367294e-01 6.128831737628155363e-01 6.641799309623502845e-01 6.001985185338730711e-01 4.231922889723856995e-01 7.605249308075449077e-01 1.064530958018087281e-01 6.306470691957204444e-01
3
+ 4.265470127256254518e-01 5.933766716280767239e-01 3.698589270536845053e-02 2.173799740537294412e-01 3.032679325475639009e-01 4.271831790058847611e-01 1.828944535901013690e-01 4.772333422710156592e-01 2.564773455194128138e-01 7.120329875362141347e-01 8.952243430110462530e-01 1.808777012183288013e-01 3.612151871458374464e-01 3.960999167923041631e-01 1.821669970670747318e-02 8.835474857189200559e-01 1.353104648821573663e-01 3.457291739160937016e-01 1.126467375304566199e-01 4.107293162402323450e-01 4.051719311053743056e-01 4.007382985250427243e-01 1.286905671428811848e-01
4
+ 2.910657003883979632e-01 9.616259180685315933e-03 2.033032441536681834e-01 1.096599110293863255e-01 4.191101704605176836e-01 5.462131536027151624e-01 8.393047907010142694e-01 9.046805198676335369e-01 7.009863472176891541e-01 2.508215985039629059e-01 6.754410796667598138e-01 6.740895474032024826e-01 1.358993708621679675e-01 8.219861775211464439e-01 6.322220445623235596e-01 2.766813559002430090e-01 6.575983861590951607e-01 9.515869708336625044e-01 8.654526462353933081e-01 3.450245117834797037e-01 5.649032890631299209e-01 4.717687914789682191e-01 3.296483580510030098e-01
5
+ 9.172477457635394016e-01 3.057396583041891436e-01 7.335332344225760082e-01 8.370236206345178509e-01 3.765464253115927695e-01 5.089680319287778199e-01 1.202325719268168003e-01 9.717771065272349240e-01 5.907820104019682050e-01 9.809211614977710880e-01 9.064285003671219698e-01 8.848841466121748489e-01 2.043407730734815297e-01 9.157600394927275511e-01 4.532260315147775831e-01 4.241077335005828397e-01 1.751730149568804240e-01 4.090412146081819911e-01 3.632197861847064058e-02 5.832539334970230360e-01 4.041848151536805434e-01 3.603643989086504629e-01 1.838411383882069261e-01
6
+ 2.508806403290032572e-01 4.381403985282813496e-01 4.694787405018008286e-02 6.353900562024634713e-01 1.200813444244532846e-01 6.072397042913001419e-01 9.937255904754030977e-01 4.916670237677555066e-01 3.473845913923001572e-01 3.526875922864345370e-01 5.448595548197197047e-01 2.245096010156972799e-01 9.003258279804994269e-01 3.534560469735994470e-01 2.989266066346342177e-01 4.621024982808636938e-01 9.626538866576676012e-01 9.791401720716153001e-01 7.138514287330390840e-01 9.832862333928654719e-01 3.233999591031431198e-01 5.406467224926423398e-01 9.581890295057201579e-01
7
+ 5.210583601680578436e-01 4.598159993059653949e-01 2.111497132057748027e-01 5.949977700916546652e-01 6.342618461422359077e-01 9.888228769705599275e-01 6.096770711536318998e-01 7.548431368960863974e-01 7.490858664860100546e-01 3.186213496546415058e-01 7.895687083231245351e-01 4.178326793268141159e-01 8.095818334534051752e-01 7.886271673523481684e-01 4.038905626506847923e-01 3.652649247094948981e-01 8.267205959224892542e-01 6.433617243328785262e-01 3.117681563249452559e-01 9.675995575054980868e-01 3.675673836358472890e-01 5.863757289184046151e-01 9.099029857959717305e-02
8
+ 4.024573981231733821e-01 3.578997554002771864e-01 3.519299868071553705e-01 7.417747693762357653e-01 2.963713903285800644e-01 9.602967989298948348e-01 3.811392331739601458e-01 5.493237898295448840e-01 6.835113342793640578e-01 2.304506220807415184e-01 3.727299857731285471e-01 5.450263991912108752e-01 6.951521210987908761e-01 6.474582745861203747e-01 6.316089475403589004e-01 5.672043967425510758e-02 9.034937506977609445e-01 2.332567550780038079e-01 1.096955741449157085e-02 8.870663813493575578e-01 4.384385452180562526e-01 7.100898998169548060e-01 3.245358176196319056e-01
9
+ 9.162009194452818139e-01 5.572224742426723498e-02 3.445910686865658601e-01 9.683564008127462097e-01 9.375063149031520604e-01 9.128188852869822956e-02 9.613605414326487075e-01 5.298598697556915482e-01 6.724799695520149445e-01 1.269103938571825019e-02 1.008406153387807480e-01 8.951105272379104028e-01 1.585460318853607609e-01 6.739986455059543413e-01 5.345419321702655768e-01 6.248843899572337213e-01 3.050288488994817859e-01 1.423645553465189284e-01 1.802121190541096096e-01 9.474646822694763326e-01 2.345716438587298613e-01 9.688281784764296578e-01 1.845165243240991515e-01
10
+ 2.548297646910531178e-01 2.580877375379494465e-01 1.355482532666937301e-01 6.478812986505504412e-01 9.971695982152032345e-01 2.606721082477282403e-01 5.483439686378906996e-01 4.409612606704470528e-01 4.396442074915688503e-01 7.414262832597111608e-01 7.308840725375539416e-01 8.072095530497225280e-02 6.829509968656330976e-01 5.700030854230387911e-01 3.801845336730320657e-01 2.481059916867158766e-01 3.977295094395927322e-03 5.749480512407895150e-01 4.112033136603401307e-01 8.676159710377848722e-01 9.062646588480167686e-01 3.326691167317923359e-01 8.498307982774666591e-01
11
+ 4.464338109330643345e-01 8.546516760817471914e-01 7.384800352329814466e-01 3.692485164984804502e-02 2.915662689505471583e-02 9.010049994217171898e-01 8.622900253010918892e-01 9.786230638032608065e-01 6.546824077297251909e-01 6.342297560006789903e-01 2.230339826582647955e-01 7.658846744185553446e-01 4.603043831539479491e-01 2.017100469861691225e-01 4.891590639893540482e-01 1.937140918314912419e-01 8.161582138652878626e-01 5.597293607114051106e-02 8.423261093326828153e-02 5.105392204475533990e-02 8.234193902673621057e-01 1.784268309975372002e-01 9.118997881986501408e-02
12
+ 8.588746913421980711e-01 1.479641118621310980e-02 1.375875301146138874e-01 7.533888774725254756e-01 5.782592791549248101e-01 9.128573037619659436e-01 1.831275762880391067e-01 3.471382864827737835e-01 4.859524740929310749e-02 8.955146541561730400e-01 4.787220791101074457e-01 4.222803577759057791e-01 8.469923964908064873e-01 6.300290047587608910e-02 1.020873237837905956e-01 3.585612487182909813e-02 6.320107119904569970e-01 5.891245970008752719e-01 1.104698053665007507e-01 4.233226558073774903e-01 4.432217054386708988e-01 2.864765416628194394e-01 2.489777211814803159e-02
13
+ 5.343810659756068615e-01 4.829076396403546578e-01 8.364480888953172988e-01 8.931374995414760321e-01 6.034161442354715188e-01 3.578336000768178593e-03 4.100579775972763574e-01 3.968667908067096128e-01 5.897163653686778861e-01 3.003241263928478899e-01 2.520935203143799264e-01 3.112129371563532310e-02 9.052865295974613646e-01 1.172285124002711010e-01 4.840001666149388315e-01 3.424620676348436588e-01 5.526057133826853818e-01 6.346139530261846184e-01 5.747945930485597321e-01 1.389915612177697879e-01 2.413801217666421417e-01 7.829900796662081497e-01 7.213528084845653998e-01
14
+ 9.384509283406079483e-01 6.303019601671526750e-01 1.787921522728125323e-01 1.556003868047917127e-02 5.662397078816850948e-01 3.437473614806091371e-01 8.615844972800188462e-01 7.624380237306396246e-01 1.096468347898514883e-01 1.276566836610887323e-01 8.479188493443535757e-01 3.634713454428405432e-01 7.478112314318967613e-01 9.856395696968375253e-01 6.250293654177319080e-02 1.919327272501809567e-01 1.415594476031050153e-01 7.224057351041784925e-01 8.452145259310355208e-01 5.434318833772002755e-01 5.177620959731277228e-02 3.358977598185840518e-01 2.542654881527960375e-01
15
+ 4.800909104006243489e-01 3.651345393613150137e-01 3.657093052788148446e-01 8.579662326651369408e-01 5.787694361240260932e-01 6.491966196891312268e-01 3.252508517294879775e-01 8.639694334693422961e-01 3.028097078756678551e-01 6.295814666338699350e-01 7.305627351548695803e-01 6.975931849120264872e-03 8.321205159004851915e-01 2.681809305821257761e-01 3.628869474597150591e-01 9.598981434716586936e-01 5.947913523332928332e-01 7.794864238003402779e-01 2.819511239444029149e-01 5.134200958476284882e-01 7.284684743064278045e-01 3.099571109539331903e-01 1.502222882866774967e-01
16
+ 2.463382654375219083e-01 4.465700737264240994e-01 7.180855317941433613e-01 5.056099420785193921e-01 6.182117344332578313e-01 2.370453793561340117e-01 9.831748018047525850e-01 6.397098184531551102e-01 8.260469782208745837e-02 7.474671691560941245e-01 9.963429983418570224e-02 5.450078811081275898e-01 5.370188678062637333e-02 2.774024442708808991e-01 2.082643088545442778e-01 2.704155352788065736e-01 7.225035580445194894e-01 4.866791976239246420e-01 1.357043111201584606e-01 7.911335827987711067e-01 7.278977102006007893e-01 6.880892094410231419e-01 1.029231496520791600e-01
17
+ 6.901796117735281566e-01 1.558248977395644275e-01 4.241818789360329855e-01 5.055658246392458199e-01 1.756288758075611467e-01 4.215083703818177652e-01 7.809231602323289945e-01 1.170053878686481141e-01 6.497026323614403243e-01 5.733120641440232479e-01 4.407703406152092551e-01 5.608677124532297498e-01 7.471045703286000039e-01 3.334604336022076732e-01 8.927208811415126011e-01 9.794565286182396191e-01 9.621542824973521313e-01 3.945825239405253981e-01 8.338963875792834157e-01 9.310552325082104286e-01 7.688283033784242271e-01 3.798823731047119567e-01 1.459993613028365278e-02
18
+ 7.848623555505630511e-01 2.681039365355797344e-03 7.833208051794043891e-01 8.184381915171493604e-01 4.682581645582317709e-01 2.391069309436419932e-01 1.765377537168698607e-01 9.863494676539893424e-01 4.378412300863872009e-01 7.494505491149090481e-01 1.942180356195394308e-01 9.981402467222395547e-01 7.992190944052800505e-01 1.350875702852057936e-01 4.950149186748543650e-01 7.243422481248201761e-01 3.544596746353472216e-01 8.320192561472177228e-01 9.776840296475269865e-01 7.733852731914863110e-01 2.305732998099923048e-01 9.746878189802981041e-01 7.747723331200035979e-01
19
+ 6.521099013127149568e-01 5.452399443648201505e-01 8.146707517183656710e-01 3.827256063695345656e-01 7.954832091744263867e-01 7.834427643148527132e-01 9.661317930643520402e-02 9.215673965718058636e-01 4.914305728788055383e-01 4.105628408027649501e-01 9.844647830893304974e-02 3.974831165301851987e-01 3.857608898053827007e-01 5.520210781401946321e-01 3.445787541654143915e-03 4.552922057017416702e-01 7.456544561760444223e-01 4.753985092154335845e-01 2.821385239833401615e-01 7.560136035104459973e-01 8.453142510471420845e-01 6.679627143276523071e-01 6.910882868284401459e-01
20
+ 8.526493480446283302e-01 1.183917973068240315e-01 6.163988861865119517e-01 5.751899460059114455e-01 1.638797964925038375e-01 8.214597298784013235e-01 5.424670654187370156e-01 1.806631819658732763e-01 9.268107278221827672e-01 4.127397378597359445e-01 7.529877485901653733e-01 1.714251090083847018e-01 2.601487784245806179e-01 2.028326156742237263e-01 5.299879450122358948e-01 7.587877062981395193e-01 4.070738595375062996e-01 3.546903049793261875e-01 8.695365138547607176e-01 1.447085661525142619e-01 3.193366245820845606e-01 8.797841086211429795e-01 2.666562188639977071e-01
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-boolean-inp.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
2
+ 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
3
+ 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
4
+ 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
5
+ 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
6
+ 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
7
+ 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
8
+ 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
9
+ 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
10
+ 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
11
+ 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
12
+ 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
13
+ 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00
14
+ 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
15
+ 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
16
+ 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00
17
+ 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
18
+ 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
19
+ 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
20
+ 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt ADDED
The diff for this file is too large to render. See raw diff
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 8.9084734e-01 9.3573853e-01 9.3507398e-01 9.6040691e-01 9.2918157e-01 9.6617342e-01 9.0430930e-01 9.5753424e-01 8.7106898e-01 9.2169905e-01 9.7401159e-01 8.9013416e-01 9.3956689e-01 9.0041896e-01 9.2588355e-01 9.3849417e-01 8.9713468e-01 9.1481804e-01 9.7500539e-01 9.0012586e-01 9.0962559e-01 8.5860091e-01 8.6981095e-01 8.9995771e-01 8.8070172e-01 9.1456657e-01 8.6711474e-01 9.2593917e-01 8.7560376e-01 8.5193121e-01 9.0898542e-01 8.7765302e-01 8.6555584e-01 8.6093485e-01 9.0447028e-01 8.7614405e-01 9.4803522e-01 8.4998062e-01 7.8398996e-01 8.9538612e-01 8.3902291e-01 9.9039470e-01 9.5480519e-01 8.9152195e-01 9.1623329e-01 7.9094921e-01 9.1777100e-01 9.8972335e-01 9.0429093e-01 8.7646362e-01 9.2136649e-01 9.7178177e-01 8.9610979e-01 9.4710327e-01 9.3612450e-01 9.0241499e-01 7.7992538e-01 8.7262126e-01 9.3325183e-01 8.5796531e-01 9.4267977e-01 6.7224167e-01 7.9568368e-01 8.6411267e-01 9.3311642e-01 9.0160114e-01 9.0698887e-01 8.5833256e-01 9.6902830e-01 9.5072298e-01 8.6808495e-01 9.7879599e-01 8.8060729e-01 8.2818573e-01 8.4366706e-01 8.4506700e-01 9.4532981e-01 9.1792306e-01 7.8917825e-01 9.8337805e-01 8.1751613e-01 9.3037855e-01 9.1618832e-01 8.6568874e-01 8.9751397e-01 8.7923710e-01 8.6814329e-01 9.0330164e-01 8.2426213e-01 9.4644643e-01 8.8431293e-01 8.8497426e-01 9.0633818e-01 9.5537161e-01 8.2167575e-01 8.7771053e-01 9.0681167e-01 8.7626143e-01 8.7463464e-01 9.8033940e-01 9.2920881e-01 9.5108549e-01 9.1287466e-01 8.0052218e-01 9.2409517e-01 8.8252650e-01 8.7873923e-01 9.2989402e-01 9.1985043e-01 9.6172646e-01 8.8223856e-01 9.4477822e-01 8.8310948e-01 9.4461306e-01 9.1875210e-01 9.1233363e-01 9.2124013e-01 9.5460897e-01 8.4640982e-01 9.0882657e-01 9.8169468e-01 9.7828355e-01 8.4150533e-01 8.6888923e-01 9.7138825e-01 8.7988144e-01 9.6720910e-01 8.9450147e-01 9.5331584e-01 8.8871809e-01 8.9736685e-01 8.6258146e-01 9.1331565e-01 9.0968870e-01 9.4833654e-01 9.0536967e-01 9.5099871e-01 8.0251958e-01 9.2526150e-01 9.8971957e-01 9.0340947e-01 9.4955892e-01 9.6838162e-01 8.7534901e-01 9.1178797e-01 9.2649154e-01 9.5260993e-01 9.3178143e-01 9.4943000e-01 8.7816171e-01 9.6506542e-01 8.3422958e-01 9.3443585e-01 9.3220084e-01 8.5706573e-01 8.4666325e-01 9.0474744e-01 9.1080644e-01 9.2406899e-01 8.7901768e-01 9.3265263e-01 9.5992829e-01 9.5696271e-01 9.1932272e-01 8.0937044e-01 9.0904917e-01 8.9516756e-01 9.4797906e-01 8.4159421e-01 9.6773901e-01 9.7099825e-01 9.6941820e-01 9.8174088e-01 9.7569951e-01 9.3655362e-01 8.4130333e-01 9.5994549e-01 8.4235414e-01 9.1429418e-01 9.3418117e-01 8.4600977e-01 8.8166496e-01 8.7594776e-01 8.8571112e-01 9.6308174e-01 9.5315927e-01 8.6997519e-01 8.9383032e-01 9.4686804e-01 9.4399596e-01
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.2420590e+01 3.3246607e+01 3.0526910e+01 3.5166573e+01 3.1868301e+01 3.6025002e+01 3.2513623e+01 3.6557796e+01 3.3752212e+01 3.4422130e+01 3.2526018e+01 3.2581161e+01 3.3743555e+01 3.6960777e+01 3.4225270e+01 3.2965308e+01 3.4591031e+01 3.4204203e+01 3.4678123e+01 3.5728720e+01 3.0830047e+01 3.1550681e+01 3.3304790e+01 3.2676753e+01 3.2742330e+01 3.1684556e+01 3.2830915e+01 3.2956614e+01 2.7365639e+01 3.3207307e+01 3.3420925e+01 3.4357941e+01 2.8280126e+01 3.4523458e+01 3.2705274e+01 3.2455891e+01 3.1636060e+01 3.1594957e+01 3.1805202e+01 3.3886574e+01 3.3438829e+01 3.3330030e+01 3.4168514e+01 3.0637353e+01 4.2149167e+01 3.6340559e+01 2.9315308e+01 3.5778314e+01 3.7693050e+01 3.2598714e+01 3.2990836e+01 3.4967659e+01 3.9748920e+01 3.6745043e+01 2.7117550e+01 3.6014760e+01 2.9367558e+01 3.3845350e+01 3.5477339e+01 3.1513372e+01 3.2517953e+01 2.4755097e+01 3.0229897e+01 3.4799343e+01 3.3371710e+01 2.9600910e+01 3.3275088e+01 3.3567110e+01 3.4527016e+01 3.4942320e+01 3.2359383e+01 3.2607100e+01 3.1467914e+01 2.9032039e+01 3.3122878e+01 2.8496709e+01 2.9908448e+01 2.9962886e+01 3.0345299e+01 3.1737613e+01 2.8551485e+01 3.2610551e+01 3.3082660e+01 3.3719298e+01 3.6434018e+01 3.6589278e+01 3.3889586e+01 3.8036774e+01 3.1483497e+01 3.4196794e+01 3.5154035e+01 3.5488608e+01 3.6143183e+01 3.3473491e+01 3.4686446e+01 2.8687495e+01 3.5725742e+01 3.0188298e+01 3.3084534e+01 3.3538519e+01 3.6226849e+01 2.9052099e+01 3.6032733e+01 3.0811503e+01 3.2616190e+01 3.3888566e+01 3.3074570e+01 2.9683515e+01 3.0600771e+01 3.4345247e+01 3.6983843e+01 3.3692824e+01 3.3762461e+01 3.4024582e+01 3.3698854e+01 3.1238613e+01 3.4978833e+01 3.4991078e+01 3.4577741e+01 3.3749227e+01 3.4982272e+01 3.0487868e+01 3.2317632e+01 3.1125588e+01 3.4413791e+01 3.1881871e+01 3.1373821e+01 3.0416864e+01 3.2066187e+01 3.1128313e+01 3.0240249e+01 3.0125198e+01 3.1343454e+01 3.5479092e+01 3.4450767e+01 3.2953507e+01 3.4456795e+01 3.0136375e+01 3.3462150e+01 2.9894274e+01 3.1367432e+01 3.2839320e+01 3.1440398e+01 2.9400374e+01 3.1106338e+01 3.1242624e+01 3.5537892e+01 3.3056459e+01 2.8610281e+01 3.4296217e+01 3.5819772e+01 3.2503922e+01 3.0963029e+01 3.4762112e+01 3.4796284e+01 2.9645345e+01 3.4468088e+01 2.6975590e+01 3.3738555e+01 2.8825009e+01 3.2663999e+01 3.2547878e+01 3.2308091e+01 3.2489966e+01 3.0868597e+01 3.2974220e+01 3.0866111e+01 3.8197342e+01 3.0609568e+01 3.5478978e+01 2.9249184e+01 3.6185622e+01 3.1948258e+01 3.2649719e+01 3.3305650e+01 3.4643955e+01 3.6566241e+01 3.4968484e+01 3.2632218e+01 3.6741383e+01 3.5700008e+01 3.1962468e+01 3.1410623e+01 3.0412061e+01 3.3749077e+01 3.5649661e+01 3.7649263e+01 3.2832574e+01 3.1783914e+01 2.8264292e+01
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml-iris.txt ADDED
The diff for this file is too large to render. See raw diff
 
llmeval-env/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 2.5695885e-01 2.6882042e-01 2.3470353e-01 2.9299329e-01 2.2742702e-01 3.1253572e-01 2.4986352e-01 3.0770122e-01 2.5191977e-01 2.7931567e-01 2.8133743e-01 2.6316239e-01 2.6067201e-01 3.2982339e-01 2.8993002e-01 2.5506356e-01 2.8728051e-01 2.4952121e-01 2.8613379e-01 2.6894157e-01 2.3606353e-01 2.1670935e-01 2.3470242e-01 2.4294172e-01 2.4376454e-01 2.3228195e-01 2.3554918e-01 2.4851241e-01 2.0917546e-01 2.4971488e-01 2.4264224e-01 2.7405461e-01 1.9086415e-01 2.6346574e-01 2.5908801e-01 2.2138495e-01 2.2910721e-01 2.2169919e-01 2.0660065e-01 2.3207102e-01 2.5554688e-01 2.5153751e-01 2.6073682e-01 2.0919640e-01 3.3984433e-01 2.7503792e-01 2.1709889e-01 2.7068095e-01 3.0307041e-01 2.4529612e-01 2.2987015e-01 2.7736967e-01 3.0310708e-01 3.0544316e-01 1.9205388e-01 2.7098021e-01 2.0722466e-01 2.6387343e-01 2.8998308e-01 2.2633010e-01 2.5177075e-01 1.6347011e-01 2.4036389e-01 2.6485871e-01 2.8491965e-01 2.2273619e-01 2.4511873e-01 2.5930533e-01 2.6589995e-01 2.7797191e-01 2.3357373e-01 2.4279909e-01 2.3544532e-01 1.9447286e-01 2.3993534e-01 2.0856243e-01 2.2125251e-01 2.1988206e-01 2.0590152e-01 2.6441952e-01 2.0052739e-01 2.2978496e-01 2.4483670e-01 2.3879510e-01 2.9398425e-01 2.7541852e-01 2.3777469e-01 2.9151131e-01 2.0672752e-01 2.4584031e-01 2.7475025e-01 2.7064343e-01 2.5603684e-01 2.6165327e-01 2.4233155e-01 1.7892657e-01 2.6111203e-01 1.9965682e-01 2.4201634e-01 2.6281353e-01 3.1928221e-01 1.9731963e-01 2.7752862e-01 2.2633080e-01 2.6783167e-01 2.5447186e-01 2.6424243e-01 2.1960672e-01 2.2984242e-01 2.8788736e-01 2.8681630e-01 2.6949787e-01 2.3993685e-01 2.4440073e-01 2.5010397e-01 2.3230769e-01 2.9879682e-01 2.4200592e-01 2.6957748e-01 2.6073240e-01 2.6355347e-01 2.3403674e-01 2.2411413e-01 2.2956729e-01 2.8105976e-01 2.2913304e-01 2.4898608e-01 2.3304000e-01 2.2692988e-01 2.3728251e-01 2.2552243e-01 2.0364084e-01 2.3359511e-01 2.6619167e-01 2.6666588e-01 2.3666880e-01 2.7239113e-01 2.0146697e-01 2.3045559e-01 2.1695523e-01 2.1387991e-01 2.2366404e-01 2.2809635e-01 2.0901297e-01 2.2441100e-01 2.3418882e-01 2.8552218e-01 2.4609015e-01 2.0282492e-01 2.5940295e-01 2.7407006e-01 2.3344890e-01 2.1179142e-01 2.7047821e-01 2.9832768e-01 2.0859082e-01 2.8881331e-01 1.8384598e-01 2.5286491e-01 2.2012615e-01 2.3615775e-01 2.6845565e-01 2.3356355e-01 2.7164193e-01 2.4179380e-01 2.5247973e-01 2.5637548e-01 3.2126483e-01 2.3100774e-01 2.8832546e-01 2.0043257e-01 2.7918333e-01 2.4884522e-01 2.2904723e-01 2.3738940e-01 2.9461278e-01 2.9782005e-01 3.0332073e-01 2.5175971e-01 3.1203784e-01 2.6611535e-01 2.3713507e-01 2.2203585e-01 2.3602325e-01 2.5093670e-01 2.6860434e-01 3.0137874e-01 2.3759606e-01 2.6840346e-01 1.9200556e-01