jasonfan commited on
Commit
2865ebc
·
verified ·
1 Parent(s): 5c1ef06

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. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/INSTALLER +1 -0
  2. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/LICENSE.txt +934 -0
  3. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/METADATA +1082 -0
  4. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/RECORD +0 -0
  5. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/WHEEL +6 -0
  6. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/_mvt.py +171 -0
  7. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/fisher_exact_results_from_r.py +607 -0
  8. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/AtmWtAg.dat +108 -0
  9. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SiRstv.dat +85 -0
  10. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs01.dat +249 -0
  11. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs02.dat +1869 -0
  12. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs03.dat +0 -0
  13. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs04.dat +249 -0
  14. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs05.dat +1869 -0
  15. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs06.dat +0 -0
  16. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs07.dat +249 -0
  17. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs08.dat +1869 -0
  18. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs09.dat +0 -0
  19. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_linregress/Norris.dat +97 -0
  20. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/studentized_range_mpmath_ref.json +1499 -0
  21. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_resampling.py +2009 -0
  22. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_sampling.py +1445 -0
  23. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_sensitivity_analysis.py +310 -0
  24. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_stats.py +0 -0
  25. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_survival.py +466 -0
  26. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_tukeylambda_stats.py +85 -0
  27. miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_variation.py +214 -0
  28. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/INSTALLER +1 -0
  29. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/METADATA +268 -0
  30. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/RECORD +386 -0
  31. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/WHEEL +6 -0
  32. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/entry_points.txt +2 -0
  33. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/licenses/LICENSE +21 -0
  34. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/top_level.txt +1 -0
  35. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/__init__.py +69 -0
  36. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_batcher.py +139 -0
  37. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_compat.py +94 -0
  38. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_init_implementation.py +79 -0
  39. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_log_batcher.py +56 -0
  40. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_lru_cache.py +43 -0
  41. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_metrics_batcher.py +46 -0
  42. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_queue.py +289 -0
  43. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_span_batcher.py +128 -0
  44. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_types.py +362 -0
  45. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_werkzeug.py +96 -0
  46. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/__init__.py +8 -0
  47. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/_openai_completions_api.py +66 -0
  48. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/_openai_responses_api.py +22 -0
  49. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/monitoring.py +141 -0
  50. miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/utils.py +727 -0
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/LICENSE.txt ADDED
@@ -0,0 +1,934 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2001-2002 Enthought, Inc. 2003-2024, SciPy Developers.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions
6
+ are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above
12
+ copyright notice, this list of conditions and the following
13
+ disclaimer in the documentation and/or other materials provided
14
+ with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived
18
+ from this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
32
+ ----
33
+
34
+ This binary distribution of SciPy can also bundle the following software
35
+ (depending on the build):
36
+
37
+
38
+ Name: OpenBLAS
39
+ Files: scipy.libs/libscipy_openblas*.so
40
+ Description: bundled as a dynamically linked library
41
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
42
+ License: BSD-3-Clause-Attribution
43
+ Copyright (c) 2011-2014, The OpenBLAS Project
44
+ All rights reserved.
45
+
46
+ Redistribution and use in source and binary forms, with or without
47
+ modification, are permitted provided that the following conditions are
48
+ met:
49
+
50
+ 1. Redistributions of source code must retain the above copyright
51
+ notice, this list of conditions and the following disclaimer.
52
+
53
+ 2. Redistributions in binary form must reproduce the above copyright
54
+ notice, this list of conditions and the following disclaimer in
55
+ the documentation and/or other materials provided with the
56
+ distribution.
57
+ 3. Neither the name of the OpenBLAS project nor the names of
58
+ its contributors may be used to endorse or promote products
59
+ derived from this software without specific prior written
60
+ permission.
61
+
62
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
63
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
66
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
68
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
69
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
70
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
71
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
72
+
73
+
74
+ Name: LAPACK
75
+ Files: scipy.libs/libscipy_openblas*.so
76
+ Description: bundled in OpenBLAS
77
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
78
+ License: BSD-3-Clause-Attribution
79
+ Copyright (c) 1992-2013 The University of Tennessee and The University
80
+ of Tennessee Research Foundation. All rights
81
+ reserved.
82
+ Copyright (c) 2000-2013 The University of California Berkeley. All
83
+ rights reserved.
84
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
85
+ reserved.
86
+
87
+ $COPYRIGHT$
88
+
89
+ Additional copyrights may follow
90
+
91
+ $HEADER$
92
+
93
+ Redistribution and use in source and binary forms, with or without
94
+ modification, are permitted provided that the following conditions are
95
+ met:
96
+
97
+ - Redistributions of source code must retain the above copyright
98
+ notice, this list of conditions and the following disclaimer.
99
+
100
+ - Redistributions in binary form must reproduce the above copyright
101
+ notice, this list of conditions and the following disclaimer listed
102
+ in this license in the documentation and/or other materials
103
+ provided with the distribution.
104
+
105
+ - Neither the name of the copyright holders nor the names of its
106
+ contributors may be used to endorse or promote products derived from
107
+ this software without specific prior written permission.
108
+
109
+ The copyright holders provide no reassurances that the source code
110
+ provided does not infringe any patent, copyright, or any other
111
+ intellectual property rights of third parties. The copyright holders
112
+ disclaim any liability to any recipient for claims brought against
113
+ recipient by any third party for infringement of that parties
114
+ intellectual property rights.
115
+
116
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
117
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
118
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
119
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
120
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
121
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
122
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
123
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
124
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
125
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
126
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
127
+
128
+
129
+ Name: GCC runtime library
130
+ Files: scipy.libs/libgfortran*.so
131
+ Description: dynamically linked to files compiled with gcc
132
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
133
+ License: GPL-3.0-with-GCC-exception
134
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
135
+
136
+ Libgfortran is free software; you can redistribute it and/or modify
137
+ it under the terms of the GNU General Public License as published by
138
+ the Free Software Foundation; either version 3, or (at your option)
139
+ any later version.
140
+
141
+ Libgfortran is distributed in the hope that it will be useful,
142
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
143
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
144
+ GNU General Public License for more details.
145
+
146
+ Under Section 7 of GPL version 3, you are granted additional
147
+ permissions described in the GCC Runtime Library Exception, version
148
+ 3.1, as published by the Free Software Foundation.
149
+
150
+ You should have received a copy of the GNU General Public License and
151
+ a copy of the GCC Runtime Library Exception along with this program;
152
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
153
+ <http://www.gnu.org/licenses/>.
154
+
155
+ ----
156
+
157
+ Full text of license texts referred to above follows (that they are
158
+ listed below does not necessarily imply the conditions apply to the
159
+ present binary release):
160
+
161
+ ----
162
+
163
+ GCC RUNTIME LIBRARY EXCEPTION
164
+
165
+ Version 3.1, 31 March 2009
166
+
167
+ Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
168
+
169
+ Everyone is permitted to copy and distribute verbatim copies of this
170
+ license document, but changing it is not allowed.
171
+
172
+ This GCC Runtime Library Exception ("Exception") is an additional
173
+ permission under section 7 of the GNU General Public License, version
174
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
175
+ bears a notice placed by the copyright holder of the file stating that
176
+ the file is governed by GPLv3 along with this Exception.
177
+
178
+ When you use GCC to compile a program, GCC may combine portions of
179
+ certain GCC header files and runtime libraries with the compiled
180
+ program. The purpose of this Exception is to allow compilation of
181
+ non-GPL (including proprietary) programs to use, in this way, the
182
+ header files and runtime libraries covered by this Exception.
183
+
184
+ 0. Definitions.
185
+
186
+ A file is an "Independent Module" if it either requires the Runtime
187
+ Library for execution after a Compilation Process, or makes use of an
188
+ interface provided by the Runtime Library, but is not otherwise based
189
+ on the Runtime Library.
190
+
191
+ "GCC" means a version of the GNU Compiler Collection, with or without
192
+ modifications, governed by version 3 (or a specified later version) of
193
+ the GNU General Public License (GPL) with the option of using any
194
+ subsequent versions published by the FSF.
195
+
196
+ "GPL-compatible Software" is software whose conditions of propagation,
197
+ modification and use would permit combination with GCC in accord with
198
+ the license of GCC.
199
+
200
+ "Target Code" refers to output from any compiler for a real or virtual
201
+ target processor architecture, in executable form or suitable for
202
+ input to an assembler, loader, linker and/or execution
203
+ phase. Notwithstanding that, Target Code does not include data in any
204
+ format that is used as a compiler intermediate representation, or used
205
+ for producing a compiler intermediate representation.
206
+
207
+ The "Compilation Process" transforms code entirely represented in
208
+ non-intermediate languages designed for human-written code, and/or in
209
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
210
+ use of source code generators and preprocessors need not be considered
211
+ part of the Compilation Process, since the Compilation Process can be
212
+ understood as starting with the output of the generators or
213
+ preprocessors.
214
+
215
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
216
+ with other GPL-compatible software, or if it is done without using any
217
+ work based on GCC. For example, using non-GPL-compatible Software to
218
+ optimize any GCC intermediate representations would not qualify as an
219
+ Eligible Compilation Process.
220
+
221
+ 1. Grant of Additional Permission.
222
+
223
+ You have permission to propagate a work of Target Code formed by
224
+ combining the Runtime Library with Independent Modules, even if such
225
+ propagation would otherwise violate the terms of GPLv3, provided that
226
+ all Target Code was generated by Eligible Compilation Processes. You
227
+ may then convey such a combination under terms of your choice,
228
+ consistent with the licensing of the Independent Modules.
229
+
230
+ 2. No Weakening of GCC Copyleft.
231
+
232
+ The availability of this Exception does not imply any general
233
+ presumption that third-party software is unaffected by the copyleft
234
+ requirements of the license of GCC.
235
+
236
+ ----
237
+
238
+ GNU GENERAL PUBLIC LICENSE
239
+ Version 3, 29 June 2007
240
+
241
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
242
+ Everyone is permitted to copy and distribute verbatim copies
243
+ of this license document, but changing it is not allowed.
244
+
245
+ Preamble
246
+
247
+ The GNU General Public License is a free, copyleft license for
248
+ software and other kinds of works.
249
+
250
+ The licenses for most software and other practical works are designed
251
+ to take away your freedom to share and change the works. By contrast,
252
+ the GNU General Public License is intended to guarantee your freedom to
253
+ share and change all versions of a program--to make sure it remains free
254
+ software for all its users. We, the Free Software Foundation, use the
255
+ GNU General Public License for most of our software; it applies also to
256
+ any other work released this way by its authors. You can apply it to
257
+ your programs, too.
258
+
259
+ When we speak of free software, we are referring to freedom, not
260
+ price. Our General Public Licenses are designed to make sure that you
261
+ have the freedom to distribute copies of free software (and charge for
262
+ them if you wish), that you receive source code or can get it if you
263
+ want it, that you can change the software or use pieces of it in new
264
+ free programs, and that you know you can do these things.
265
+
266
+ To protect your rights, we need to prevent others from denying you
267
+ these rights or asking you to surrender the rights. Therefore, you have
268
+ certain responsibilities if you distribute copies of the software, or if
269
+ you modify it: responsibilities to respect the freedom of others.
270
+
271
+ For example, if you distribute copies of such a program, whether
272
+ gratis or for a fee, you must pass on to the recipients the same
273
+ freedoms that you received. You must make sure that they, too, receive
274
+ or can get the source code. And you must show them these terms so they
275
+ know their rights.
276
+
277
+ Developers that use the GNU GPL protect your rights with two steps:
278
+ (1) assert copyright on the software, and (2) offer you this License
279
+ giving you legal permission to copy, distribute and/or modify it.
280
+
281
+ For the developers' and authors' protection, the GPL clearly explains
282
+ that there is no warranty for this free software. For both users' and
283
+ authors' sake, the GPL requires that modified versions be marked as
284
+ changed, so that their problems will not be attributed erroneously to
285
+ authors of previous versions.
286
+
287
+ Some devices are designed to deny users access to install or run
288
+ modified versions of the software inside them, although the manufacturer
289
+ can do so. This is fundamentally incompatible with the aim of
290
+ protecting users' freedom to change the software. The systematic
291
+ pattern of such abuse occurs in the area of products for individuals to
292
+ use, which is precisely where it is most unacceptable. Therefore, we
293
+ have designed this version of the GPL to prohibit the practice for those
294
+ products. If such problems arise substantially in other domains, we
295
+ stand ready to extend this provision to those domains in future versions
296
+ of the GPL, as needed to protect the freedom of users.
297
+
298
+ Finally, every program is threatened constantly by software patents.
299
+ States should not allow patents to restrict development and use of
300
+ software on general-purpose computers, but in those that do, we wish to
301
+ avoid the special danger that patents applied to a free program could
302
+ make it effectively proprietary. To prevent this, the GPL assures that
303
+ patents cannot be used to render the program non-free.
304
+
305
+ The precise terms and conditions for copying, distribution and
306
+ modification follow.
307
+
308
+ TERMS AND CONDITIONS
309
+
310
+ 0. Definitions.
311
+
312
+ "This License" refers to version 3 of the GNU General Public License.
313
+
314
+ "Copyright" also means copyright-like laws that apply to other kinds of
315
+ works, such as semiconductor masks.
316
+
317
+ "The Program" refers to any copyrightable work licensed under this
318
+ License. Each licensee is addressed as "you". "Licensees" and
319
+ "recipients" may be individuals or organizations.
320
+
321
+ To "modify" a work means to copy from or adapt all or part of the work
322
+ in a fashion requiring copyright permission, other than the making of an
323
+ exact copy. The resulting work is called a "modified version" of the
324
+ earlier work or a work "based on" the earlier work.
325
+
326
+ A "covered work" means either the unmodified Program or a work based
327
+ on the Program.
328
+
329
+ To "propagate" a work means to do anything with it that, without
330
+ permission, would make you directly or secondarily liable for
331
+ infringement under applicable copyright law, except executing it on a
332
+ computer or modifying a private copy. Propagation includes copying,
333
+ distribution (with or without modification), making available to the
334
+ public, and in some countries other activities as well.
335
+
336
+ To "convey" a work means any kind of propagation that enables other
337
+ parties to make or receive copies. Mere interaction with a user through
338
+ a computer network, with no transfer of a copy, is not conveying.
339
+
340
+ An interactive user interface displays "Appropriate Legal Notices"
341
+ to the extent that it includes a convenient and prominently visible
342
+ feature that (1) displays an appropriate copyright notice, and (2)
343
+ tells the user that there is no warranty for the work (except to the
344
+ extent that warranties are provided), that licensees may convey the
345
+ work under this License, and how to view a copy of this License. If
346
+ the interface presents a list of user commands or options, such as a
347
+ menu, a prominent item in the list meets this criterion.
348
+
349
+ 1. Source Code.
350
+
351
+ The "source code" for a work means the preferred form of the work
352
+ for making modifications to it. "Object code" means any non-source
353
+ form of a work.
354
+
355
+ A "Standard Interface" means an interface that either is an official
356
+ standard defined by a recognized standards body, or, in the case of
357
+ interfaces specified for a particular programming language, one that
358
+ is widely used among developers working in that language.
359
+
360
+ The "System Libraries" of an executable work include anything, other
361
+ than the work as a whole, that (a) is included in the normal form of
362
+ packaging a Major Component, but which is not part of that Major
363
+ Component, and (b) serves only to enable use of the work with that
364
+ Major Component, or to implement a Standard Interface for which an
365
+ implementation is available to the public in source code form. A
366
+ "Major Component", in this context, means a major essential component
367
+ (kernel, window system, and so on) of the specific operating system
368
+ (if any) on which the executable work runs, or a compiler used to
369
+ produce the work, or an object code interpreter used to run it.
370
+
371
+ The "Corresponding Source" for a work in object code form means all
372
+ the source code needed to generate, install, and (for an executable
373
+ work) run the object code and to modify the work, including scripts to
374
+ control those activities. However, it does not include the work's
375
+ System Libraries, or general-purpose tools or generally available free
376
+ programs which are used unmodified in performing those activities but
377
+ which are not part of the work. For example, Corresponding Source
378
+ includes interface definition files associated with source files for
379
+ the work, and the source code for shared libraries and dynamically
380
+ linked subprograms that the work is specifically designed to require,
381
+ such as by intimate data communication or control flow between those
382
+ subprograms and other parts of the work.
383
+
384
+ The Corresponding Source need not include anything that users
385
+ can regenerate automatically from other parts of the Corresponding
386
+ Source.
387
+
388
+ The Corresponding Source for a work in source code form is that
389
+ same work.
390
+
391
+ 2. Basic Permissions.
392
+
393
+ All rights granted under this License are granted for the term of
394
+ copyright on the Program, and are irrevocable provided the stated
395
+ conditions are met. This License explicitly affirms your unlimited
396
+ permission to run the unmodified Program. The output from running a
397
+ covered work is covered by this License only if the output, given its
398
+ content, constitutes a covered work. This License acknowledges your
399
+ rights of fair use or other equivalent, as provided by copyright law.
400
+
401
+ You may make, run and propagate covered works that you do not
402
+ convey, without conditions so long as your license otherwise remains
403
+ in force. You may convey covered works to others for the sole purpose
404
+ of having them make modifications exclusively for you, or provide you
405
+ with facilities for running those works, provided that you comply with
406
+ the terms of this License in conveying all material for which you do
407
+ not control copyright. Those thus making or running the covered works
408
+ for you must do so exclusively on your behalf, under your direction
409
+ and control, on terms that prohibit them from making any copies of
410
+ your copyrighted material outside their relationship with you.
411
+
412
+ Conveying under any other circumstances is permitted solely under
413
+ the conditions stated below. Sublicensing is not allowed; section 10
414
+ makes it unnecessary.
415
+
416
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
417
+
418
+ No covered work shall be deemed part of an effective technological
419
+ measure under any applicable law fulfilling obligations under article
420
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
421
+ similar laws prohibiting or restricting circumvention of such
422
+ measures.
423
+
424
+ When you convey a covered work, you waive any legal power to forbid
425
+ circumvention of technological measures to the extent such circumvention
426
+ is effected by exercising rights under this License with respect to
427
+ the covered work, and you disclaim any intention to limit operation or
428
+ modification of the work as a means of enforcing, against the work's
429
+ users, your or third parties' legal rights to forbid circumvention of
430
+ technological measures.
431
+
432
+ 4. Conveying Verbatim Copies.
433
+
434
+ You may convey verbatim copies of the Program's source code as you
435
+ receive it, in any medium, provided that you conspicuously and
436
+ appropriately publish on each copy an appropriate copyright notice;
437
+ keep intact all notices stating that this License and any
438
+ non-permissive terms added in accord with section 7 apply to the code;
439
+ keep intact all notices of the absence of any warranty; and give all
440
+ recipients a copy of this License along with the Program.
441
+
442
+ You may charge any price or no price for each copy that you convey,
443
+ and you may offer support or warranty protection for a fee.
444
+
445
+ 5. Conveying Modified Source Versions.
446
+
447
+ You may convey a work based on the Program, or the modifications to
448
+ produce it from the Program, in the form of source code under the
449
+ terms of section 4, provided that you also meet all of these conditions:
450
+
451
+ a) The work must carry prominent notices stating that you modified
452
+ it, and giving a relevant date.
453
+
454
+ b) The work must carry prominent notices stating that it is
455
+ released under this License and any conditions added under section
456
+ 7. This requirement modifies the requirement in section 4 to
457
+ "keep intact all notices".
458
+
459
+ c) You must license the entire work, as a whole, under this
460
+ License to anyone who comes into possession of a copy. This
461
+ License will therefore apply, along with any applicable section 7
462
+ additional terms, to the whole of the work, and all its parts,
463
+ regardless of how they are packaged. This License gives no
464
+ permission to license the work in any other way, but it does not
465
+ invalidate such permission if you have separately received it.
466
+
467
+ d) If the work has interactive user interfaces, each must display
468
+ Appropriate Legal Notices; however, if the Program has interactive
469
+ interfaces that do not display Appropriate Legal Notices, your
470
+ work need not make them do so.
471
+
472
+ A compilation of a covered work with other separate and independent
473
+ works, which are not by their nature extensions of the covered work,
474
+ and which are not combined with it such as to form a larger program,
475
+ in or on a volume of a storage or distribution medium, is called an
476
+ "aggregate" if the compilation and its resulting copyright are not
477
+ used to limit the access or legal rights of the compilation's users
478
+ beyond what the individual works permit. Inclusion of a covered work
479
+ in an aggregate does not cause this License to apply to the other
480
+ parts of the aggregate.
481
+
482
+ 6. Conveying Non-Source Forms.
483
+
484
+ You may convey a covered work in object code form under the terms
485
+ of sections 4 and 5, provided that you also convey the
486
+ machine-readable Corresponding Source under the terms of this License,
487
+ in one of these ways:
488
+
489
+ a) Convey the object code in, or embodied in, a physical product
490
+ (including a physical distribution medium), accompanied by the
491
+ Corresponding Source fixed on a durable physical medium
492
+ customarily used for software interchange.
493
+
494
+ b) Convey the object code in, or embodied in, a physical product
495
+ (including a physical distribution medium), accompanied by a
496
+ written offer, valid for at least three years and valid for as
497
+ long as you offer spare parts or customer support for that product
498
+ model, to give anyone who possesses the object code either (1) a
499
+ copy of the Corresponding Source for all the software in the
500
+ product that is covered by this License, on a durable physical
501
+ medium customarily used for software interchange, for a price no
502
+ more than your reasonable cost of physically performing this
503
+ conveying of source, or (2) access to copy the
504
+ Corresponding Source from a network server at no charge.
505
+
506
+ c) Convey individual copies of the object code with a copy of the
507
+ written offer to provide the Corresponding Source. This
508
+ alternative is allowed only occasionally and noncommercially, and
509
+ only if you received the object code with such an offer, in accord
510
+ with subsection 6b.
511
+
512
+ d) Convey the object code by offering access from a designated
513
+ place (gratis or for a charge), and offer equivalent access to the
514
+ Corresponding Source in the same way through the same place at no
515
+ further charge. You need not require recipients to copy the
516
+ Corresponding Source along with the object code. If the place to
517
+ copy the object code is a network server, the Corresponding Source
518
+ may be on a different server (operated by you or a third party)
519
+ that supports equivalent copying facilities, provided you maintain
520
+ clear directions next to the object code saying where to find the
521
+ Corresponding Source. Regardless of what server hosts the
522
+ Corresponding Source, you remain obligated to ensure that it is
523
+ available for as long as needed to satisfy these requirements.
524
+
525
+ e) Convey the object code using peer-to-peer transmission, provided
526
+ you inform other peers where the object code and Corresponding
527
+ Source of the work are being offered to the general public at no
528
+ charge under subsection 6d.
529
+
530
+ A separable portion of the object code, whose source code is excluded
531
+ from the Corresponding Source as a System Library, need not be
532
+ included in conveying the object code work.
533
+
534
+ A "User Product" is either (1) a "consumer product", which means any
535
+ tangible personal property which is normally used for personal, family,
536
+ or household purposes, or (2) anything designed or sold for incorporation
537
+ into a dwelling. In determining whether a product is a consumer product,
538
+ doubtful cases shall be resolved in favor of coverage. For a particular
539
+ product received by a particular user, "normally used" refers to a
540
+ typical or common use of that class of product, regardless of the status
541
+ of the particular user or of the way in which the particular user
542
+ actually uses, or expects or is expected to use, the product. A product
543
+ is a consumer product regardless of whether the product has substantial
544
+ commercial, industrial or non-consumer uses, unless such uses represent
545
+ the only significant mode of use of the product.
546
+
547
+ "Installation Information" for a User Product means any methods,
548
+ procedures, authorization keys, or other information required to install
549
+ and execute modified versions of a covered work in that User Product from
550
+ a modified version of its Corresponding Source. The information must
551
+ suffice to ensure that the continued functioning of the modified object
552
+ code is in no case prevented or interfered with solely because
553
+ modification has been made.
554
+
555
+ If you convey an object code work under this section in, or with, or
556
+ specifically for use in, a User Product, and the conveying occurs as
557
+ part of a transaction in which the right of possession and use of the
558
+ User Product is transferred to the recipient in perpetuity or for a
559
+ fixed term (regardless of how the transaction is characterized), the
560
+ Corresponding Source conveyed under this section must be accompanied
561
+ by the Installation Information. But this requirement does not apply
562
+ if neither you nor any third party retains the ability to install
563
+ modified object code on the User Product (for example, the work has
564
+ been installed in ROM).
565
+
566
+ The requirement to provide Installation Information does not include a
567
+ requirement to continue to provide support service, warranty, or updates
568
+ for a work that has been modified or installed by the recipient, or for
569
+ the User Product in which it has been modified or installed. Access to a
570
+ network may be denied when the modification itself materially and
571
+ adversely affects the operation of the network or violates the rules and
572
+ protocols for communication across the network.
573
+
574
+ Corresponding Source conveyed, and Installation Information provided,
575
+ in accord with this section must be in a format that is publicly
576
+ documented (and with an implementation available to the public in
577
+ source code form), and must require no special password or key for
578
+ unpacking, reading or copying.
579
+
580
+ 7. Additional Terms.
581
+
582
+ "Additional permissions" are terms that supplement the terms of this
583
+ License by making exceptions from one or more of its conditions.
584
+ Additional permissions that are applicable to the entire Program shall
585
+ be treated as though they were included in this License, to the extent
586
+ that they are valid under applicable law. If additional permissions
587
+ apply only to part of the Program, that part may be used separately
588
+ under those permissions, but the entire Program remains governed by
589
+ this License without regard to the additional permissions.
590
+
591
+ When you convey a copy of a covered work, you may at your option
592
+ remove any additional permissions from that copy, or from any part of
593
+ it. (Additional permissions may be written to require their own
594
+ removal in certain cases when you modify the work.) You may place
595
+ additional permissions on material, added by you to a covered work,
596
+ for which you have or can give appropriate copyright permission.
597
+
598
+ Notwithstanding any other provision of this License, for material you
599
+ add to a covered work, you may (if authorized by the copyright holders of
600
+ that material) supplement the terms of this License with terms:
601
+
602
+ a) Disclaiming warranty or limiting liability differently from the
603
+ terms of sections 15 and 16 of this License; or
604
+
605
+ b) Requiring preservation of specified reasonable legal notices or
606
+ author attributions in that material or in the Appropriate Legal
607
+ Notices displayed by works containing it; or
608
+
609
+ c) Prohibiting misrepresentation of the origin of that material, or
610
+ requiring that modified versions of such material be marked in
611
+ reasonable ways as different from the original version; or
612
+
613
+ d) Limiting the use for publicity purposes of names of licensors or
614
+ authors of the material; or
615
+
616
+ e) Declining to grant rights under trademark law for use of some
617
+ trade names, trademarks, or service marks; or
618
+
619
+ f) Requiring indemnification of licensors and authors of that
620
+ material by anyone who conveys the material (or modified versions of
621
+ it) with contractual assumptions of liability to the recipient, for
622
+ any liability that these contractual assumptions directly impose on
623
+ those licensors and authors.
624
+
625
+ All other non-permissive additional terms are considered "further
626
+ restrictions" within the meaning of section 10. If the Program as you
627
+ received it, or any part of it, contains a notice stating that it is
628
+ governed by this License along with a term that is a further
629
+ restriction, you may remove that term. If a license document contains
630
+ a further restriction but permits relicensing or conveying under this
631
+ License, you may add to a covered work material governed by the terms
632
+ of that license document, provided that the further restriction does
633
+ not survive such relicensing or conveying.
634
+
635
+ If you add terms to a covered work in accord with this section, you
636
+ must place, in the relevant source files, a statement of the
637
+ additional terms that apply to those files, or a notice indicating
638
+ where to find the applicable terms.
639
+
640
+ Additional terms, permissive or non-permissive, may be stated in the
641
+ form of a separately written license, or stated as exceptions;
642
+ the above requirements apply either way.
643
+
644
+ 8. Termination.
645
+
646
+ You may not propagate or modify a covered work except as expressly
647
+ provided under this License. Any attempt otherwise to propagate or
648
+ modify it is void, and will automatically terminate your rights under
649
+ this License (including any patent licenses granted under the third
650
+ paragraph of section 11).
651
+
652
+ However, if you cease all violation of this License, then your
653
+ license from a particular copyright holder is reinstated (a)
654
+ provisionally, unless and until the copyright holder explicitly and
655
+ finally terminates your license, and (b) permanently, if the copyright
656
+ holder fails to notify you of the violation by some reasonable means
657
+ prior to 60 days after the cessation.
658
+
659
+ Moreover, your license from a particular copyright holder is
660
+ reinstated permanently if the copyright holder notifies you of the
661
+ violation by some reasonable means, this is the first time you have
662
+ received notice of violation of this License (for any work) from that
663
+ copyright holder, and you cure the violation prior to 30 days after
664
+ your receipt of the notice.
665
+
666
+ Termination of your rights under this section does not terminate the
667
+ licenses of parties who have received copies or rights from you under
668
+ this License. If your rights have been terminated and not permanently
669
+ reinstated, you do not qualify to receive new licenses for the same
670
+ material under section 10.
671
+
672
+ 9. Acceptance Not Required for Having Copies.
673
+
674
+ You are not required to accept this License in order to receive or
675
+ run a copy of the Program. Ancillary propagation of a covered work
676
+ occurring solely as a consequence of using peer-to-peer transmission
677
+ to receive a copy likewise does not require acceptance. However,
678
+ nothing other than this License grants you permission to propagate or
679
+ modify any covered work. These actions infringe copyright if you do
680
+ not accept this License. Therefore, by modifying or propagating a
681
+ covered work, you indicate your acceptance of this License to do so.
682
+
683
+ 10. Automatic Licensing of Downstream Recipients.
684
+
685
+ Each time you convey a covered work, the recipient automatically
686
+ receives a license from the original licensors, to run, modify and
687
+ propagate that work, subject to this License. You are not responsible
688
+ for enforcing compliance by third parties with this License.
689
+
690
+ An "entity transaction" is a transaction transferring control of an
691
+ organization, or substantially all assets of one, or subdividing an
692
+ organization, or merging organizations. If propagation of a covered
693
+ work results from an entity transaction, each party to that
694
+ transaction who receives a copy of the work also receives whatever
695
+ licenses to the work the party's predecessor in interest had or could
696
+ give under the previous paragraph, plus a right to possession of the
697
+ Corresponding Source of the work from the predecessor in interest, if
698
+ the predecessor has it or can get it with reasonable efforts.
699
+
700
+ You may not impose any further restrictions on the exercise of the
701
+ rights granted or affirmed under this License. For example, you may
702
+ not impose a license fee, royalty, or other charge for exercise of
703
+ rights granted under this License, and you may not initiate litigation
704
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
705
+ any patent claim is infringed by making, using, selling, offering for
706
+ sale, or importing the Program or any portion of it.
707
+
708
+ 11. Patents.
709
+
710
+ A "contributor" is a copyright holder who authorizes use under this
711
+ License of the Program or a work on which the Program is based. The
712
+ work thus licensed is called the contributor's "contributor version".
713
+
714
+ A contributor's "essential patent claims" are all patent claims
715
+ owned or controlled by the contributor, whether already acquired or
716
+ hereafter acquired, that would be infringed by some manner, permitted
717
+ by this License, of making, using, or selling its contributor version,
718
+ but do not include claims that would be infringed only as a
719
+ consequence of further modification of the contributor version. For
720
+ purposes of this definition, "control" includes the right to grant
721
+ patent sublicenses in a manner consistent with the requirements of
722
+ this License.
723
+
724
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
725
+ patent license under the contributor's essential patent claims, to
726
+ make, use, sell, offer for sale, import and otherwise run, modify and
727
+ propagate the contents of its contributor version.
728
+
729
+ In the following three paragraphs, a "patent license" is any express
730
+ agreement or commitment, however denominated, not to enforce a patent
731
+ (such as an express permission to practice a patent or covenant not to
732
+ sue for patent infringement). To "grant" such a patent license to a
733
+ party means to make such an agreement or commitment not to enforce a
734
+ patent against the party.
735
+
736
+ If you convey a covered work, knowingly relying on a patent license,
737
+ and the Corresponding Source of the work is not available for anyone
738
+ to copy, free of charge and under the terms of this License, through a
739
+ publicly available network server or other readily accessible means,
740
+ then you must either (1) cause the Corresponding Source to be so
741
+ available, or (2) arrange to deprive yourself of the benefit of the
742
+ patent license for this particular work, or (3) arrange, in a manner
743
+ consistent with the requirements of this License, to extend the patent
744
+ license to downstream recipients. "Knowingly relying" means you have
745
+ actual knowledge that, but for the patent license, your conveying the
746
+ covered work in a country, or your recipient's use of the covered work
747
+ in a country, would infringe one or more identifiable patents in that
748
+ country that you have reason to believe are valid.
749
+
750
+ If, pursuant to or in connection with a single transaction or
751
+ arrangement, you convey, or propagate by procuring conveyance of, a
752
+ covered work, and grant a patent license to some of the parties
753
+ receiving the covered work authorizing them to use, propagate, modify
754
+ or convey a specific copy of the covered work, then the patent license
755
+ you grant is automatically extended to all recipients of the covered
756
+ work and works based on it.
757
+
758
+ A patent license is "discriminatory" if it does not include within
759
+ the scope of its coverage, prohibits the exercise of, or is
760
+ conditioned on the non-exercise of one or more of the rights that are
761
+ specifically granted under this License. You may not convey a covered
762
+ work if you are a party to an arrangement with a third party that is
763
+ in the business of distributing software, under which you make payment
764
+ to the third party based on the extent of your activity of conveying
765
+ the work, and under which the third party grants, to any of the
766
+ parties who would receive the covered work from you, a discriminatory
767
+ patent license (a) in connection with copies of the covered work
768
+ conveyed by you (or copies made from those copies), or (b) primarily
769
+ for and in connection with specific products or compilations that
770
+ contain the covered work, unless you entered into that arrangement,
771
+ or that patent license was granted, prior to 28 March 2007.
772
+
773
+ Nothing in this License shall be construed as excluding or limiting
774
+ any implied license or other defenses to infringement that may
775
+ otherwise be available to you under applicable patent law.
776
+
777
+ 12. No Surrender of Others' Freedom.
778
+
779
+ If conditions are imposed on you (whether by court order, agreement or
780
+ otherwise) that contradict the conditions of this License, they do not
781
+ excuse you from the conditions of this License. If you cannot convey a
782
+ covered work so as to satisfy simultaneously your obligations under this
783
+ License and any other pertinent obligations, then as a consequence you may
784
+ not convey it at all. For example, if you agree to terms that obligate you
785
+ to collect a royalty for further conveying from those to whom you convey
786
+ the Program, the only way you could satisfy both those terms and this
787
+ License would be to refrain entirely from conveying the Program.
788
+
789
+ 13. Use with the GNU Affero General Public License.
790
+
791
+ Notwithstanding any other provision of this License, you have
792
+ permission to link or combine any covered work with a work licensed
793
+ under version 3 of the GNU Affero General Public License into a single
794
+ combined work, and to convey the resulting work. The terms of this
795
+ License will continue to apply to the part which is the covered work,
796
+ but the special requirements of the GNU Affero General Public License,
797
+ section 13, concerning interaction through a network will apply to the
798
+ combination as such.
799
+
800
+ 14. Revised Versions of this License.
801
+
802
+ The Free Software Foundation may publish revised and/or new versions of
803
+ the GNU General Public License from time to time. Such new versions will
804
+ be similar in spirit to the present version, but may differ in detail to
805
+ address new problems or concerns.
806
+
807
+ Each version is given a distinguishing version number. If the
808
+ Program specifies that a certain numbered version of the GNU General
809
+ Public License "or any later version" applies to it, you have the
810
+ option of following the terms and conditions either of that numbered
811
+ version or of any later version published by the Free Software
812
+ Foundation. If the Program does not specify a version number of the
813
+ GNU General Public License, you may choose any version ever published
814
+ by the Free Software Foundation.
815
+
816
+ If the Program specifies that a proxy can decide which future
817
+ versions of the GNU General Public License can be used, that proxy's
818
+ public statement of acceptance of a version permanently authorizes you
819
+ to choose that version for the Program.
820
+
821
+ Later license versions may give you additional or different
822
+ permissions. However, no additional obligations are imposed on any
823
+ author or copyright holder as a result of your choosing to follow a
824
+ later version.
825
+
826
+ 15. Disclaimer of Warranty.
827
+
828
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
829
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
830
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
831
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
832
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
833
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
834
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
835
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
836
+
837
+ 16. Limitation of Liability.
838
+
839
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
840
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
841
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
842
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
843
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
844
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
845
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
846
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
847
+ SUCH DAMAGES.
848
+
849
+ 17. Interpretation of Sections 15 and 16.
850
+
851
+ If the disclaimer of warranty and limitation of liability provided
852
+ above cannot be given local legal effect according to their terms,
853
+ reviewing courts shall apply local law that most closely approximates
854
+ an absolute waiver of all civil liability in connection with the
855
+ Program, unless a warranty or assumption of liability accompanies a
856
+ copy of the Program in return for a fee.
857
+
858
+ END OF TERMS AND CONDITIONS
859
+
860
+ How to Apply These Terms to Your New Programs
861
+
862
+ If you develop a new program, and you want it to be of the greatest
863
+ possible use to the public, the best way to achieve this is to make it
864
+ free software which everyone can redistribute and change under these terms.
865
+
866
+ To do so, attach the following notices to the program. It is safest
867
+ to attach them to the start of each source file to most effectively
868
+ state the exclusion of warranty; and each file should have at least
869
+ the "copyright" line and a pointer to where the full notice is found.
870
+
871
+ <one line to give the program's name and a brief idea of what it does.>
872
+ Copyright (C) <year> <name of author>
873
+
874
+ This program is free software: you can redistribute it and/or modify
875
+ it under the terms of the GNU General Public License as published by
876
+ the Free Software Foundation, either version 3 of the License, or
877
+ (at your option) any later version.
878
+
879
+ This program is distributed in the hope that it will be useful,
880
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
881
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
882
+ GNU General Public License for more details.
883
+
884
+ You should have received a copy of the GNU General Public License
885
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
886
+
887
+ Also add information on how to contact you by electronic and paper mail.
888
+
889
+ If the program does terminal interaction, make it output a short
890
+ notice like this when it starts in an interactive mode:
891
+
892
+ <program> Copyright (C) <year> <name of author>
893
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
894
+ This is free software, and you are welcome to redistribute it
895
+ under certain conditions; type `show c' for details.
896
+
897
+ The hypothetical commands `show w' and `show c' should show the appropriate
898
+ parts of the General Public License. Of course, your program's commands
899
+ might be different; for a GUI interface, you would use an "about box".
900
+
901
+ You should also get your employer (if you work as a programmer) or school,
902
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
903
+ For more information on this, and how to apply and follow the GNU GPL, see
904
+ <http://www.gnu.org/licenses/>.
905
+
906
+ The GNU General Public License does not permit incorporating your program
907
+ into proprietary programs. If your program is a subroutine library, you
908
+ may consider it more useful to permit linking proprietary applications with
909
+ the library. If this is what you want to do, use the GNU Lesser General
910
+ Public License instead of this License. But first, please read
911
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
912
+
913
+
914
+ Name: libquadmath
915
+ Files: scipy.libs/libquadmath*.so
916
+ Description: dynamically linked to files compiled with gcc
917
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
918
+ License: LGPL-2.1-or-later
919
+
920
+ GCC Quad-Precision Math Library
921
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
922
+ Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
923
+
924
+ This file is part of the libquadmath library.
925
+ Libquadmath is free software; you can redistribute it and/or
926
+ modify it under the terms of the GNU Library General Public
927
+ License as published by the Free Software Foundation; either
928
+ version 2.1 of the License, or (at your option) any later version.
929
+
930
+ Libquadmath is distributed in the hope that it will be useful,
931
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
932
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
933
+ Lesser General Public License for more details.
934
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/METADATA ADDED
@@ -0,0 +1,1082 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: scipy
3
+ Version: 1.15.3
4
+ Summary: Fundamental algorithms for scientific computing in Python
5
+ Maintainer-Email: SciPy Developers <scipy-dev@python.org>
6
+ License: Copyright (c) 2001-2002 Enthought, Inc. 2003-2024, SciPy Developers.
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions
11
+ are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright
14
+ notice, this list of conditions and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above
17
+ copyright notice, this list of conditions and the following
18
+ disclaimer in the documentation and/or other materials provided
19
+ with the distribution.
20
+
21
+ 3. Neither the name of the copyright holder nor the names of its
22
+ contributors may be used to endorse or promote products derived
23
+ from this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
+
37
+ ----
38
+
39
+ This binary distribution of SciPy can also bundle the following software
40
+ (depending on the build):
41
+
42
+
43
+ Name: OpenBLAS
44
+ Files: scipy.libs/libscipy_openblas*.so
45
+ Description: bundled as a dynamically linked library
46
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
47
+ License: BSD-3-Clause-Attribution
48
+ Copyright (c) 2011-2014, The OpenBLAS Project
49
+ All rights reserved.
50
+
51
+ Redistribution and use in source and binary forms, with or without
52
+ modification, are permitted provided that the following conditions are
53
+ met:
54
+
55
+ 1. Redistributions of source code must retain the above copyright
56
+ notice, this list of conditions and the following disclaimer.
57
+
58
+ 2. Redistributions in binary form must reproduce the above copyright
59
+ notice, this list of conditions and the following disclaimer in
60
+ the documentation and/or other materials provided with the
61
+ distribution.
62
+ 3. Neither the name of the OpenBLAS project nor the names of
63
+ its contributors may be used to endorse or promote products
64
+ derived from this software without specific prior written
65
+ permission.
66
+
67
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
68
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
69
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
70
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
71
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
72
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
73
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
74
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
75
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
76
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
77
+
78
+
79
+ Name: LAPACK
80
+ Files: scipy.libs/libscipy_openblas*.so
81
+ Description: bundled in OpenBLAS
82
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
83
+ License: BSD-3-Clause-Attribution
84
+ Copyright (c) 1992-2013 The University of Tennessee and The University
85
+ of Tennessee Research Foundation. All rights
86
+ reserved.
87
+ Copyright (c) 2000-2013 The University of California Berkeley. All
88
+ rights reserved.
89
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
90
+ reserved.
91
+
92
+ $COPYRIGHT$
93
+
94
+ Additional copyrights may follow
95
+
96
+ $HEADER$
97
+
98
+ Redistribution and use in source and binary forms, with or without
99
+ modification, are permitted provided that the following conditions are
100
+ met:
101
+
102
+ - Redistributions of source code must retain the above copyright
103
+ notice, this list of conditions and the following disclaimer.
104
+
105
+ - Redistributions in binary form must reproduce the above copyright
106
+ notice, this list of conditions and the following disclaimer listed
107
+ in this license in the documentation and/or other materials
108
+ provided with the distribution.
109
+
110
+ - Neither the name of the copyright holders nor the names of its
111
+ contributors may be used to endorse or promote products derived from
112
+ this software without specific prior written permission.
113
+
114
+ The copyright holders provide no reassurances that the source code
115
+ provided does not infringe any patent, copyright, or any other
116
+ intellectual property rights of third parties. The copyright holders
117
+ disclaim any liability to any recipient for claims brought against
118
+ recipient by any third party for infringement of that parties
119
+ intellectual property rights.
120
+
121
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
122
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
123
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
124
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
125
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
126
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
127
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
128
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
129
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
130
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
131
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
132
+
133
+
134
+ Name: GCC runtime library
135
+ Files: scipy.libs/libgfortran*.so
136
+ Description: dynamically linked to files compiled with gcc
137
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
138
+ License: GPL-3.0-with-GCC-exception
139
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
140
+
141
+ Libgfortran is free software; you can redistribute it and/or modify
142
+ it under the terms of the GNU General Public License as published by
143
+ the Free Software Foundation; either version 3, or (at your option)
144
+ any later version.
145
+
146
+ Libgfortran is distributed in the hope that it will be useful,
147
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
148
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149
+ GNU General Public License for more details.
150
+
151
+ Under Section 7 of GPL version 3, you are granted additional
152
+ permissions described in the GCC Runtime Library Exception, version
153
+ 3.1, as published by the Free Software Foundation.
154
+
155
+ You should have received a copy of the GNU General Public License and
156
+ a copy of the GCC Runtime Library Exception along with this program;
157
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
158
+ <http://www.gnu.org/licenses/>.
159
+
160
+ ----
161
+
162
+ Full text of license texts referred to above follows (that they are
163
+ listed below does not necessarily imply the conditions apply to the
164
+ present binary release):
165
+
166
+ ----
167
+
168
+ GCC RUNTIME LIBRARY EXCEPTION
169
+
170
+ Version 3.1, 31 March 2009
171
+
172
+ Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
173
+
174
+ Everyone is permitted to copy and distribute verbatim copies of this
175
+ license document, but changing it is not allowed.
176
+
177
+ This GCC Runtime Library Exception ("Exception") is an additional
178
+ permission under section 7 of the GNU General Public License, version
179
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
180
+ bears a notice placed by the copyright holder of the file stating that
181
+ the file is governed by GPLv3 along with this Exception.
182
+
183
+ When you use GCC to compile a program, GCC may combine portions of
184
+ certain GCC header files and runtime libraries with the compiled
185
+ program. The purpose of this Exception is to allow compilation of
186
+ non-GPL (including proprietary) programs to use, in this way, the
187
+ header files and runtime libraries covered by this Exception.
188
+
189
+ 0. Definitions.
190
+
191
+ A file is an "Independent Module" if it either requires the Runtime
192
+ Library for execution after a Compilation Process, or makes use of an
193
+ interface provided by the Runtime Library, but is not otherwise based
194
+ on the Runtime Library.
195
+
196
+ "GCC" means a version of the GNU Compiler Collection, with or without
197
+ modifications, governed by version 3 (or a specified later version) of
198
+ the GNU General Public License (GPL) with the option of using any
199
+ subsequent versions published by the FSF.
200
+
201
+ "GPL-compatible Software" is software whose conditions of propagation,
202
+ modification and use would permit combination with GCC in accord with
203
+ the license of GCC.
204
+
205
+ "Target Code" refers to output from any compiler for a real or virtual
206
+ target processor architecture, in executable form or suitable for
207
+ input to an assembler, loader, linker and/or execution
208
+ phase. Notwithstanding that, Target Code does not include data in any
209
+ format that is used as a compiler intermediate representation, or used
210
+ for producing a compiler intermediate representation.
211
+
212
+ The "Compilation Process" transforms code entirely represented in
213
+ non-intermediate languages designed for human-written code, and/or in
214
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
215
+ use of source code generators and preprocessors need not be considered
216
+ part of the Compilation Process, since the Compilation Process can be
217
+ understood as starting with the output of the generators or
218
+ preprocessors.
219
+
220
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
221
+ with other GPL-compatible software, or if it is done without using any
222
+ work based on GCC. For example, using non-GPL-compatible Software to
223
+ optimize any GCC intermediate representations would not qualify as an
224
+ Eligible Compilation Process.
225
+
226
+ 1. Grant of Additional Permission.
227
+
228
+ You have permission to propagate a work of Target Code formed by
229
+ combining the Runtime Library with Independent Modules, even if such
230
+ propagation would otherwise violate the terms of GPLv3, provided that
231
+ all Target Code was generated by Eligible Compilation Processes. You
232
+ may then convey such a combination under terms of your choice,
233
+ consistent with the licensing of the Independent Modules.
234
+
235
+ 2. No Weakening of GCC Copyleft.
236
+
237
+ The availability of this Exception does not imply any general
238
+ presumption that third-party software is unaffected by the copyleft
239
+ requirements of the license of GCC.
240
+
241
+ ----
242
+
243
+ GNU GENERAL PUBLIC LICENSE
244
+ Version 3, 29 June 2007
245
+
246
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
247
+ Everyone is permitted to copy and distribute verbatim copies
248
+ of this license document, but changing it is not allowed.
249
+
250
+ Preamble
251
+
252
+ The GNU General Public License is a free, copyleft license for
253
+ software and other kinds of works.
254
+
255
+ The licenses for most software and other practical works are designed
256
+ to take away your freedom to share and change the works. By contrast,
257
+ the GNU General Public License is intended to guarantee your freedom to
258
+ share and change all versions of a program--to make sure it remains free
259
+ software for all its users. We, the Free Software Foundation, use the
260
+ GNU General Public License for most of our software; it applies also to
261
+ any other work released this way by its authors. You can apply it to
262
+ your programs, too.
263
+
264
+ When we speak of free software, we are referring to freedom, not
265
+ price. Our General Public Licenses are designed to make sure that you
266
+ have the freedom to distribute copies of free software (and charge for
267
+ them if you wish), that you receive source code or can get it if you
268
+ want it, that you can change the software or use pieces of it in new
269
+ free programs, and that you know you can do these things.
270
+
271
+ To protect your rights, we need to prevent others from denying you
272
+ these rights or asking you to surrender the rights. Therefore, you have
273
+ certain responsibilities if you distribute copies of the software, or if
274
+ you modify it: responsibilities to respect the freedom of others.
275
+
276
+ For example, if you distribute copies of such a program, whether
277
+ gratis or for a fee, you must pass on to the recipients the same
278
+ freedoms that you received. You must make sure that they, too, receive
279
+ or can get the source code. And you must show them these terms so they
280
+ know their rights.
281
+
282
+ Developers that use the GNU GPL protect your rights with two steps:
283
+ (1) assert copyright on the software, and (2) offer you this License
284
+ giving you legal permission to copy, distribute and/or modify it.
285
+
286
+ For the developers' and authors' protection, the GPL clearly explains
287
+ that there is no warranty for this free software. For both users' and
288
+ authors' sake, the GPL requires that modified versions be marked as
289
+ changed, so that their problems will not be attributed erroneously to
290
+ authors of previous versions.
291
+
292
+ Some devices are designed to deny users access to install or run
293
+ modified versions of the software inside them, although the manufacturer
294
+ can do so. This is fundamentally incompatible with the aim of
295
+ protecting users' freedom to change the software. The systematic
296
+ pattern of such abuse occurs in the area of products for individuals to
297
+ use, which is precisely where it is most unacceptable. Therefore, we
298
+ have designed this version of the GPL to prohibit the practice for those
299
+ products. If such problems arise substantially in other domains, we
300
+ stand ready to extend this provision to those domains in future versions
301
+ of the GPL, as needed to protect the freedom of users.
302
+
303
+ Finally, every program is threatened constantly by software patents.
304
+ States should not allow patents to restrict development and use of
305
+ software on general-purpose computers, but in those that do, we wish to
306
+ avoid the special danger that patents applied to a free program could
307
+ make it effectively proprietary. To prevent this, the GPL assures that
308
+ patents cannot be used to render the program non-free.
309
+
310
+ The precise terms and conditions for copying, distribution and
311
+ modification follow.
312
+
313
+ TERMS AND CONDITIONS
314
+
315
+ 0. Definitions.
316
+
317
+ "This License" refers to version 3 of the GNU General Public License.
318
+
319
+ "Copyright" also means copyright-like laws that apply to other kinds of
320
+ works, such as semiconductor masks.
321
+
322
+ "The Program" refers to any copyrightable work licensed under this
323
+ License. Each licensee is addressed as "you". "Licensees" and
324
+ "recipients" may be individuals or organizations.
325
+
326
+ To "modify" a work means to copy from or adapt all or part of the work
327
+ in a fashion requiring copyright permission, other than the making of an
328
+ exact copy. The resulting work is called a "modified version" of the
329
+ earlier work or a work "based on" the earlier work.
330
+
331
+ A "covered work" means either the unmodified Program or a work based
332
+ on the Program.
333
+
334
+ To "propagate" a work means to do anything with it that, without
335
+ permission, would make you directly or secondarily liable for
336
+ infringement under applicable copyright law, except executing it on a
337
+ computer or modifying a private copy. Propagation includes copying,
338
+ distribution (with or without modification), making available to the
339
+ public, and in some countries other activities as well.
340
+
341
+ To "convey" a work means any kind of propagation that enables other
342
+ parties to make or receive copies. Mere interaction with a user through
343
+ a computer network, with no transfer of a copy, is not conveying.
344
+
345
+ An interactive user interface displays "Appropriate Legal Notices"
346
+ to the extent that it includes a convenient and prominently visible
347
+ feature that (1) displays an appropriate copyright notice, and (2)
348
+ tells the user that there is no warranty for the work (except to the
349
+ extent that warranties are provided), that licensees may convey the
350
+ work under this License, and how to view a copy of this License. If
351
+ the interface presents a list of user commands or options, such as a
352
+ menu, a prominent item in the list meets this criterion.
353
+
354
+ 1. Source Code.
355
+
356
+ The "source code" for a work means the preferred form of the work
357
+ for making modifications to it. "Object code" means any non-source
358
+ form of a work.
359
+
360
+ A "Standard Interface" means an interface that either is an official
361
+ standard defined by a recognized standards body, or, in the case of
362
+ interfaces specified for a particular programming language, one that
363
+ is widely used among developers working in that language.
364
+
365
+ The "System Libraries" of an executable work include anything, other
366
+ than the work as a whole, that (a) is included in the normal form of
367
+ packaging a Major Component, but which is not part of that Major
368
+ Component, and (b) serves only to enable use of the work with that
369
+ Major Component, or to implement a Standard Interface for which an
370
+ implementation is available to the public in source code form. A
371
+ "Major Component", in this context, means a major essential component
372
+ (kernel, window system, and so on) of the specific operating system
373
+ (if any) on which the executable work runs, or a compiler used to
374
+ produce the work, or an object code interpreter used to run it.
375
+
376
+ The "Corresponding Source" for a work in object code form means all
377
+ the source code needed to generate, install, and (for an executable
378
+ work) run the object code and to modify the work, including scripts to
379
+ control those activities. However, it does not include the work's
380
+ System Libraries, or general-purpose tools or generally available free
381
+ programs which are used unmodified in performing those activities but
382
+ which are not part of the work. For example, Corresponding Source
383
+ includes interface definition files associated with source files for
384
+ the work, and the source code for shared libraries and dynamically
385
+ linked subprograms that the work is specifically designed to require,
386
+ such as by intimate data communication or control flow between those
387
+ subprograms and other parts of the work.
388
+
389
+ The Corresponding Source need not include anything that users
390
+ can regenerate automatically from other parts of the Corresponding
391
+ Source.
392
+
393
+ The Corresponding Source for a work in source code form is that
394
+ same work.
395
+
396
+ 2. Basic Permissions.
397
+
398
+ All rights granted under this License are granted for the term of
399
+ copyright on the Program, and are irrevocable provided the stated
400
+ conditions are met. This License explicitly affirms your unlimited
401
+ permission to run the unmodified Program. The output from running a
402
+ covered work is covered by this License only if the output, given its
403
+ content, constitutes a covered work. This License acknowledges your
404
+ rights of fair use or other equivalent, as provided by copyright law.
405
+
406
+ You may make, run and propagate covered works that you do not
407
+ convey, without conditions so long as your license otherwise remains
408
+ in force. You may convey covered works to others for the sole purpose
409
+ of having them make modifications exclusively for you, or provide you
410
+ with facilities for running those works, provided that you comply with
411
+ the terms of this License in conveying all material for which you do
412
+ not control copyright. Those thus making or running the covered works
413
+ for you must do so exclusively on your behalf, under your direction
414
+ and control, on terms that prohibit them from making any copies of
415
+ your copyrighted material outside their relationship with you.
416
+
417
+ Conveying under any other circumstances is permitted solely under
418
+ the conditions stated below. Sublicensing is not allowed; section 10
419
+ makes it unnecessary.
420
+
421
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
422
+
423
+ No covered work shall be deemed part of an effective technological
424
+ measure under any applicable law fulfilling obligations under article
425
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
426
+ similar laws prohibiting or restricting circumvention of such
427
+ measures.
428
+
429
+ When you convey a covered work, you waive any legal power to forbid
430
+ circumvention of technological measures to the extent such circumvention
431
+ is effected by exercising rights under this License with respect to
432
+ the covered work, and you disclaim any intention to limit operation or
433
+ modification of the work as a means of enforcing, against the work's
434
+ users, your or third parties' legal rights to forbid circumvention of
435
+ technological measures.
436
+
437
+ 4. Conveying Verbatim Copies.
438
+
439
+ You may convey verbatim copies of the Program's source code as you
440
+ receive it, in any medium, provided that you conspicuously and
441
+ appropriately publish on each copy an appropriate copyright notice;
442
+ keep intact all notices stating that this License and any
443
+ non-permissive terms added in accord with section 7 apply to the code;
444
+ keep intact all notices of the absence of any warranty; and give all
445
+ recipients a copy of this License along with the Program.
446
+
447
+ You may charge any price or no price for each copy that you convey,
448
+ and you may offer support or warranty protection for a fee.
449
+
450
+ 5. Conveying Modified Source Versions.
451
+
452
+ You may convey a work based on the Program, or the modifications to
453
+ produce it from the Program, in the form of source code under the
454
+ terms of section 4, provided that you also meet all of these conditions:
455
+
456
+ a) The work must carry prominent notices stating that you modified
457
+ it, and giving a relevant date.
458
+
459
+ b) The work must carry prominent notices stating that it is
460
+ released under this License and any conditions added under section
461
+ 7. This requirement modifies the requirement in section 4 to
462
+ "keep intact all notices".
463
+
464
+ c) You must license the entire work, as a whole, under this
465
+ License to anyone who comes into possession of a copy. This
466
+ License will therefore apply, along with any applicable section 7
467
+ additional terms, to the whole of the work, and all its parts,
468
+ regardless of how they are packaged. This License gives no
469
+ permission to license the work in any other way, but it does not
470
+ invalidate such permission if you have separately received it.
471
+
472
+ d) If the work has interactive user interfaces, each must display
473
+ Appropriate Legal Notices; however, if the Program has interactive
474
+ interfaces that do not display Appropriate Legal Notices, your
475
+ work need not make them do so.
476
+
477
+ A compilation of a covered work with other separate and independent
478
+ works, which are not by their nature extensions of the covered work,
479
+ and which are not combined with it such as to form a larger program,
480
+ in or on a volume of a storage or distribution medium, is called an
481
+ "aggregate" if the compilation and its resulting copyright are not
482
+ used to limit the access or legal rights of the compilation's users
483
+ beyond what the individual works permit. Inclusion of a covered work
484
+ in an aggregate does not cause this License to apply to the other
485
+ parts of the aggregate.
486
+
487
+ 6. Conveying Non-Source Forms.
488
+
489
+ You may convey a covered work in object code form under the terms
490
+ of sections 4 and 5, provided that you also convey the
491
+ machine-readable Corresponding Source under the terms of this License,
492
+ in one of these ways:
493
+
494
+ a) Convey the object code in, or embodied in, a physical product
495
+ (including a physical distribution medium), accompanied by the
496
+ Corresponding Source fixed on a durable physical medium
497
+ customarily used for software interchange.
498
+
499
+ b) Convey the object code in, or embodied in, a physical product
500
+ (including a physical distribution medium), accompanied by a
501
+ written offer, valid for at least three years and valid for as
502
+ long as you offer spare parts or customer support for that product
503
+ model, to give anyone who possesses the object code either (1) a
504
+ copy of the Corresponding Source for all the software in the
505
+ product that is covered by this License, on a durable physical
506
+ medium customarily used for software interchange, for a price no
507
+ more than your reasonable cost of physically performing this
508
+ conveying of source, or (2) access to copy the
509
+ Corresponding Source from a network server at no charge.
510
+
511
+ c) Convey individual copies of the object code with a copy of the
512
+ written offer to provide the Corresponding Source. This
513
+ alternative is allowed only occasionally and noncommercially, and
514
+ only if you received the object code with such an offer, in accord
515
+ with subsection 6b.
516
+
517
+ d) Convey the object code by offering access from a designated
518
+ place (gratis or for a charge), and offer equivalent access to the
519
+ Corresponding Source in the same way through the same place at no
520
+ further charge. You need not require recipients to copy the
521
+ Corresponding Source along with the object code. If the place to
522
+ copy the object code is a network server, the Corresponding Source
523
+ may be on a different server (operated by you or a third party)
524
+ that supports equivalent copying facilities, provided you maintain
525
+ clear directions next to the object code saying where to find the
526
+ Corresponding Source. Regardless of what server hosts the
527
+ Corresponding Source, you remain obligated to ensure that it is
528
+ available for as long as needed to satisfy these requirements.
529
+
530
+ e) Convey the object code using peer-to-peer transmission, provided
531
+ you inform other peers where the object code and Corresponding
532
+ Source of the work are being offered to the general public at no
533
+ charge under subsection 6d.
534
+
535
+ A separable portion of the object code, whose source code is excluded
536
+ from the Corresponding Source as a System Library, need not be
537
+ included in conveying the object code work.
538
+
539
+ A "User Product" is either (1) a "consumer product", which means any
540
+ tangible personal property which is normally used for personal, family,
541
+ or household purposes, or (2) anything designed or sold for incorporation
542
+ into a dwelling. In determining whether a product is a consumer product,
543
+ doubtful cases shall be resolved in favor of coverage. For a particular
544
+ product received by a particular user, "normally used" refers to a
545
+ typical or common use of that class of product, regardless of the status
546
+ of the particular user or of the way in which the particular user
547
+ actually uses, or expects or is expected to use, the product. A product
548
+ is a consumer product regardless of whether the product has substantial
549
+ commercial, industrial or non-consumer uses, unless such uses represent
550
+ the only significant mode of use of the product.
551
+
552
+ "Installation Information" for a User Product means any methods,
553
+ procedures, authorization keys, or other information required to install
554
+ and execute modified versions of a covered work in that User Product from
555
+ a modified version of its Corresponding Source. The information must
556
+ suffice to ensure that the continued functioning of the modified object
557
+ code is in no case prevented or interfered with solely because
558
+ modification has been made.
559
+
560
+ If you convey an object code work under this section in, or with, or
561
+ specifically for use in, a User Product, and the conveying occurs as
562
+ part of a transaction in which the right of possession and use of the
563
+ User Product is transferred to the recipient in perpetuity or for a
564
+ fixed term (regardless of how the transaction is characterized), the
565
+ Corresponding Source conveyed under this section must be accompanied
566
+ by the Installation Information. But this requirement does not apply
567
+ if neither you nor any third party retains the ability to install
568
+ modified object code on the User Product (for example, the work has
569
+ been installed in ROM).
570
+
571
+ The requirement to provide Installation Information does not include a
572
+ requirement to continue to provide support service, warranty, or updates
573
+ for a work that has been modified or installed by the recipient, or for
574
+ the User Product in which it has been modified or installed. Access to a
575
+ network may be denied when the modification itself materially and
576
+ adversely affects the operation of the network or violates the rules and
577
+ protocols for communication across the network.
578
+
579
+ Corresponding Source conveyed, and Installation Information provided,
580
+ in accord with this section must be in a format that is publicly
581
+ documented (and with an implementation available to the public in
582
+ source code form), and must require no special password or key for
583
+ unpacking, reading or copying.
584
+
585
+ 7. Additional Terms.
586
+
587
+ "Additional permissions" are terms that supplement the terms of this
588
+ License by making exceptions from one or more of its conditions.
589
+ Additional permissions that are applicable to the entire Program shall
590
+ be treated as though they were included in this License, to the extent
591
+ that they are valid under applicable law. If additional permissions
592
+ apply only to part of the Program, that part may be used separately
593
+ under those permissions, but the entire Program remains governed by
594
+ this License without regard to the additional permissions.
595
+
596
+ When you convey a copy of a covered work, you may at your option
597
+ remove any additional permissions from that copy, or from any part of
598
+ it. (Additional permissions may be written to require their own
599
+ removal in certain cases when you modify the work.) You may place
600
+ additional permissions on material, added by you to a covered work,
601
+ for which you have or can give appropriate copyright permission.
602
+
603
+ Notwithstanding any other provision of this License, for material you
604
+ add to a covered work, you may (if authorized by the copyright holders of
605
+ that material) supplement the terms of this License with terms:
606
+
607
+ a) Disclaiming warranty or limiting liability differently from the
608
+ terms of sections 15 and 16 of this License; or
609
+
610
+ b) Requiring preservation of specified reasonable legal notices or
611
+ author attributions in that material or in the Appropriate Legal
612
+ Notices displayed by works containing it; or
613
+
614
+ c) Prohibiting misrepresentation of the origin of that material, or
615
+ requiring that modified versions of such material be marked in
616
+ reasonable ways as different from the original version; or
617
+
618
+ d) Limiting the use for publicity purposes of names of licensors or
619
+ authors of the material; or
620
+
621
+ e) Declining to grant rights under trademark law for use of some
622
+ trade names, trademarks, or service marks; or
623
+
624
+ f) Requiring indemnification of licensors and authors of that
625
+ material by anyone who conveys the material (or modified versions of
626
+ it) with contractual assumptions of liability to the recipient, for
627
+ any liability that these contractual assumptions directly impose on
628
+ those licensors and authors.
629
+
630
+ All other non-permissive additional terms are considered "further
631
+ restrictions" within the meaning of section 10. If the Program as you
632
+ received it, or any part of it, contains a notice stating that it is
633
+ governed by this License along with a term that is a further
634
+ restriction, you may remove that term. If a license document contains
635
+ a further restriction but permits relicensing or conveying under this
636
+ License, you may add to a covered work material governed by the terms
637
+ of that license document, provided that the further restriction does
638
+ not survive such relicensing or conveying.
639
+
640
+ If you add terms to a covered work in accord with this section, you
641
+ must place, in the relevant source files, a statement of the
642
+ additional terms that apply to those files, or a notice indicating
643
+ where to find the applicable terms.
644
+
645
+ Additional terms, permissive or non-permissive, may be stated in the
646
+ form of a separately written license, or stated as exceptions;
647
+ the above requirements apply either way.
648
+
649
+ 8. Termination.
650
+
651
+ You may not propagate or modify a covered work except as expressly
652
+ provided under this License. Any attempt otherwise to propagate or
653
+ modify it is void, and will automatically terminate your rights under
654
+ this License (including any patent licenses granted under the third
655
+ paragraph of section 11).
656
+
657
+ However, if you cease all violation of this License, then your
658
+ license from a particular copyright holder is reinstated (a)
659
+ provisionally, unless and until the copyright holder explicitly and
660
+ finally terminates your license, and (b) permanently, if the copyright
661
+ holder fails to notify you of the violation by some reasonable means
662
+ prior to 60 days after the cessation.
663
+
664
+ Moreover, your license from a particular copyright holder is
665
+ reinstated permanently if the copyright holder notifies you of the
666
+ violation by some reasonable means, this is the first time you have
667
+ received notice of violation of this License (for any work) from that
668
+ copyright holder, and you cure the violation prior to 30 days after
669
+ your receipt of the notice.
670
+
671
+ Termination of your rights under this section does not terminate the
672
+ licenses of parties who have received copies or rights from you under
673
+ this License. If your rights have been terminated and not permanently
674
+ reinstated, you do not qualify to receive new licenses for the same
675
+ material under section 10.
676
+
677
+ 9. Acceptance Not Required for Having Copies.
678
+
679
+ You are not required to accept this License in order to receive or
680
+ run a copy of the Program. Ancillary propagation of a covered work
681
+ occurring solely as a consequence of using peer-to-peer transmission
682
+ to receive a copy likewise does not require acceptance. However,
683
+ nothing other than this License grants you permission to propagate or
684
+ modify any covered work. These actions infringe copyright if you do
685
+ not accept this License. Therefore, by modifying or propagating a
686
+ covered work, you indicate your acceptance of this License to do so.
687
+
688
+ 10. Automatic Licensing of Downstream Recipients.
689
+
690
+ Each time you convey a covered work, the recipient automatically
691
+ receives a license from the original licensors, to run, modify and
692
+ propagate that work, subject to this License. You are not responsible
693
+ for enforcing compliance by third parties with this License.
694
+
695
+ An "entity transaction" is a transaction transferring control of an
696
+ organization, or substantially all assets of one, or subdividing an
697
+ organization, or merging organizations. If propagation of a covered
698
+ work results from an entity transaction, each party to that
699
+ transaction who receives a copy of the work also receives whatever
700
+ licenses to the work the party's predecessor in interest had or could
701
+ give under the previous paragraph, plus a right to possession of the
702
+ Corresponding Source of the work from the predecessor in interest, if
703
+ the predecessor has it or can get it with reasonable efforts.
704
+
705
+ You may not impose any further restrictions on the exercise of the
706
+ rights granted or affirmed under this License. For example, you may
707
+ not impose a license fee, royalty, or other charge for exercise of
708
+ rights granted under this License, and you may not initiate litigation
709
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
710
+ any patent claim is infringed by making, using, selling, offering for
711
+ sale, or importing the Program or any portion of it.
712
+
713
+ 11. Patents.
714
+
715
+ A "contributor" is a copyright holder who authorizes use under this
716
+ License of the Program or a work on which the Program is based. The
717
+ work thus licensed is called the contributor's "contributor version".
718
+
719
+ A contributor's "essential patent claims" are all patent claims
720
+ owned or controlled by the contributor, whether already acquired or
721
+ hereafter acquired, that would be infringed by some manner, permitted
722
+ by this License, of making, using, or selling its contributor version,
723
+ but do not include claims that would be infringed only as a
724
+ consequence of further modification of the contributor version. For
725
+ purposes of this definition, "control" includes the right to grant
726
+ patent sublicenses in a manner consistent with the requirements of
727
+ this License.
728
+
729
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
730
+ patent license under the contributor's essential patent claims, to
731
+ make, use, sell, offer for sale, import and otherwise run, modify and
732
+ propagate the contents of its contributor version.
733
+
734
+ In the following three paragraphs, a "patent license" is any express
735
+ agreement or commitment, however denominated, not to enforce a patent
736
+ (such as an express permission to practice a patent or covenant not to
737
+ sue for patent infringement). To "grant" such a patent license to a
738
+ party means to make such an agreement or commitment not to enforce a
739
+ patent against the party.
740
+
741
+ If you convey a covered work, knowingly relying on a patent license,
742
+ and the Corresponding Source of the work is not available for anyone
743
+ to copy, free of charge and under the terms of this License, through a
744
+ publicly available network server or other readily accessible means,
745
+ then you must either (1) cause the Corresponding Source to be so
746
+ available, or (2) arrange to deprive yourself of the benefit of the
747
+ patent license for this particular work, or (3) arrange, in a manner
748
+ consistent with the requirements of this License, to extend the patent
749
+ license to downstream recipients. "Knowingly relying" means you have
750
+ actual knowledge that, but for the patent license, your conveying the
751
+ covered work in a country, or your recipient's use of the covered work
752
+ in a country, would infringe one or more identifiable patents in that
753
+ country that you have reason to believe are valid.
754
+
755
+ If, pursuant to or in connection with a single transaction or
756
+ arrangement, you convey, or propagate by procuring conveyance of, a
757
+ covered work, and grant a patent license to some of the parties
758
+ receiving the covered work authorizing them to use, propagate, modify
759
+ or convey a specific copy of the covered work, then the patent license
760
+ you grant is automatically extended to all recipients of the covered
761
+ work and works based on it.
762
+
763
+ A patent license is "discriminatory" if it does not include within
764
+ the scope of its coverage, prohibits the exercise of, or is
765
+ conditioned on the non-exercise of one or more of the rights that are
766
+ specifically granted under this License. You may not convey a covered
767
+ work if you are a party to an arrangement with a third party that is
768
+ in the business of distributing software, under which you make payment
769
+ to the third party based on the extent of your activity of conveying
770
+ the work, and under which the third party grants, to any of the
771
+ parties who would receive the covered work from you, a discriminatory
772
+ patent license (a) in connection with copies of the covered work
773
+ conveyed by you (or copies made from those copies), or (b) primarily
774
+ for and in connection with specific products or compilations that
775
+ contain the covered work, unless you entered into that arrangement,
776
+ or that patent license was granted, prior to 28 March 2007.
777
+
778
+ Nothing in this License shall be construed as excluding or limiting
779
+ any implied license or other defenses to infringement that may
780
+ otherwise be available to you under applicable patent law.
781
+
782
+ 12. No Surrender of Others' Freedom.
783
+
784
+ If conditions are imposed on you (whether by court order, agreement or
785
+ otherwise) that contradict the conditions of this License, they do not
786
+ excuse you from the conditions of this License. If you cannot convey a
787
+ covered work so as to satisfy simultaneously your obligations under this
788
+ License and any other pertinent obligations, then as a consequence you may
789
+ not convey it at all. For example, if you agree to terms that obligate you
790
+ to collect a royalty for further conveying from those to whom you convey
791
+ the Program, the only way you could satisfy both those terms and this
792
+ License would be to refrain entirely from conveying the Program.
793
+
794
+ 13. Use with the GNU Affero General Public License.
795
+
796
+ Notwithstanding any other provision of this License, you have
797
+ permission to link or combine any covered work with a work licensed
798
+ under version 3 of the GNU Affero General Public License into a single
799
+ combined work, and to convey the resulting work. The terms of this
800
+ License will continue to apply to the part which is the covered work,
801
+ but the special requirements of the GNU Affero General Public License,
802
+ section 13, concerning interaction through a network will apply to the
803
+ combination as such.
804
+
805
+ 14. Revised Versions of this License.
806
+
807
+ The Free Software Foundation may publish revised and/or new versions of
808
+ the GNU General Public License from time to time. Such new versions will
809
+ be similar in spirit to the present version, but may differ in detail to
810
+ address new problems or concerns.
811
+
812
+ Each version is given a distinguishing version number. If the
813
+ Program specifies that a certain numbered version of the GNU General
814
+ Public License "or any later version" applies to it, you have the
815
+ option of following the terms and conditions either of that numbered
816
+ version or of any later version published by the Free Software
817
+ Foundation. If the Program does not specify a version number of the
818
+ GNU General Public License, you may choose any version ever published
819
+ by the Free Software Foundation.
820
+
821
+ If the Program specifies that a proxy can decide which future
822
+ versions of the GNU General Public License can be used, that proxy's
823
+ public statement of acceptance of a version permanently authorizes you
824
+ to choose that version for the Program.
825
+
826
+ Later license versions may give you additional or different
827
+ permissions. However, no additional obligations are imposed on any
828
+ author or copyright holder as a result of your choosing to follow a
829
+ later version.
830
+
831
+ 15. Disclaimer of Warranty.
832
+
833
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
834
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
835
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
836
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
837
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
838
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
839
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
840
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
841
+
842
+ 16. Limitation of Liability.
843
+
844
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
845
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
846
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
847
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
848
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
849
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
850
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
851
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
852
+ SUCH DAMAGES.
853
+
854
+ 17. Interpretation of Sections 15 and 16.
855
+
856
+ If the disclaimer of warranty and limitation of liability provided
857
+ above cannot be given local legal effect according to their terms,
858
+ reviewing courts shall apply local law that most closely approximates
859
+ an absolute waiver of all civil liability in connection with the
860
+ Program, unless a warranty or assumption of liability accompanies a
861
+ copy of the Program in return for a fee.
862
+
863
+ END OF TERMS AND CONDITIONS
864
+
865
+ How to Apply These Terms to Your New Programs
866
+
867
+ If you develop a new program, and you want it to be of the greatest
868
+ possible use to the public, the best way to achieve this is to make it
869
+ free software which everyone can redistribute and change under these terms.
870
+
871
+ To do so, attach the following notices to the program. It is safest
872
+ to attach them to the start of each source file to most effectively
873
+ state the exclusion of warranty; and each file should have at least
874
+ the "copyright" line and a pointer to where the full notice is found.
875
+
876
+ <one line to give the program's name and a brief idea of what it does.>
877
+ Copyright (C) <year> <name of author>
878
+
879
+ This program is free software: you can redistribute it and/or modify
880
+ it under the terms of the GNU General Public License as published by
881
+ the Free Software Foundation, either version 3 of the License, or
882
+ (at your option) any later version.
883
+
884
+ This program is distributed in the hope that it will be useful,
885
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
886
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
887
+ GNU General Public License for more details.
888
+
889
+ You should have received a copy of the GNU General Public License
890
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
891
+
892
+ Also add information on how to contact you by electronic and paper mail.
893
+
894
+ If the program does terminal interaction, make it output a short
895
+ notice like this when it starts in an interactive mode:
896
+
897
+ <program> Copyright (C) <year> <name of author>
898
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
899
+ This is free software, and you are welcome to redistribute it
900
+ under certain conditions; type `show c' for details.
901
+
902
+ The hypothetical commands `show w' and `show c' should show the appropriate
903
+ parts of the General Public License. Of course, your program's commands
904
+ might be different; for a GUI interface, you would use an "about box".
905
+
906
+ You should also get your employer (if you work as a programmer) or school,
907
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
908
+ For more information on this, and how to apply and follow the GNU GPL, see
909
+ <http://www.gnu.org/licenses/>.
910
+
911
+ The GNU General Public License does not permit incorporating your program
912
+ into proprietary programs. If your program is a subroutine library, you
913
+ may consider it more useful to permit linking proprietary applications with
914
+ the library. If this is what you want to do, use the GNU Lesser General
915
+ Public License instead of this License. But first, please read
916
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
917
+
918
+
919
+ Name: libquadmath
920
+ Files: scipy.libs/libquadmath*.so
921
+ Description: dynamically linked to files compiled with gcc
922
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
923
+ License: LGPL-2.1-or-later
924
+
925
+ GCC Quad-Precision Math Library
926
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
927
+ Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
928
+
929
+ This file is part of the libquadmath library.
930
+ Libquadmath is free software; you can redistribute it and/or
931
+ modify it under the terms of the GNU Library General Public
932
+ License as published by the Free Software Foundation; either
933
+ version 2.1 of the License, or (at your option) any later version.
934
+
935
+ Libquadmath is distributed in the hope that it will be useful,
936
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
937
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
938
+ Lesser General Public License for more details.
939
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
940
+
941
+ Classifier: Development Status :: 5 - Production/Stable
942
+ Classifier: Intended Audience :: Science/Research
943
+ Classifier: Intended Audience :: Developers
944
+ Classifier: License :: OSI Approved :: BSD License
945
+ Classifier: Programming Language :: C
946
+ Classifier: Programming Language :: Python
947
+ Classifier: Programming Language :: Python :: 3
948
+ Classifier: Programming Language :: Python :: 3.10
949
+ Classifier: Programming Language :: Python :: 3.11
950
+ Classifier: Programming Language :: Python :: 3.12
951
+ Classifier: Programming Language :: Python :: 3.13
952
+ Classifier: Topic :: Software Development :: Libraries
953
+ Classifier: Topic :: Scientific/Engineering
954
+ Classifier: Operating System :: Microsoft :: Windows
955
+ Classifier: Operating System :: POSIX :: Linux
956
+ Classifier: Operating System :: POSIX
957
+ Classifier: Operating System :: Unix
958
+ Classifier: Operating System :: MacOS
959
+ Project-URL: homepage, https://scipy.org/
960
+ Project-URL: documentation, https://docs.scipy.org/doc/scipy/
961
+ Project-URL: source, https://github.com/scipy/scipy
962
+ Project-URL: download, https://github.com/scipy/scipy/releases
963
+ Project-URL: tracker, https://github.com/scipy/scipy/issues
964
+ Requires-Python: >=3.10
965
+ Requires-Dist: numpy<2.5,>=1.23.5
966
+ Provides-Extra: test
967
+ Requires-Dist: pytest; extra == "test"
968
+ Requires-Dist: pytest-cov; extra == "test"
969
+ Requires-Dist: pytest-timeout; extra == "test"
970
+ Requires-Dist: pytest-xdist; extra == "test"
971
+ Requires-Dist: asv; extra == "test"
972
+ Requires-Dist: mpmath; extra == "test"
973
+ Requires-Dist: gmpy2; extra == "test"
974
+ Requires-Dist: threadpoolctl; extra == "test"
975
+ Requires-Dist: scikit-umfpack; extra == "test"
976
+ Requires-Dist: pooch; extra == "test"
977
+ Requires-Dist: hypothesis>=6.30; extra == "test"
978
+ Requires-Dist: array-api-strict<2.1.1,>=2.0; extra == "test"
979
+ Requires-Dist: Cython; extra == "test"
980
+ Requires-Dist: meson; extra == "test"
981
+ Requires-Dist: ninja; sys_platform != "emscripten" and extra == "test"
982
+ Provides-Extra: doc
983
+ Requires-Dist: sphinx<8.0.0,>=5.0.0; extra == "doc"
984
+ Requires-Dist: intersphinx_registry; extra == "doc"
985
+ Requires-Dist: pydata-sphinx-theme>=0.15.2; extra == "doc"
986
+ Requires-Dist: sphinx-copybutton; extra == "doc"
987
+ Requires-Dist: sphinx-design>=0.4.0; extra == "doc"
988
+ Requires-Dist: matplotlib>=3.5; extra == "doc"
989
+ Requires-Dist: numpydoc; extra == "doc"
990
+ Requires-Dist: jupytext; extra == "doc"
991
+ Requires-Dist: myst-nb; extra == "doc"
992
+ Requires-Dist: pooch; extra == "doc"
993
+ Requires-Dist: jupyterlite-sphinx>=0.19.1; extra == "doc"
994
+ Requires-Dist: jupyterlite-pyodide-kernel; extra == "doc"
995
+ Provides-Extra: dev
996
+ Requires-Dist: mypy==1.10.0; extra == "dev"
997
+ Requires-Dist: typing_extensions; extra == "dev"
998
+ Requires-Dist: types-psutil; extra == "dev"
999
+ Requires-Dist: pycodestyle; extra == "dev"
1000
+ Requires-Dist: ruff>=0.0.292; extra == "dev"
1001
+ Requires-Dist: cython-lint>=0.12.2; extra == "dev"
1002
+ Requires-Dist: rich-click; extra == "dev"
1003
+ Requires-Dist: doit>=0.36.0; extra == "dev"
1004
+ Requires-Dist: pydevtool; extra == "dev"
1005
+ Description-Content-Type: text/x-rst
1006
+
1007
+ .. image:: https://raw.githubusercontent.com/scipy/scipy/main/doc/source/_static/logo.svg
1008
+ :target: https://scipy.org
1009
+ :width: 110
1010
+ :height: 110
1011
+ :align: left
1012
+
1013
+ .. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
1014
+ :target: https://numfocus.org
1015
+
1016
+ .. image:: https://img.shields.io/pypi/dm/scipy.svg?label=Pypi%20downloads
1017
+ :target: https://pypi.org/project/scipy/
1018
+
1019
+ .. image:: https://img.shields.io/conda/dn/conda-forge/scipy.svg?label=Conda%20downloads
1020
+ :target: https://anaconda.org/conda-forge/scipy
1021
+
1022
+ .. image:: https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg
1023
+ :target: https://stackoverflow.com/questions/tagged/scipy
1024
+
1025
+ .. image:: https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue.svg
1026
+ :target: https://www.nature.com/articles/s41592-019-0686-2
1027
+
1028
+ SciPy (pronounced "Sigh Pie") is an open-source software for mathematics,
1029
+ science, and engineering. It includes modules for statistics, optimization,
1030
+ integration, linear algebra, Fourier transforms, signal and image processing,
1031
+ ODE solvers, and more.
1032
+
1033
+ - **Website:** https://scipy.org
1034
+ - **Documentation:** https://docs.scipy.org/doc/scipy/
1035
+ - **Development version of the documentation:** https://scipy.github.io/devdocs
1036
+ - **SciPy development forum:** https://discuss.scientific-python.org/c/contributor/scipy
1037
+ - **Stack Overflow:** https://stackoverflow.com/questions/tagged/scipy
1038
+ - **Source code:** https://github.com/scipy/scipy
1039
+ - **Contributing:** https://scipy.github.io/devdocs/dev/index.html
1040
+ - **Bug reports:** https://github.com/scipy/scipy/issues
1041
+ - **Code of Conduct:** https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
1042
+ - **Report a security vulnerability:** https://tidelift.com/docs/security
1043
+ - **Citing in your work:** https://www.scipy.org/citing-scipy/
1044
+
1045
+ SciPy is built to work with
1046
+ NumPy arrays, and provides many user-friendly and efficient numerical routines,
1047
+ such as routines for numerical integration and optimization. Together, they
1048
+ run on all popular operating systems, are quick to install, and are free of
1049
+ charge. NumPy and SciPy are easy to use, but powerful enough to be depended
1050
+ upon by some of the world's leading scientists and engineers. If you need to
1051
+ manipulate numbers on a computer and display or publish the results, give
1052
+ SciPy a try!
1053
+
1054
+ For the installation instructions, see `our install
1055
+ guide <https://scipy.org/install/>`__.
1056
+
1057
+
1058
+ Call for Contributions
1059
+ ----------------------
1060
+
1061
+ We appreciate and welcome contributions. Small improvements or fixes are always appreciated; issues labeled as "good
1062
+ first issue" may be a good starting point. Have a look at `our contributing
1063
+ guide <https://scipy.github.io/devdocs/dev/index.html>`__.
1064
+
1065
+ Writing code isn’t the only way to contribute to SciPy. You can also:
1066
+
1067
+ - review pull requests
1068
+ - triage issues
1069
+ - develop tutorials, presentations, and other educational materials
1070
+ - maintain and improve `our website <https://github.com/scipy/scipy.org>`__
1071
+ - develop graphic design for our brand assets and promotional materials
1072
+ - help with outreach and onboard new contributors
1073
+ - write grant proposals and help with other fundraising efforts
1074
+
1075
+ If you’re unsure where to start or how your skills fit in, reach out! You can
1076
+ ask on the `forum <https://discuss.scientific-python.org/c/contributor/scipy>`__
1077
+ or here, on GitHub, by leaving a comment on a relevant issue that is already
1078
+ open.
1079
+
1080
+ If you are new to contributing to open source, `this
1081
+ guide <https://opensource.guide/how-to-contribute/>`__ helps explain why, what,
1082
+ and how to get involved.
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/RECORD ADDED
The diff for this file is too large to render. See raw diff
 
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy-1.15.3.dist-info/WHEEL ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: meson
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-cp310-manylinux_2_17_x86_64
5
+ Tag: cp310-cp310-manylinux2014_x86_64
6
+
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/_mvt.py ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ import numpy as np
3
+ from scipy import special
4
+ from scipy.stats._qmc import primes_from_2_to
5
+
6
+
7
+ def _primes(n):
8
+ # Defined to facilitate comparison between translation and source
9
+ # In Matlab, primes(10.5) -> first four primes, primes(11.5) -> first five
10
+ return primes_from_2_to(math.ceil(n))
11
+
12
+
13
+ def _gaminv(a, b):
14
+ # Defined to facilitate comparison between translation and source
15
+ # Matlab's `gaminv` is like `special.gammaincinv` but args are reversed
16
+ return special.gammaincinv(b, a)
17
+
18
+
19
+ def _qsimvtv(m, nu, sigma, a, b, rng):
20
+ """Estimates the multivariate t CDF using randomized QMC
21
+
22
+ Parameters
23
+ ----------
24
+ m : int
25
+ The number of points
26
+ nu : float
27
+ Degrees of freedom
28
+ sigma : ndarray
29
+ A 2D positive semidefinite covariance matrix
30
+ a : ndarray
31
+ Lower integration limits
32
+ b : ndarray
33
+ Upper integration limits.
34
+ rng : Generator
35
+ Pseudorandom number generator
36
+
37
+ Returns
38
+ -------
39
+ p : float
40
+ The estimated CDF.
41
+ e : float
42
+ An absolute error estimate.
43
+
44
+ """
45
+ # _qsimvtv is a Python translation of the Matlab function qsimvtv,
46
+ # semicolons and all.
47
+ #
48
+ # This function uses an algorithm given in the paper
49
+ # "Comparison of Methods for the Numerical Computation of
50
+ # Multivariate t Probabilities", in
51
+ # J. of Computational and Graphical Stat., 11(2002), pp. 950-971, by
52
+ # Alan Genz and Frank Bretz
53
+ #
54
+ # The primary references for the numerical integration are
55
+ # "On a Number-Theoretical Integration Method"
56
+ # H. Niederreiter, Aequationes Mathematicae, 8(1972), pp. 304-11.
57
+ # and
58
+ # "Randomization of Number Theoretic Methods for Multiple Integration"
59
+ # R. Cranley & T.N.L. Patterson, SIAM J Numer Anal, 13(1976), pp. 904-14.
60
+ #
61
+ # Alan Genz is the author of this function and following Matlab functions.
62
+ # Alan Genz, WSU Math, PO Box 643113, Pullman, WA 99164-3113
63
+ # Email : alangenz@wsu.edu
64
+ #
65
+ # Copyright (C) 2013, Alan Genz, All rights reserved.
66
+ #
67
+ # Redistribution and use in source and binary forms, with or without
68
+ # modification, are permitted provided the following conditions are met:
69
+ # 1. Redistributions of source code must retain the above copyright
70
+ # notice, this list of conditions and the following disclaimer.
71
+ # 2. Redistributions in binary form must reproduce the above copyright
72
+ # notice, this list of conditions and the following disclaimer in
73
+ # the documentation and/or other materials provided with the
74
+ # distribution.
75
+ # 3. The contributor name(s) may not be used to endorse or promote
76
+ # products derived from this software without specific prior
77
+ # written permission.
78
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
79
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
80
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
81
+ # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
82
+ # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
83
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
84
+ # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
85
+ # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
86
+ # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
87
+ # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF USE
88
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
89
+
90
+ # Initialization
91
+ sn = max(1, math.sqrt(nu)); ch, az, bz = _chlrps(sigma, a/sn, b/sn)
92
+ n = len(sigma); N = 10; P = math.ceil(m/N); on = np.ones(P); p = 0; e = 0
93
+ ps = np.sqrt(_primes(5*n*math.log(n+4)/4)); q = ps[:, np.newaxis] # Richtmyer gens.
94
+
95
+ # Randomization loop for ns samples
96
+ c = None; dc = None
97
+ for S in range(N):
98
+ vp = on.copy(); s = np.zeros((n, P))
99
+ for i in range(n):
100
+ x = np.abs(2*np.mod(q[i]*np.arange(1, P+1) + rng.random(), 1)-1) # periodizing transform
101
+ if i == 0:
102
+ r = on
103
+ if nu > 0:
104
+ r = np.sqrt(2*_gaminv(x, nu/2))
105
+ else:
106
+ y = _Phinv(c + x*dc)
107
+ s[i:] += ch[i:, i-1:i] * y
108
+ si = s[i, :]; c = on.copy(); ai = az[i]*r - si; d = on.copy(); bi = bz[i]*r - si
109
+ c[ai <= -9] = 0; tl = abs(ai) < 9; c[tl] = _Phi(ai[tl])
110
+ d[bi <= -9] = 0; tl = abs(bi) < 9; d[tl] = _Phi(bi[tl])
111
+ dc = d - c; vp = vp * dc
112
+ d = (np.mean(vp) - p)/(S + 1); p = p + d; e = (S - 1)*e/(S + 1) + d**2
113
+ e = math.sqrt(e) # error estimate is 3 times std error with N samples.
114
+ return p, e
115
+
116
+
117
+ # Standard statistical normal distribution functions
118
+ def _Phi(z):
119
+ return special.ndtr(z)
120
+
121
+
122
+ def _Phinv(p):
123
+ return special.ndtri(p)
124
+
125
+
126
+ def _chlrps(R, a, b):
127
+ """
128
+ Computes permuted and scaled lower Cholesky factor c for R which may be
129
+ singular, also permuting and scaling integration limit vectors a and b.
130
+ """
131
+ ep = 1e-10 # singularity tolerance
132
+ eps = np.finfo(R.dtype).eps
133
+
134
+ n = len(R); c = R.copy(); ap = a.copy(); bp = b.copy(); d = np.sqrt(np.maximum(np.diag(c), 0))
135
+ for i in range(n):
136
+ if d[i] > 0:
137
+ c[:, i] /= d[i]; c[i, :] /= d[i]
138
+ ap[i] /= d[i]; bp[i] /= d[i]
139
+ y = np.zeros((n, 1)); sqtp = math.sqrt(2*math.pi)
140
+
141
+ for k in range(n):
142
+ im = k; ckk = 0; dem = 1; s = 0
143
+ for i in range(k, n):
144
+ if c[i, i] > eps:
145
+ cii = math.sqrt(max(c[i, i], 0))
146
+ if i > 0: s = c[i, :k] @ y[:k]
147
+ ai = (ap[i]-s)/cii; bi = (bp[i]-s)/cii; de = _Phi(bi)-_Phi(ai)
148
+ if de <= dem:
149
+ ckk = cii; dem = de; am = ai; bm = bi; im = i
150
+ if im > k:
151
+ ap[[im, k]] = ap[[k, im]]; bp[[im, k]] = bp[[k, im]]; c[im, im] = c[k, k]
152
+ t = c[im, :k].copy(); c[im, :k] = c[k, :k]; c[k, :k] = t
153
+ t = c[im+1:, im].copy(); c[im+1:, im] = c[im+1:, k]; c[im+1:, k] = t
154
+ t = c[k+1:im, k].copy(); c[k+1:im, k] = c[im, k+1:im].T; c[im, k+1:im] = t.T
155
+ if ckk > ep*(k+1):
156
+ c[k, k] = ckk; c[k, k+1:] = 0
157
+ for i in range(k+1, n):
158
+ c[i, k] = c[i, k]/ckk; c[i, k+1:i+1] = c[i, k+1:i+1] - c[i, k]*c[k+1:i+1, k].T
159
+ if abs(dem) > ep:
160
+ y[k] = (np.exp(-am**2/2) - np.exp(-bm**2/2)) / (sqtp*dem)
161
+ else:
162
+ y[k] = (am + bm) / 2
163
+ if am < -10:
164
+ y[k] = bm
165
+ elif bm > 10:
166
+ y[k] = am
167
+ c[k, :k+1] /= ckk; ap[k] /= ckk; bp[k] /= ckk
168
+ else:
169
+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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DO NOT EDIT THIS FILE!
2
+ # This file was generated by the R script
3
+ # generate_fisher_exact_results_from_r.R
4
+ # The script was run with R version 3.6.2 (2019-12-12) at 2020-11-09 06:16:09
5
+
6
+
7
+ from collections import namedtuple
8
+ import numpy as np
9
+
10
+
11
+ Inf = np.inf
12
+
13
+ Parameters = namedtuple('Parameters',
14
+ ['table', 'confidence_level', 'alternative'])
15
+ RResults = namedtuple('RResults',
16
+ ['pvalue', 'conditional_odds_ratio',
17
+ 'conditional_odds_ratio_ci'])
18
+ data = [
19
+ (Parameters(table=[[100, 2], [1000, 5]],
20
+ confidence_level=0.95,
21
+ alternative='two.sided'),
22
+ RResults(pvalue=0.1300759363430016,
23
+ conditional_odds_ratio=0.25055839934223,
24
+ conditional_odds_ratio_ci=(0.04035202926536294,
25
+ 2.662846672960251))),
26
+ (Parameters(table=[[2, 7], [8, 2]],
27
+ confidence_level=0.95,
28
+ alternative='two.sided'),
29
+ RResults(pvalue=0.02301413756522116,
30
+ conditional_odds_ratio=0.0858623513573622,
31
+ conditional_odds_ratio_ci=(0.004668988338943325,
32
+ 0.895792956493601))),
33
+ (Parameters(table=[[5, 1], [10, 10]],
34
+ confidence_level=0.95,
35
+ alternative='two.sided'),
36
+ RResults(pvalue=0.1973244147157191,
37
+ conditional_odds_ratio=4.725646047336587,
38
+ conditional_odds_ratio_ci=(0.4153910882532168,
39
+ 259.2593661129417))),
40
+ (Parameters(table=[[5, 15], [20, 20]],
41
+ confidence_level=0.95,
42
+ alternative='two.sided'),
43
+ RResults(pvalue=0.09580440012477633,
44
+ conditional_odds_ratio=0.3394396617440851,
45
+ conditional_odds_ratio_ci=(0.08056337526385809,
46
+ 1.22704788545557))),
47
+ (Parameters(table=[[5, 16], [16, 25]],
48
+ confidence_level=0.95,
49
+ alternative='two.sided'),
50
+ RResults(pvalue=0.2697004098849359,
51
+ conditional_odds_ratio=0.4937791394540491,
52
+ conditional_odds_ratio_ci=(0.1176691231650079,
53
+ 1.787463657995973))),
54
+ (Parameters(table=[[10, 5], [10, 1]],
55
+ confidence_level=0.95,
56
+ alternative='two.sided'),
57
+ RResults(pvalue=0.1973244147157192,
58
+ conditional_odds_ratio=0.2116112781158479,
59
+ conditional_odds_ratio_ci=(0.003857141267422399,
60
+ 2.407369893767229))),
61
+ (Parameters(table=[[10, 5], [10, 0]],
62
+ confidence_level=0.95,
63
+ alternative='two.sided'),
64
+ RResults(pvalue=0.06126482213438735,
65
+ conditional_odds_ratio=0,
66
+ conditional_odds_ratio_ci=(0,
67
+ 1.451643573543705))),
68
+ (Parameters(table=[[5, 0], [1, 4]],
69
+ confidence_level=0.95,
70
+ alternative='two.sided'),
71
+ RResults(pvalue=0.04761904761904762,
72
+ conditional_odds_ratio=Inf,
73
+ conditional_odds_ratio_ci=(1.024822256141754,
74
+ Inf))),
75
+ (Parameters(table=[[0, 5], [1, 4]],
76
+ confidence_level=0.95,
77
+ alternative='two.sided'),
78
+ RResults(pvalue=1,
79
+ conditional_odds_ratio=0,
80
+ conditional_odds_ratio_ci=(0,
81
+ 39.00054996869288))),
82
+ (Parameters(table=[[5, 1], [0, 4]],
83
+ confidence_level=0.95,
84
+ alternative='two.sided'),
85
+ RResults(pvalue=0.04761904761904761,
86
+ conditional_odds_ratio=Inf,
87
+ conditional_odds_ratio_ci=(1.024822256141754,
88
+ Inf))),
89
+ (Parameters(table=[[0, 1], [3, 2]],
90
+ confidence_level=0.95,
91
+ alternative='two.sided'),
92
+ RResults(pvalue=1,
93
+ conditional_odds_ratio=0,
94
+ conditional_odds_ratio_ci=(0,
95
+ 39.00054996869287))),
96
+ (Parameters(table=[[200, 7], [8, 300]],
97
+ confidence_level=0.95,
98
+ alternative='two.sided'),
99
+ RResults(pvalue=2.005657880389071e-122,
100
+ conditional_odds_ratio=977.7866978606228,
101
+ conditional_odds_ratio_ci=(349.2595113327733,
102
+ 3630.382605689872))),
103
+ (Parameters(table=[[28, 21], [6, 1957]],
104
+ confidence_level=0.95,
105
+ alternative='two.sided'),
106
+ RResults(pvalue=5.728437460831947e-44,
107
+ conditional_odds_ratio=425.2403028434684,
108
+ conditional_odds_ratio_ci=(152.4166024390096,
109
+ 1425.700792178893))),
110
+ (Parameters(table=[[190, 800], [200, 900]],
111
+ confidence_level=0.95,
112
+ alternative='two.sided'),
113
+ RResults(pvalue=0.574111858126088,
114
+ conditional_odds_ratio=1.068697577856801,
115
+ conditional_odds_ratio_ci=(0.8520462587912048,
116
+ 1.340148950273938))),
117
+ (Parameters(table=[[100, 2], [1000, 5]],
118
+ confidence_level=0.99,
119
+ alternative='two.sided'),
120
+ RResults(pvalue=0.1300759363430016,
121
+ conditional_odds_ratio=0.25055839934223,
122
+ conditional_odds_ratio_ci=(0.02502345007115455,
123
+ 6.304424772117853))),
124
+ (Parameters(table=[[2, 7], [8, 2]],
125
+ confidence_level=0.99,
126
+ alternative='two.sided'),
127
+ RResults(pvalue=0.02301413756522116,
128
+ conditional_odds_ratio=0.0858623513573622,
129
+ conditional_odds_ratio_ci=(0.001923034001462487,
130
+ 1.53670836950172))),
131
+ (Parameters(table=[[5, 1], [10, 10]],
132
+ confidence_level=0.99,
133
+ alternative='two.sided'),
134
+ RResults(pvalue=0.1973244147157191,
135
+ conditional_odds_ratio=4.725646047336587,
136
+ conditional_odds_ratio_ci=(0.2397970951413721,
137
+ 1291.342011095509))),
138
+ (Parameters(table=[[5, 15], [20, 20]],
139
+ confidence_level=0.99,
140
+ alternative='two.sided'),
141
+ RResults(pvalue=0.09580440012477633,
142
+ conditional_odds_ratio=0.3394396617440851,
143
+ conditional_odds_ratio_ci=(0.05127576113762925,
144
+ 1.717176678806983))),
145
+ (Parameters(table=[[5, 16], [16, 25]],
146
+ confidence_level=0.99,
147
+ alternative='two.sided'),
148
+ RResults(pvalue=0.2697004098849359,
149
+ conditional_odds_ratio=0.4937791394540491,
150
+ conditional_odds_ratio_ci=(0.07498546954483619,
151
+ 2.506969905199901))),
152
+ (Parameters(table=[[10, 5], [10, 1]],
153
+ confidence_level=0.99,
154
+ alternative='two.sided'),
155
+ RResults(pvalue=0.1973244147157192,
156
+ conditional_odds_ratio=0.2116112781158479,
157
+ conditional_odds_ratio_ci=(0.0007743881879531337,
158
+ 4.170192301163831))),
159
+ (Parameters(table=[[10, 5], [10, 0]],
160
+ confidence_level=0.99,
161
+ alternative='two.sided'),
162
+ RResults(pvalue=0.06126482213438735,
163
+ conditional_odds_ratio=0,
164
+ conditional_odds_ratio_ci=(0,
165
+ 2.642491011905582))),
166
+ (Parameters(table=[[5, 0], [1, 4]],
167
+ confidence_level=0.99,
168
+ alternative='two.sided'),
169
+ RResults(pvalue=0.04761904761904762,
170
+ conditional_odds_ratio=Inf,
171
+ conditional_odds_ratio_ci=(0.496935393325443,
172
+ Inf))),
173
+ (Parameters(table=[[0, 5], [1, 4]],
174
+ confidence_level=0.99,
175
+ alternative='two.sided'),
176
+ RResults(pvalue=1,
177
+ conditional_odds_ratio=0,
178
+ conditional_odds_ratio_ci=(0,
179
+ 198.019801980198))),
180
+ (Parameters(table=[[5, 1], [0, 4]],
181
+ confidence_level=0.99,
182
+ alternative='two.sided'),
183
+ RResults(pvalue=0.04761904761904761,
184
+ conditional_odds_ratio=Inf,
185
+ conditional_odds_ratio_ci=(0.496935393325443,
186
+ Inf))),
187
+ (Parameters(table=[[0, 1], [3, 2]],
188
+ confidence_level=0.99,
189
+ alternative='two.sided'),
190
+ RResults(pvalue=1,
191
+ conditional_odds_ratio=0,
192
+ conditional_odds_ratio_ci=(0,
193
+ 198.019801980198))),
194
+ (Parameters(table=[[200, 7], [8, 300]],
195
+ confidence_level=0.99,
196
+ alternative='two.sided'),
197
+ RResults(pvalue=2.005657880389071e-122,
198
+ conditional_odds_ratio=977.7866978606228,
199
+ conditional_odds_ratio_ci=(270.0334165523604,
200
+ 5461.333333326708))),
201
+ (Parameters(table=[[28, 21], [6, 1957]],
202
+ confidence_level=0.99,
203
+ alternative='two.sided'),
204
+ RResults(pvalue=5.728437460831947e-44,
205
+ conditional_odds_ratio=425.2403028434684,
206
+ conditional_odds_ratio_ci=(116.7944750275836,
207
+ 1931.995993191814))),
208
+ (Parameters(table=[[190, 800], [200, 900]],
209
+ confidence_level=0.99,
210
+ alternative='two.sided'),
211
+ RResults(pvalue=0.574111858126088,
212
+ conditional_odds_ratio=1.068697577856801,
213
+ conditional_odds_ratio_ci=(0.7949398282935892,
214
+ 1.436229679394333))),
215
+ (Parameters(table=[[100, 2], [1000, 5]],
216
+ confidence_level=0.95,
217
+ alternative='less'),
218
+ RResults(pvalue=0.1300759363430016,
219
+ conditional_odds_ratio=0.25055839934223,
220
+ conditional_odds_ratio_ci=(0,
221
+ 1.797867027270803))),
222
+ (Parameters(table=[[2, 7], [8, 2]],
223
+ confidence_level=0.95,
224
+ alternative='less'),
225
+ RResults(pvalue=0.0185217259520665,
226
+ conditional_odds_ratio=0.0858623513573622,
227
+ conditional_odds_ratio_ci=(0,
228
+ 0.6785254803404526))),
229
+ (Parameters(table=[[5, 1], [10, 10]],
230
+ confidence_level=0.95,
231
+ alternative='less'),
232
+ RResults(pvalue=0.9782608695652173,
233
+ conditional_odds_ratio=4.725646047336587,
234
+ conditional_odds_ratio_ci=(0,
235
+ 127.8497388102893))),
236
+ (Parameters(table=[[5, 15], [20, 20]],
237
+ confidence_level=0.95,
238
+ alternative='less'),
239
+ RResults(pvalue=0.05625775074399956,
240
+ conditional_odds_ratio=0.3394396617440851,
241
+ conditional_odds_ratio_ci=(0,
242
+ 1.032332939718425))),
243
+ (Parameters(table=[[5, 16], [16, 25]],
244
+ confidence_level=0.95,
245
+ alternative='less'),
246
+ RResults(pvalue=0.1808979350599346,
247
+ conditional_odds_ratio=0.4937791394540491,
248
+ conditional_odds_ratio_ci=(0,
249
+ 1.502407513296985))),
250
+ (Parameters(table=[[10, 5], [10, 1]],
251
+ confidence_level=0.95,
252
+ alternative='less'),
253
+ RResults(pvalue=0.1652173913043479,
254
+ conditional_odds_ratio=0.2116112781158479,
255
+ conditional_odds_ratio_ci=(0,
256
+ 1.820421051562392))),
257
+ (Parameters(table=[[10, 5], [10, 0]],
258
+ confidence_level=0.95,
259
+ alternative='less'),
260
+ RResults(pvalue=0.0565217391304348,
261
+ conditional_odds_ratio=0,
262
+ conditional_odds_ratio_ci=(0,
263
+ 1.06224603077045))),
264
+ (Parameters(table=[[5, 0], [1, 4]],
265
+ confidence_level=0.95,
266
+ alternative='less'),
267
+ RResults(pvalue=1,
268
+ conditional_odds_ratio=Inf,
269
+ conditional_odds_ratio_ci=(0,
270
+ Inf))),
271
+ (Parameters(table=[[0, 5], [1, 4]],
272
+ confidence_level=0.95,
273
+ alternative='less'),
274
+ RResults(pvalue=0.5,
275
+ conditional_odds_ratio=0,
276
+ conditional_odds_ratio_ci=(0,
277
+ 19.00192394479939))),
278
+ (Parameters(table=[[5, 1], [0, 4]],
279
+ confidence_level=0.95,
280
+ alternative='less'),
281
+ RResults(pvalue=1,
282
+ conditional_odds_ratio=Inf,
283
+ conditional_odds_ratio_ci=(0,
284
+ Inf))),
285
+ (Parameters(table=[[0, 1], [3, 2]],
286
+ confidence_level=0.95,
287
+ alternative='less'),
288
+ RResults(pvalue=0.4999999999999999,
289
+ conditional_odds_ratio=0,
290
+ conditional_odds_ratio_ci=(0,
291
+ 19.00192394479939))),
292
+ (Parameters(table=[[200, 7], [8, 300]],
293
+ confidence_level=0.95,
294
+ alternative='less'),
295
+ RResults(pvalue=1,
296
+ conditional_odds_ratio=977.7866978606228,
297
+ conditional_odds_ratio_ci=(0,
298
+ 3045.460216525746))),
299
+ (Parameters(table=[[28, 21], [6, 1957]],
300
+ confidence_level=0.95,
301
+ alternative='less'),
302
+ RResults(pvalue=1,
303
+ conditional_odds_ratio=425.2403028434684,
304
+ conditional_odds_ratio_ci=(0,
305
+ 1186.440170942579))),
306
+ (Parameters(table=[[190, 800], [200, 900]],
307
+ confidence_level=0.95,
308
+ alternative='less'),
309
+ RResults(pvalue=0.7416227010368963,
310
+ conditional_odds_ratio=1.068697577856801,
311
+ conditional_odds_ratio_ci=(0,
312
+ 1.293551891610822))),
313
+ (Parameters(table=[[100, 2], [1000, 5]],
314
+ confidence_level=0.99,
315
+ alternative='less'),
316
+ RResults(pvalue=0.1300759363430016,
317
+ conditional_odds_ratio=0.25055839934223,
318
+ conditional_odds_ratio_ci=(0,
319
+ 4.375946050832565))),
320
+ (Parameters(table=[[2, 7], [8, 2]],
321
+ confidence_level=0.99,
322
+ alternative='less'),
323
+ RResults(pvalue=0.0185217259520665,
324
+ conditional_odds_ratio=0.0858623513573622,
325
+ conditional_odds_ratio_ci=(0,
326
+ 1.235282118191202))),
327
+ (Parameters(table=[[5, 1], [10, 10]],
328
+ confidence_level=0.99,
329
+ alternative='less'),
330
+ RResults(pvalue=0.9782608695652173,
331
+ conditional_odds_ratio=4.725646047336587,
332
+ conditional_odds_ratio_ci=(0,
333
+ 657.2063583945989))),
334
+ (Parameters(table=[[5, 15], [20, 20]],
335
+ confidence_level=0.99,
336
+ alternative='less'),
337
+ RResults(pvalue=0.05625775074399956,
338
+ conditional_odds_ratio=0.3394396617440851,
339
+ conditional_odds_ratio_ci=(0,
340
+ 1.498867660683128))),
341
+ (Parameters(table=[[5, 16], [16, 25]],
342
+ confidence_level=0.99,
343
+ alternative='less'),
344
+ RResults(pvalue=0.1808979350599346,
345
+ conditional_odds_ratio=0.4937791394540491,
346
+ conditional_odds_ratio_ci=(0,
347
+ 2.186159386716762))),
348
+ (Parameters(table=[[10, 5], [10, 1]],
349
+ confidence_level=0.99,
350
+ alternative='less'),
351
+ RResults(pvalue=0.1652173913043479,
352
+ conditional_odds_ratio=0.2116112781158479,
353
+ conditional_odds_ratio_ci=(0,
354
+ 3.335351451901569))),
355
+ (Parameters(table=[[10, 5], [10, 0]],
356
+ confidence_level=0.99,
357
+ alternative='less'),
358
+ RResults(pvalue=0.0565217391304348,
359
+ conditional_odds_ratio=0,
360
+ conditional_odds_ratio_ci=(0,
361
+ 2.075407697450433))),
362
+ (Parameters(table=[[5, 0], [1, 4]],
363
+ confidence_level=0.99,
364
+ alternative='less'),
365
+ RResults(pvalue=1,
366
+ conditional_odds_ratio=Inf,
367
+ conditional_odds_ratio_ci=(0,
368
+ Inf))),
369
+ (Parameters(table=[[0, 5], [1, 4]],
370
+ confidence_level=0.99,
371
+ alternative='less'),
372
+ RResults(pvalue=0.5,
373
+ conditional_odds_ratio=0,
374
+ conditional_odds_ratio_ci=(0,
375
+ 99.00009507969122))),
376
+ (Parameters(table=[[5, 1], [0, 4]],
377
+ confidence_level=0.99,
378
+ alternative='less'),
379
+ RResults(pvalue=1,
380
+ conditional_odds_ratio=Inf,
381
+ conditional_odds_ratio_ci=(0,
382
+ Inf))),
383
+ (Parameters(table=[[0, 1], [3, 2]],
384
+ confidence_level=0.99,
385
+ alternative='less'),
386
+ RResults(pvalue=0.4999999999999999,
387
+ conditional_odds_ratio=0,
388
+ conditional_odds_ratio_ci=(0,
389
+ 99.00009507969123))),
390
+ (Parameters(table=[[200, 7], [8, 300]],
391
+ confidence_level=0.99,
392
+ alternative='less'),
393
+ RResults(pvalue=1,
394
+ conditional_odds_ratio=977.7866978606228,
395
+ conditional_odds_ratio_ci=(0,
396
+ 4503.078257659934))),
397
+ (Parameters(table=[[28, 21], [6, 1957]],
398
+ confidence_level=0.99,
399
+ alternative='less'),
400
+ RResults(pvalue=1,
401
+ conditional_odds_ratio=425.2403028434684,
402
+ conditional_odds_ratio_ci=(0,
403
+ 1811.766127544222))),
404
+ (Parameters(table=[[190, 800], [200, 900]],
405
+ confidence_level=0.99,
406
+ alternative='less'),
407
+ RResults(pvalue=0.7416227010368963,
408
+ conditional_odds_ratio=1.068697577856801,
409
+ conditional_odds_ratio_ci=(0,
410
+ 1.396522811516685))),
411
+ (Parameters(table=[[100, 2], [1000, 5]],
412
+ confidence_level=0.95,
413
+ alternative='greater'),
414
+ RResults(pvalue=0.979790445314723,
415
+ conditional_odds_ratio=0.25055839934223,
416
+ conditional_odds_ratio_ci=(0.05119649909830196,
417
+ Inf))),
418
+ (Parameters(table=[[2, 7], [8, 2]],
419
+ confidence_level=0.95,
420
+ alternative='greater'),
421
+ RResults(pvalue=0.9990149169715733,
422
+ conditional_odds_ratio=0.0858623513573622,
423
+ conditional_odds_ratio_ci=(0.007163749169069961,
424
+ Inf))),
425
+ (Parameters(table=[[5, 1], [10, 10]],
426
+ confidence_level=0.95,
427
+ alternative='greater'),
428
+ RResults(pvalue=0.1652173913043478,
429
+ conditional_odds_ratio=4.725646047336587,
430
+ conditional_odds_ratio_ci=(0.5493234651081089,
431
+ Inf))),
432
+ (Parameters(table=[[5, 15], [20, 20]],
433
+ confidence_level=0.95,
434
+ alternative='greater'),
435
+ RResults(pvalue=0.9849086665340765,
436
+ conditional_odds_ratio=0.3394396617440851,
437
+ conditional_odds_ratio_ci=(0.1003538933958604,
438
+ Inf))),
439
+ (Parameters(table=[[5, 16], [16, 25]],
440
+ confidence_level=0.95,
441
+ alternative='greater'),
442
+ RResults(pvalue=0.9330176609214881,
443
+ conditional_odds_ratio=0.4937791394540491,
444
+ conditional_odds_ratio_ci=(0.146507416280863,
445
+ Inf))),
446
+ (Parameters(table=[[10, 5], [10, 1]],
447
+ confidence_level=0.95,
448
+ alternative='greater'),
449
+ RResults(pvalue=0.9782608695652174,
450
+ conditional_odds_ratio=0.2116112781158479,
451
+ conditional_odds_ratio_ci=(0.007821681994077808,
452
+ Inf))),
453
+ (Parameters(table=[[10, 5], [10, 0]],
454
+ confidence_level=0.95,
455
+ alternative='greater'),
456
+ RResults(pvalue=1,
457
+ conditional_odds_ratio=0,
458
+ conditional_odds_ratio_ci=(0,
459
+ Inf))),
460
+ (Parameters(table=[[5, 0], [1, 4]],
461
+ confidence_level=0.95,
462
+ alternative='greater'),
463
+ RResults(pvalue=0.02380952380952382,
464
+ conditional_odds_ratio=Inf,
465
+ conditional_odds_ratio_ci=(1.487678929918272,
466
+ Inf))),
467
+ (Parameters(table=[[0, 5], [1, 4]],
468
+ confidence_level=0.95,
469
+ alternative='greater'),
470
+ RResults(pvalue=1,
471
+ conditional_odds_ratio=0,
472
+ conditional_odds_ratio_ci=(0,
473
+ Inf))),
474
+ (Parameters(table=[[5, 1], [0, 4]],
475
+ confidence_level=0.95,
476
+ alternative='greater'),
477
+ RResults(pvalue=0.0238095238095238,
478
+ conditional_odds_ratio=Inf,
479
+ conditional_odds_ratio_ci=(1.487678929918272,
480
+ Inf))),
481
+ (Parameters(table=[[0, 1], [3, 2]],
482
+ confidence_level=0.95,
483
+ alternative='greater'),
484
+ RResults(pvalue=1,
485
+ conditional_odds_ratio=0,
486
+ conditional_odds_ratio_ci=(0,
487
+ Inf))),
488
+ (Parameters(table=[[200, 7], [8, 300]],
489
+ confidence_level=0.95,
490
+ alternative='greater'),
491
+ RResults(pvalue=2.005657880388915e-122,
492
+ conditional_odds_ratio=977.7866978606228,
493
+ conditional_odds_ratio_ci=(397.784359748113,
494
+ Inf))),
495
+ (Parameters(table=[[28, 21], [6, 1957]],
496
+ confidence_level=0.95,
497
+ alternative='greater'),
498
+ RResults(pvalue=5.728437460831983e-44,
499
+ conditional_odds_ratio=425.2403028434684,
500
+ conditional_odds_ratio_ci=(174.7148056880929,
501
+ Inf))),
502
+ (Parameters(table=[[190, 800], [200, 900]],
503
+ confidence_level=0.95,
504
+ alternative='greater'),
505
+ RResults(pvalue=0.2959825901308897,
506
+ conditional_odds_ratio=1.068697577856801,
507
+ conditional_odds_ratio_ci=(0.8828406663967776,
508
+ Inf))),
509
+ (Parameters(table=[[100, 2], [1000, 5]],
510
+ confidence_level=0.99,
511
+ alternative='greater'),
512
+ RResults(pvalue=0.979790445314723,
513
+ conditional_odds_ratio=0.25055839934223,
514
+ conditional_odds_ratio_ci=(0.03045407081240429,
515
+ Inf))),
516
+ (Parameters(table=[[2, 7], [8, 2]],
517
+ confidence_level=0.99,
518
+ alternative='greater'),
519
+ RResults(pvalue=0.9990149169715733,
520
+ conditional_odds_ratio=0.0858623513573622,
521
+ conditional_odds_ratio_ci=(0.002768053063547901,
522
+ Inf))),
523
+ (Parameters(table=[[5, 1], [10, 10]],
524
+ confidence_level=0.99,
525
+ alternative='greater'),
526
+ RResults(pvalue=0.1652173913043478,
527
+ conditional_odds_ratio=4.725646047336587,
528
+ conditional_odds_ratio_ci=(0.2998184792279909,
529
+ Inf))),
530
+ (Parameters(table=[[5, 15], [20, 20]],
531
+ confidence_level=0.99,
532
+ alternative='greater'),
533
+ RResults(pvalue=0.9849086665340765,
534
+ conditional_odds_ratio=0.3394396617440851,
535
+ conditional_odds_ratio_ci=(0.06180414342643172,
536
+ Inf))),
537
+ (Parameters(table=[[5, 16], [16, 25]],
538
+ confidence_level=0.99,
539
+ alternative='greater'),
540
+ RResults(pvalue=0.9330176609214881,
541
+ conditional_odds_ratio=0.4937791394540491,
542
+ conditional_odds_ratio_ci=(0.09037094010066403,
543
+ Inf))),
544
+ (Parameters(table=[[10, 5], [10, 1]],
545
+ confidence_level=0.99,
546
+ alternative='greater'),
547
+ RResults(pvalue=0.9782608695652174,
548
+ conditional_odds_ratio=0.2116112781158479,
549
+ conditional_odds_ratio_ci=(0.001521592095430679,
550
+ Inf))),
551
+ (Parameters(table=[[10, 5], [10, 0]],
552
+ confidence_level=0.99,
553
+ alternative='greater'),
554
+ RResults(pvalue=1,
555
+ conditional_odds_ratio=0,
556
+ conditional_odds_ratio_ci=(0,
557
+ Inf))),
558
+ (Parameters(table=[[5, 0], [1, 4]],
559
+ confidence_level=0.99,
560
+ alternative='greater'),
561
+ RResults(pvalue=0.02380952380952382,
562
+ conditional_odds_ratio=Inf,
563
+ conditional_odds_ratio_ci=(0.6661157890359722,
564
+ Inf))),
565
+ (Parameters(table=[[0, 5], [1, 4]],
566
+ confidence_level=0.99,
567
+ alternative='greater'),
568
+ RResults(pvalue=1,
569
+ conditional_odds_ratio=0,
570
+ conditional_odds_ratio_ci=(0,
571
+ Inf))),
572
+ (Parameters(table=[[5, 1], [0, 4]],
573
+ confidence_level=0.99,
574
+ alternative='greater'),
575
+ RResults(pvalue=0.0238095238095238,
576
+ conditional_odds_ratio=Inf,
577
+ conditional_odds_ratio_ci=(0.6661157890359725,
578
+ Inf))),
579
+ (Parameters(table=[[0, 1], [3, 2]],
580
+ confidence_level=0.99,
581
+ alternative='greater'),
582
+ RResults(pvalue=1,
583
+ conditional_odds_ratio=0,
584
+ conditional_odds_ratio_ci=(0,
585
+ Inf))),
586
+ (Parameters(table=[[200, 7], [8, 300]],
587
+ confidence_level=0.99,
588
+ alternative='greater'),
589
+ RResults(pvalue=2.005657880388915e-122,
590
+ conditional_odds_ratio=977.7866978606228,
591
+ conditional_odds_ratio_ci=(297.9619252357688,
592
+ Inf))),
593
+ (Parameters(table=[[28, 21], [6, 1957]],
594
+ confidence_level=0.99,
595
+ alternative='greater'),
596
+ RResults(pvalue=5.728437460831983e-44,
597
+ conditional_odds_ratio=425.2403028434684,
598
+ conditional_odds_ratio_ci=(130.3213490295859,
599
+ Inf))),
600
+ (Parameters(table=[[190, 800], [200, 900]],
601
+ confidence_level=0.99,
602
+ alternative='greater'),
603
+ RResults(pvalue=0.2959825901308897,
604
+ conditional_odds_ratio=1.068697577856801,
605
+ conditional_odds_ratio_ci=(0.8176272148267533,
606
+ Inf))),
607
+ ]
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/AtmWtAg.dat ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: AtmWtAg (AtmWtAg.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 108)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Powell, L.J., Murphy, T.J. and Gramlich, J.W. (1982).
14
+ "The Absolute Isotopic Abundance & Atomic Weight
15
+ of a Reference Sample of Silver".
16
+ NBS Journal of Research, 87, pp. 9-19.
17
+
18
+
19
+ Data: 1 Factor
20
+ 2 Treatments
21
+ 24 Replicates/Cell
22
+ 48 Observations
23
+ 7 Constant Leading Digits
24
+ Average Level of Difficulty
25
+ Observed Data
26
+
27
+
28
+ Model: 3 Parameters (mu, tau_1, tau_2)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+
42
+ Between Instrument 1 3.63834187500000E-09 3.63834187500000E-09 1.59467335677930E+01
43
+ Within Instrument 46 1.04951729166667E-08 2.28155932971014E-10
44
+
45
+ Certified R-Squared 2.57426544538321E-01
46
+
47
+ Certified Residual
48
+ Standard Deviation 1.51048314446410E-05
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Instrument AgWt
61
+ 1 107.8681568
62
+ 1 107.8681465
63
+ 1 107.8681572
64
+ 1 107.8681785
65
+ 1 107.8681446
66
+ 1 107.8681903
67
+ 1 107.8681526
68
+ 1 107.8681494
69
+ 1 107.8681616
70
+ 1 107.8681587
71
+ 1 107.8681519
72
+ 1 107.8681486
73
+ 1 107.8681419
74
+ 1 107.8681569
75
+ 1 107.8681508
76
+ 1 107.8681672
77
+ 1 107.8681385
78
+ 1 107.8681518
79
+ 1 107.8681662
80
+ 1 107.8681424
81
+ 1 107.8681360
82
+ 1 107.8681333
83
+ 1 107.8681610
84
+ 1 107.8681477
85
+ 2 107.8681079
86
+ 2 107.8681344
87
+ 2 107.8681513
88
+ 2 107.8681197
89
+ 2 107.8681604
90
+ 2 107.8681385
91
+ 2 107.8681642
92
+ 2 107.8681365
93
+ 2 107.8681151
94
+ 2 107.8681082
95
+ 2 107.8681517
96
+ 2 107.8681448
97
+ 2 107.8681198
98
+ 2 107.8681482
99
+ 2 107.8681334
100
+ 2 107.8681609
101
+ 2 107.8681101
102
+ 2 107.8681512
103
+ 2 107.8681469
104
+ 2 107.8681360
105
+ 2 107.8681254
106
+ 2 107.8681261
107
+ 2 107.8681450
108
+ 2 107.8681368
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SiRstv.dat ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SiRstv (SiRstv.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 85)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Ehrstein, James and Croarkin, M. Carroll.
14
+ Unpublished NIST dataset.
15
+
16
+
17
+ Data: 1 Factor
18
+ 5 Treatments
19
+ 5 Replicates/Cell
20
+ 25 Observations
21
+ 3 Constant Leading Digits
22
+ Lower Level of Difficulty
23
+ Observed Data
24
+
25
+
26
+ Model: 6 Parameters (mu,tau_1, ... , tau_5)
27
+ y_{ij} = mu + tau_i + epsilon_{ij}
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Instrument 4 5.11462616000000E-02 1.27865654000000E-02 1.18046237440255E+00
42
+ Within Instrument 20 2.16636560000000E-01 1.08318280000000E-02
43
+
44
+ Certified R-Squared 1.90999039051129E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.04076068334656E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Instrument Resistance
61
+ 1 196.3052
62
+ 1 196.1240
63
+ 1 196.1890
64
+ 1 196.2569
65
+ 1 196.3403
66
+ 2 196.3042
67
+ 2 196.3825
68
+ 2 196.1669
69
+ 2 196.3257
70
+ 2 196.0422
71
+ 3 196.1303
72
+ 3 196.2005
73
+ 3 196.2889
74
+ 3 196.0343
75
+ 3 196.1811
76
+ 4 196.2795
77
+ 4 196.1748
78
+ 4 196.1494
79
+ 4 196.1485
80
+ 4 195.9885
81
+ 5 196.2119
82
+ 5 196.1051
83
+ 5 196.1850
84
+ 5 196.0052
85
+ 5 196.2090
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs01.dat ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs01 (SmLs01.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 249)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 21 Replicates/Cell
22
+ 189 Observations
23
+ 1 Constant Leading Digit
24
+ Lower Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.68000000000000E+00 2.10000000000000E-01 2.10000000000000E+01
42
+ Within Treatment 180 1.80000000000000E+00 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.82758620689655E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1.4
62
+ 1 1.3
63
+ 1 1.5
64
+ 1 1.3
65
+ 1 1.5
66
+ 1 1.3
67
+ 1 1.5
68
+ 1 1.3
69
+ 1 1.5
70
+ 1 1.3
71
+ 1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1.4
165
+ 5 1.6
166
+ 6 1.3
167
+ 6 1.2
168
+ 6 1.4
169
+ 6 1.2
170
+ 6 1.4
171
+ 6 1.2
172
+ 6 1.4
173
+ 6 1.2
174
+ 6 1.4
175
+ 6 1.2
176
+ 6 1.4
177
+ 6 1.2
178
+ 6 1.4
179
+ 6 1.2
180
+ 6 1.4
181
+ 6 1.2
182
+ 6 1.4
183
+ 6 1.2
184
+ 6 1.4
185
+ 6 1.2
186
+ 6 1.4
187
+ 7 1.5
188
+ 7 1.4
189
+ 7 1.6
190
+ 7 1.4
191
+ 7 1.6
192
+ 7 1.4
193
+ 7 1.6
194
+ 7 1.4
195
+ 7 1.6
196
+ 7 1.4
197
+ 7 1.6
198
+ 7 1.4
199
+ 7 1.6
200
+ 7 1.4
201
+ 7 1.6
202
+ 7 1.4
203
+ 7 1.6
204
+ 7 1.4
205
+ 7 1.6
206
+ 7 1.4
207
+ 7 1.6
208
+ 8 1.3
209
+ 8 1.2
210
+ 8 1.4
211
+ 8 1.2
212
+ 8 1.4
213
+ 8 1.2
214
+ 8 1.4
215
+ 8 1.2
216
+ 8 1.4
217
+ 8 1.2
218
+ 8 1.4
219
+ 8 1.2
220
+ 8 1.4
221
+ 8 1.2
222
+ 8 1.4
223
+ 8 1.2
224
+ 8 1.4
225
+ 8 1.2
226
+ 8 1.4
227
+ 8 1.2
228
+ 8 1.4
229
+ 9 1.5
230
+ 9 1.4
231
+ 9 1.6
232
+ 9 1.4
233
+ 9 1.6
234
+ 9 1.4
235
+ 9 1.6
236
+ 9 1.4
237
+ 9 1.6
238
+ 9 1.4
239
+ 9 1.6
240
+ 9 1.4
241
+ 9 1.6
242
+ 9 1.4
243
+ 9 1.6
244
+ 9 1.4
245
+ 9 1.6
246
+ 9 1.4
247
+ 9 1.6
248
+ 9 1.4
249
+ 9 1.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs02.dat ADDED
@@ -0,0 +1,1869 @@
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs02 (SmLs02.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 1869)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 201 Replicates/Cell
22
+ 1809 Observations
23
+ 1 Constant Leading Digit
24
+ Lower Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.60800000000000E+01 2.01000000000000E+00 2.01000000000000E+02
42
+ Within Treatment 1800 1.80000000000000E+01 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.71830985915493E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1.4
62
+ 1 1.3
63
+ 1 1.5
64
+ 1 1.3
65
+ 1 1.5
66
+ 1 1.3
67
+ 1 1.5
68
+ 1 1.3
69
+ 1 1.5
70
+ 1 1.3
71
+ 1 1.5
72
+ 1 1.3
73
+ 1 1.5
74
+ 1 1.3
75
+ 1 1.5
76
+ 1 1.3
77
+ 1 1.5
78
+ 1 1.3
79
+ 1 1.5
80
+ 1 1.3
81
+ 1 1.5
82
+ 1 1.3
83
+ 1 1.5
84
+ 1 1.3
85
+ 1 1.5
86
+ 1 1.3
87
+ 1 1.5
88
+ 1 1.3
89
+ 1 1.5
90
+ 1 1.3
91
+ 1 1.5
92
+ 1 1.3
93
+ 1 1.5
94
+ 1 1.3
95
+ 1 1.5
96
+ 1 1.3
97
+ 1 1.5
98
+ 1 1.3
99
+ 1 1.5
100
+ 1 1.3
101
+ 1 1.5
102
+ 1 1.3
103
+ 1 1.5
104
+ 1 1.3
105
+ 1 1.5
106
+ 1 1.3
107
+ 1 1.5
108
+ 1 1.3
109
+ 1 1.5
110
+ 1 1.3
111
+ 1 1.5
112
+ 1 1.3
113
+ 1 1.5
114
+ 1 1.3
115
+ 1 1.5
116
+ 1 1.3
117
+ 1 1.5
118
+ 1 1.3
119
+ 1 1.5
120
+ 1 1.3
121
+ 1 1.5
122
+ 1 1.3
123
+ 1 1.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
+ 9 1.4
1819
+ 9 1.6
1820
+ 9 1.4
1821
+ 9 1.6
1822
+ 9 1.4
1823
+ 9 1.6
1824
+ 9 1.4
1825
+ 9 1.6
1826
+ 9 1.4
1827
+ 9 1.6
1828
+ 9 1.4
1829
+ 9 1.6
1830
+ 9 1.4
1831
+ 9 1.6
1832
+ 9 1.4
1833
+ 9 1.6
1834
+ 9 1.4
1835
+ 9 1.6
1836
+ 9 1.4
1837
+ 9 1.6
1838
+ 9 1.4
1839
+ 9 1.6
1840
+ 9 1.4
1841
+ 9 1.6
1842
+ 9 1.4
1843
+ 9 1.6
1844
+ 9 1.4
1845
+ 9 1.6
1846
+ 9 1.4
1847
+ 9 1.6
1848
+ 9 1.4
1849
+ 9 1.6
1850
+ 9 1.4
1851
+ 9 1.6
1852
+ 9 1.4
1853
+ 9 1.6
1854
+ 9 1.4
1855
+ 9 1.6
1856
+ 9 1.4
1857
+ 9 1.6
1858
+ 9 1.4
1859
+ 9 1.6
1860
+ 9 1.4
1861
+ 9 1.6
1862
+ 9 1.4
1863
+ 9 1.6
1864
+ 9 1.4
1865
+ 9 1.6
1866
+ 9 1.4
1867
+ 9 1.6
1868
+ 9 1.4
1869
+ 9 1.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs03.dat ADDED
The diff for this file is too large to render. See raw diff
 
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs04.dat ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs04 (SmLs04.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 249)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 21 Replicates/Cell
22
+ 189 Observations
23
+ 7 Constant Leading Digits
24
+ Average Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.68000000000000E+00 2.10000000000000E-01 2.10000000000000E+01
42
+ Within Treatment 180 1.80000000000000E+00 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.82758620689655E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1000000.4
62
+ 1 1000000.3
63
+ 1 1000000.5
64
+ 1 1000000.3
65
+ 1 1000000.5
66
+ 1 1000000.3
67
+ 1 1000000.5
68
+ 1 1000000.3
69
+ 1 1000000.5
70
+ 1 1000000.3
71
+ 1 1000000.5
72
+ 1 1000000.3
73
+ 1 1000000.5
74
+ 1 1000000.3
75
+ 1 1000000.5
76
+ 1 1000000.3
77
+ 1 1000000.5
78
+ 1 1000000.3
79
+ 1 1000000.5
80
+ 1 1000000.3
81
+ 1 1000000.5
82
+ 2 1000000.3
83
+ 2 1000000.2
84
+ 2 1000000.4
85
+ 2 1000000.2
86
+ 2 1000000.4
87
+ 2 1000000.2
88
+ 2 1000000.4
89
+ 2 1000000.2
90
+ 2 1000000.4
91
+ 2 1000000.2
92
+ 2 1000000.4
93
+ 2 1000000.2
94
+ 2 1000000.4
95
+ 2 1000000.2
96
+ 2 1000000.4
97
+ 2 1000000.2
98
+ 2 1000000.4
99
+ 2 1000000.2
100
+ 2 1000000.4
101
+ 2 1000000.2
102
+ 2 1000000.4
103
+ 3 1000000.5
104
+ 3 1000000.4
105
+ 3 1000000.6
106
+ 3 1000000.4
107
+ 3 1000000.6
108
+ 3 1000000.4
109
+ 3 1000000.6
110
+ 3 1000000.4
111
+ 3 1000000.6
112
+ 3 1000000.4
113
+ 3 1000000.6
114
+ 3 1000000.4
115
+ 3 1000000.6
116
+ 3 1000000.4
117
+ 3 1000000.6
118
+ 3 1000000.4
119
+ 3 1000000.6
120
+ 3 1000000.4
121
+ 3 1000000.6
122
+ 3 1000000.4
123
+ 3 1000000.6
124
+ 4 1000000.3
125
+ 4 1000000.2
126
+ 4 1000000.4
127
+ 4 1000000.2
128
+ 4 1000000.4
129
+ 4 1000000.2
130
+ 4 1000000.4
131
+ 4 1000000.2
132
+ 4 1000000.4
133
+ 4 1000000.2
134
+ 4 1000000.4
135
+ 4 1000000.2
136
+ 4 1000000.4
137
+ 4 1000000.2
138
+ 4 1000000.4
139
+ 4 1000000.2
140
+ 4 1000000.4
141
+ 4 1000000.2
142
+ 4 1000000.4
143
+ 4 1000000.2
144
+ 4 1000000.4
145
+ 5 1000000.5
146
+ 5 1000000.4
147
+ 5 1000000.6
148
+ 5 1000000.4
149
+ 5 1000000.6
150
+ 5 1000000.4
151
+ 5 1000000.6
152
+ 5 1000000.4
153
+ 5 1000000.6
154
+ 5 1000000.4
155
+ 5 1000000.6
156
+ 5 1000000.4
157
+ 5 1000000.6
158
+ 5 1000000.4
159
+ 5 1000000.6
160
+ 5 1000000.4
161
+ 5 1000000.6
162
+ 5 1000000.4
163
+ 5 1000000.6
164
+ 5 1000000.4
165
+ 5 1000000.6
166
+ 6 1000000.3
167
+ 6 1000000.2
168
+ 6 1000000.4
169
+ 6 1000000.2
170
+ 6 1000000.4
171
+ 6 1000000.2
172
+ 6 1000000.4
173
+ 6 1000000.2
174
+ 6 1000000.4
175
+ 6 1000000.2
176
+ 6 1000000.4
177
+ 6 1000000.2
178
+ 6 1000000.4
179
+ 6 1000000.2
180
+ 6 1000000.4
181
+ 6 1000000.2
182
+ 6 1000000.4
183
+ 6 1000000.2
184
+ 6 1000000.4
185
+ 6 1000000.2
186
+ 6 1000000.4
187
+ 7 1000000.5
188
+ 7 1000000.4
189
+ 7 1000000.6
190
+ 7 1000000.4
191
+ 7 1000000.6
192
+ 7 1000000.4
193
+ 7 1000000.6
194
+ 7 1000000.4
195
+ 7 1000000.6
196
+ 7 1000000.4
197
+ 7 1000000.6
198
+ 7 1000000.4
199
+ 7 1000000.6
200
+ 7 1000000.4
201
+ 7 1000000.6
202
+ 7 1000000.4
203
+ 7 1000000.6
204
+ 7 1000000.4
205
+ 7 1000000.6
206
+ 7 1000000.4
207
+ 7 1000000.6
208
+ 8 1000000.3
209
+ 8 1000000.2
210
+ 8 1000000.4
211
+ 8 1000000.2
212
+ 8 1000000.4
213
+ 8 1000000.2
214
+ 8 1000000.4
215
+ 8 1000000.2
216
+ 8 1000000.4
217
+ 8 1000000.2
218
+ 8 1000000.4
219
+ 8 1000000.2
220
+ 8 1000000.4
221
+ 8 1000000.2
222
+ 8 1000000.4
223
+ 8 1000000.2
224
+ 8 1000000.4
225
+ 8 1000000.2
226
+ 8 1000000.4
227
+ 8 1000000.2
228
+ 8 1000000.4
229
+ 9 1000000.5
230
+ 9 1000000.4
231
+ 9 1000000.6
232
+ 9 1000000.4
233
+ 9 1000000.6
234
+ 9 1000000.4
235
+ 9 1000000.6
236
+ 9 1000000.4
237
+ 9 1000000.6
238
+ 9 1000000.4
239
+ 9 1000000.6
240
+ 9 1000000.4
241
+ 9 1000000.6
242
+ 9 1000000.4
243
+ 9 1000000.6
244
+ 9 1000000.4
245
+ 9 1000000.6
246
+ 9 1000000.4
247
+ 9 1000000.6
248
+ 9 1000000.4
249
+ 9 1000000.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs05.dat ADDED
@@ -0,0 +1,1869 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs05 (SmLs05.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 1869)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 201 Replicates/Cell
22
+ 1809 Observations
23
+ 7 Constant Leading Digits
24
+ Average Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.60800000000000E+01 2.01000000000000E+00 2.01000000000000E+02
42
+ Within Treatment 1800 1.80000000000000E+01 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.71830985915493E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1000000.4
62
+ 1 1000000.3
63
+ 1 1000000.5
64
+ 1 1000000.3
65
+ 1 1000000.5
66
+ 1 1000000.3
67
+ 1 1000000.5
68
+ 1 1000000.3
69
+ 1 1000000.5
70
+ 1 1000000.3
71
+ 1 1000000.5
72
+ 1 1000000.3
73
+ 1 1000000.5
74
+ 1 1000000.3
75
+ 1 1000000.5
76
+ 1 1000000.3
77
+ 1 1000000.5
78
+ 1 1000000.3
79
+ 1 1000000.5
80
+ 1 1000000.3
81
+ 1 1000000.5
82
+ 1 1000000.3
83
+ 1 1000000.5
84
+ 1 1000000.3
85
+ 1 1000000.5
86
+ 1 1000000.3
87
+ 1 1000000.5
88
+ 1 1000000.3
89
+ 1 1000000.5
90
+ 1 1000000.3
91
+ 1 1000000.5
92
+ 1 1000000.3
93
+ 1 1000000.5
94
+ 1 1000000.3
95
+ 1 1000000.5
96
+ 1 1000000.3
97
+ 1 1000000.5
98
+ 1 1000000.3
99
+ 1 1000000.5
100
+ 1 1000000.3
101
+ 1 1000000.5
102
+ 1 1000000.3
103
+ 1 1000000.5
104
+ 1 1000000.3
105
+ 1 1000000.5
106
+ 1 1000000.3
107
+ 1 1000000.5
108
+ 1 1000000.3
109
+ 1 1000000.5
110
+ 1 1000000.3
111
+ 1 1000000.5
112
+ 1 1000000.3
113
+ 1 1000000.5
114
+ 1 1000000.3
115
+ 1 1000000.5
116
+ 1 1000000.3
117
+ 1 1000000.5
118
+ 1 1000000.3
119
+ 1 1000000.5
120
+ 1 1000000.3
121
+ 1 1000000.5
122
+ 1 1000000.3
123
+ 1 1000000.5
124
+ 1 1000000.3
125
+ 1 1000000.5
126
+ 1 1000000.3
127
+ 1 1000000.5
128
+ 1 1000000.3
129
+ 1 1000000.5
130
+ 1 1000000.3
131
+ 1 1000000.5
132
+ 1 1000000.3
133
+ 1 1000000.5
134
+ 1 1000000.3
135
+ 1 1000000.5
136
+ 1 1000000.3
137
+ 1 1000000.5
138
+ 1 1000000.3
139
+ 1 1000000.5
140
+ 1 1000000.3
141
+ 1 1000000.5
142
+ 1 1000000.3
143
+ 1 1000000.5
144
+ 1 1000000.3
145
+ 1 1000000.5
146
+ 1 1000000.3
147
+ 1 1000000.5
148
+ 1 1000000.3
149
+ 1 1000000.5
150
+ 1 1000000.3
151
+ 1 1000000.5
152
+ 1 1000000.3
153
+ 1 1000000.5
154
+ 1 1000000.3
155
+ 1 1000000.5
156
+ 1 1000000.3
157
+ 1 1000000.5
158
+ 1 1000000.3
159
+ 1 1000000.5
160
+ 1 1000000.3
161
+ 1 1000000.5
162
+ 1 1000000.3
163
+ 1 1000000.5
164
+ 1 1000000.3
165
+ 1 1000000.5
166
+ 1 1000000.3
167
+ 1 1000000.5
168
+ 1 1000000.3
169
+ 1 1000000.5
170
+ 1 1000000.3
171
+ 1 1000000.5
172
+ 1 1000000.3
173
+ 1 1000000.5
174
+ 1 1000000.3
175
+ 1 1000000.5
176
+ 1 1000000.3
177
+ 1 1000000.5
178
+ 1 1000000.3
179
+ 1 1000000.5
180
+ 1 1000000.3
181
+ 1 1000000.5
182
+ 1 1000000.3
183
+ 1 1000000.5
184
+ 1 1000000.3
185
+ 1 1000000.5
186
+ 1 1000000.3
187
+ 1 1000000.5
188
+ 1 1000000.3
189
+ 1 1000000.5
190
+ 1 1000000.3
191
+ 1 1000000.5
192
+ 1 1000000.3
193
+ 1 1000000.5
194
+ 1 1000000.3
195
+ 1 1000000.5
196
+ 1 1000000.3
197
+ 1 1000000.5
198
+ 1 1000000.3
199
+ 1 1000000.5
200
+ 1 1000000.3
201
+ 1 1000000.5
202
+ 1 1000000.3
203
+ 1 1000000.5
204
+ 1 1000000.3
205
+ 1 1000000.5
206
+ 1 1000000.3
207
+ 1 1000000.5
208
+ 1 1000000.3
209
+ 1 1000000.5
210
+ 1 1000000.3
211
+ 1 1000000.5
212
+ 1 1000000.3
213
+ 1 1000000.5
214
+ 1 1000000.3
215
+ 1 1000000.5
216
+ 1 1000000.3
217
+ 1 1000000.5
218
+ 1 1000000.3
219
+ 1 1000000.5
220
+ 1 1000000.3
221
+ 1 1000000.5
222
+ 1 1000000.3
223
+ 1 1000000.5
224
+ 1 1000000.3
225
+ 1 1000000.5
226
+ 1 1000000.3
227
+ 1 1000000.5
228
+ 1 1000000.3
229
+ 1 1000000.5
230
+ 1 1000000.3
231
+ 1 1000000.5
232
+ 1 1000000.3
233
+ 1 1000000.5
234
+ 1 1000000.3
235
+ 1 1000000.5
236
+ 1 1000000.3
237
+ 1 1000000.5
238
+ 1 1000000.3
239
+ 1 1000000.5
240
+ 1 1000000.3
241
+ 1 1000000.5
242
+ 1 1000000.3
243
+ 1 1000000.5
244
+ 1 1000000.3
245
+ 1 1000000.5
246
+ 1 1000000.3
247
+ 1 1000000.5
248
+ 1 1000000.3
249
+ 1 1000000.5
250
+ 1 1000000.3
251
+ 1 1000000.5
252
+ 1 1000000.3
253
+ 1 1000000.5
254
+ 1 1000000.3
255
+ 1 1000000.5
256
+ 1 1000000.3
257
+ 1 1000000.5
258
+ 1 1000000.3
259
+ 1 1000000.5
260
+ 1 1000000.3
261
+ 1 1000000.5
262
+ 2 1000000.3
263
+ 2 1000000.2
264
+ 2 1000000.4
265
+ 2 1000000.2
266
+ 2 1000000.4
267
+ 2 1000000.2
268
+ 2 1000000.4
269
+ 2 1000000.2
270
+ 2 1000000.4
271
+ 2 1000000.2
272
+ 2 1000000.4
273
+ 2 1000000.2
274
+ 2 1000000.4
275
+ 2 1000000.2
276
+ 2 1000000.4
277
+ 2 1000000.2
278
+ 2 1000000.4
279
+ 2 1000000.2
280
+ 2 1000000.4
281
+ 2 1000000.2
282
+ 2 1000000.4
283
+ 2 1000000.2
284
+ 2 1000000.4
285
+ 2 1000000.2
286
+ 2 1000000.4
287
+ 2 1000000.2
288
+ 2 1000000.4
289
+ 2 1000000.2
290
+ 2 1000000.4
291
+ 2 1000000.2
292
+ 2 1000000.4
293
+ 2 1000000.2
294
+ 2 1000000.4
295
+ 2 1000000.2
296
+ 2 1000000.4
297
+ 2 1000000.2
298
+ 2 1000000.4
299
+ 2 1000000.2
300
+ 2 1000000.4
301
+ 2 1000000.2
302
+ 2 1000000.4
303
+ 2 1000000.2
304
+ 2 1000000.4
305
+ 2 1000000.2
306
+ 2 1000000.4
307
+ 2 1000000.2
308
+ 2 1000000.4
309
+ 2 1000000.2
310
+ 2 1000000.4
311
+ 2 1000000.2
312
+ 2 1000000.4
313
+ 2 1000000.2
314
+ 2 1000000.4
315
+ 2 1000000.2
316
+ 2 1000000.4
317
+ 2 1000000.2
318
+ 2 1000000.4
319
+ 2 1000000.2
320
+ 2 1000000.4
321
+ 2 1000000.2
322
+ 2 1000000.4
323
+ 2 1000000.2
324
+ 2 1000000.4
325
+ 2 1000000.2
326
+ 2 1000000.4
327
+ 2 1000000.2
328
+ 2 1000000.4
329
+ 2 1000000.2
330
+ 2 1000000.4
331
+ 2 1000000.2
332
+ 2 1000000.4
333
+ 2 1000000.2
334
+ 2 1000000.4
335
+ 2 1000000.2
336
+ 2 1000000.4
337
+ 2 1000000.2
338
+ 2 1000000.4
339
+ 2 1000000.2
340
+ 2 1000000.4
341
+ 2 1000000.2
342
+ 2 1000000.4
343
+ 2 1000000.2
344
+ 2 1000000.4
345
+ 2 1000000.2
346
+ 2 1000000.4
347
+ 2 1000000.2
348
+ 2 1000000.4
349
+ 2 1000000.2
350
+ 2 1000000.4
351
+ 2 1000000.2
352
+ 2 1000000.4
353
+ 2 1000000.2
354
+ 2 1000000.4
355
+ 2 1000000.2
356
+ 2 1000000.4
357
+ 2 1000000.2
358
+ 2 1000000.4
359
+ 2 1000000.2
360
+ 2 1000000.4
361
+ 2 1000000.2
362
+ 2 1000000.4
363
+ 2 1000000.2
364
+ 2 1000000.4
365
+ 2 1000000.2
366
+ 2 1000000.4
367
+ 2 1000000.2
368
+ 2 1000000.4
369
+ 2 1000000.2
370
+ 2 1000000.4
371
+ 2 1000000.2
372
+ 2 1000000.4
373
+ 2 1000000.2
374
+ 2 1000000.4
375
+ 2 1000000.2
376
+ 2 1000000.4
377
+ 2 1000000.2
378
+ 2 1000000.4
379
+ 2 1000000.2
380
+ 2 1000000.4
381
+ 2 1000000.2
382
+ 2 1000000.4
383
+ 2 1000000.2
384
+ 2 1000000.4
385
+ 2 1000000.2
386
+ 2 1000000.4
387
+ 2 1000000.2
388
+ 2 1000000.4
389
+ 2 1000000.2
390
+ 2 1000000.4
391
+ 2 1000000.2
392
+ 2 1000000.4
393
+ 2 1000000.2
394
+ 2 1000000.4
395
+ 2 1000000.2
396
+ 2 1000000.4
397
+ 2 1000000.2
398
+ 2 1000000.4
399
+ 2 1000000.2
400
+ 2 1000000.4
401
+ 2 1000000.2
402
+ 2 1000000.4
403
+ 2 1000000.2
404
+ 2 1000000.4
405
+ 2 1000000.2
406
+ 2 1000000.4
407
+ 2 1000000.2
408
+ 2 1000000.4
409
+ 2 1000000.2
410
+ 2 1000000.4
411
+ 2 1000000.2
412
+ 2 1000000.4
413
+ 2 1000000.2
414
+ 2 1000000.4
415
+ 2 1000000.2
416
+ 2 1000000.4
417
+ 2 1000000.2
418
+ 2 1000000.4
419
+ 2 1000000.2
420
+ 2 1000000.4
421
+ 2 1000000.2
422
+ 2 1000000.4
423
+ 2 1000000.2
424
+ 2 1000000.4
425
+ 2 1000000.2
426
+ 2 1000000.4
427
+ 2 1000000.2
428
+ 2 1000000.4
429
+ 2 1000000.2
430
+ 2 1000000.4
431
+ 2 1000000.2
432
+ 2 1000000.4
433
+ 2 1000000.2
434
+ 2 1000000.4
435
+ 2 1000000.2
436
+ 2 1000000.4
437
+ 2 1000000.2
438
+ 2 1000000.4
439
+ 2 1000000.2
440
+ 2 1000000.4
441
+ 2 1000000.2
442
+ 2 1000000.4
443
+ 2 1000000.2
444
+ 2 1000000.4
445
+ 2 1000000.2
446
+ 2 1000000.4
447
+ 2 1000000.2
448
+ 2 1000000.4
449
+ 2 1000000.2
450
+ 2 1000000.4
451
+ 2 1000000.2
452
+ 2 1000000.4
453
+ 2 1000000.2
454
+ 2 1000000.4
455
+ 2 1000000.2
456
+ 2 1000000.4
457
+ 2 1000000.2
458
+ 2 1000000.4
459
+ 2 1000000.2
460
+ 2 1000000.4
461
+ 2 1000000.2
462
+ 2 1000000.4
463
+ 3 1000000.5
464
+ 3 1000000.4
465
+ 3 1000000.6
466
+ 3 1000000.4
467
+ 3 1000000.6
468
+ 3 1000000.4
469
+ 3 1000000.6
470
+ 3 1000000.4
471
+ 3 1000000.6
472
+ 3 1000000.4
473
+ 3 1000000.6
474
+ 3 1000000.4
475
+ 3 1000000.6
476
+ 3 1000000.4
477
+ 3 1000000.6
478
+ 3 1000000.4
479
+ 3 1000000.6
480
+ 3 1000000.4
481
+ 3 1000000.6
482
+ 3 1000000.4
483
+ 3 1000000.6
484
+ 3 1000000.4
485
+ 3 1000000.6
486
+ 3 1000000.4
487
+ 3 1000000.6
488
+ 3 1000000.4
489
+ 3 1000000.6
490
+ 3 1000000.4
491
+ 3 1000000.6
492
+ 3 1000000.4
493
+ 3 1000000.6
494
+ 3 1000000.4
495
+ 3 1000000.6
496
+ 3 1000000.4
497
+ 3 1000000.6
498
+ 3 1000000.4
499
+ 3 1000000.6
500
+ 3 1000000.4
501
+ 3 1000000.6
502
+ 3 1000000.4
503
+ 3 1000000.6
504
+ 3 1000000.4
505
+ 3 1000000.6
506
+ 3 1000000.4
507
+ 3 1000000.6
508
+ 3 1000000.4
509
+ 3 1000000.6
510
+ 3 1000000.4
511
+ 3 1000000.6
512
+ 3 1000000.4
513
+ 3 1000000.6
514
+ 3 1000000.4
515
+ 3 1000000.6
516
+ 3 1000000.4
517
+ 3 1000000.6
518
+ 3 1000000.4
519
+ 3 1000000.6
520
+ 3 1000000.4
521
+ 3 1000000.6
522
+ 3 1000000.4
523
+ 3 1000000.6
524
+ 3 1000000.4
525
+ 3 1000000.6
526
+ 3 1000000.4
527
+ 3 1000000.6
528
+ 3 1000000.4
529
+ 3 1000000.6
530
+ 3 1000000.4
531
+ 3 1000000.6
532
+ 3 1000000.4
533
+ 3 1000000.6
534
+ 3 1000000.4
535
+ 3 1000000.6
536
+ 3 1000000.4
537
+ 3 1000000.6
538
+ 3 1000000.4
539
+ 3 1000000.6
540
+ 3 1000000.4
541
+ 3 1000000.6
542
+ 3 1000000.4
543
+ 3 1000000.6
544
+ 3 1000000.4
545
+ 3 1000000.6
546
+ 3 1000000.4
547
+ 3 1000000.6
548
+ 3 1000000.4
549
+ 3 1000000.6
550
+ 3 1000000.4
551
+ 3 1000000.6
552
+ 3 1000000.4
553
+ 3 1000000.6
554
+ 3 1000000.4
555
+ 3 1000000.6
556
+ 3 1000000.4
557
+ 3 1000000.6
558
+ 3 1000000.4
559
+ 3 1000000.6
560
+ 3 1000000.4
561
+ 3 1000000.6
562
+ 3 1000000.4
563
+ 3 1000000.6
564
+ 3 1000000.4
565
+ 3 1000000.6
566
+ 3 1000000.4
567
+ 3 1000000.6
568
+ 3 1000000.4
569
+ 3 1000000.6
570
+ 3 1000000.4
571
+ 3 1000000.6
572
+ 3 1000000.4
573
+ 3 1000000.6
574
+ 3 1000000.4
575
+ 3 1000000.6
576
+ 3 1000000.4
577
+ 3 1000000.6
578
+ 3 1000000.4
579
+ 3 1000000.6
580
+ 3 1000000.4
581
+ 3 1000000.6
582
+ 3 1000000.4
583
+ 3 1000000.6
584
+ 3 1000000.4
585
+ 3 1000000.6
586
+ 3 1000000.4
587
+ 3 1000000.6
588
+ 3 1000000.4
589
+ 3 1000000.6
590
+ 3 1000000.4
591
+ 3 1000000.6
592
+ 3 1000000.4
593
+ 3 1000000.6
594
+ 3 1000000.4
595
+ 3 1000000.6
596
+ 3 1000000.4
597
+ 3 1000000.6
598
+ 3 1000000.4
599
+ 3 1000000.6
600
+ 3 1000000.4
601
+ 3 1000000.6
602
+ 3 1000000.4
603
+ 3 1000000.6
604
+ 3 1000000.4
605
+ 3 1000000.6
606
+ 3 1000000.4
607
+ 3 1000000.6
608
+ 3 1000000.4
609
+ 3 1000000.6
610
+ 3 1000000.4
611
+ 3 1000000.6
612
+ 3 1000000.4
613
+ 3 1000000.6
614
+ 3 1000000.4
615
+ 3 1000000.6
616
+ 3 1000000.4
617
+ 3 1000000.6
618
+ 3 1000000.4
619
+ 3 1000000.6
620
+ 3 1000000.4
621
+ 3 1000000.6
622
+ 3 1000000.4
623
+ 3 1000000.6
624
+ 3 1000000.4
625
+ 3 1000000.6
626
+ 3 1000000.4
627
+ 3 1000000.6
628
+ 3 1000000.4
629
+ 3 1000000.6
630
+ 3 1000000.4
631
+ 3 1000000.6
632
+ 3 1000000.4
633
+ 3 1000000.6
634
+ 3 1000000.4
635
+ 3 1000000.6
636
+ 3 1000000.4
637
+ 3 1000000.6
638
+ 3 1000000.4
639
+ 3 1000000.6
640
+ 3 1000000.4
641
+ 3 1000000.6
642
+ 3 1000000.4
643
+ 3 1000000.6
644
+ 3 1000000.4
645
+ 3 1000000.6
646
+ 3 1000000.4
647
+ 3 1000000.6
648
+ 3 1000000.4
649
+ 3 1000000.6
650
+ 3 1000000.4
651
+ 3 1000000.6
652
+ 3 1000000.4
653
+ 3 1000000.6
654
+ 3 1000000.4
655
+ 3 1000000.6
656
+ 3 1000000.4
657
+ 3 1000000.6
658
+ 3 1000000.4
659
+ 3 1000000.6
660
+ 3 1000000.4
661
+ 3 1000000.6
662
+ 3 1000000.4
663
+ 3 1000000.6
664
+ 4 1000000.3
665
+ 4 1000000.2
666
+ 4 1000000.4
667
+ 4 1000000.2
668
+ 4 1000000.4
669
+ 4 1000000.2
670
+ 4 1000000.4
671
+ 4 1000000.2
672
+ 4 1000000.4
673
+ 4 1000000.2
674
+ 4 1000000.4
675
+ 4 1000000.2
676
+ 4 1000000.4
677
+ 4 1000000.2
678
+ 4 1000000.4
679
+ 4 1000000.2
680
+ 4 1000000.4
681
+ 4 1000000.2
682
+ 4 1000000.4
683
+ 4 1000000.2
684
+ 4 1000000.4
685
+ 4 1000000.2
686
+ 4 1000000.4
687
+ 4 1000000.2
688
+ 4 1000000.4
689
+ 4 1000000.2
690
+ 4 1000000.4
691
+ 4 1000000.2
692
+ 4 1000000.4
693
+ 4 1000000.2
694
+ 4 1000000.4
695
+ 4 1000000.2
696
+ 4 1000000.4
697
+ 4 1000000.2
698
+ 4 1000000.4
699
+ 4 1000000.2
700
+ 4 1000000.4
701
+ 4 1000000.2
702
+ 4 1000000.4
703
+ 4 1000000.2
704
+ 4 1000000.4
705
+ 4 1000000.2
706
+ 4 1000000.4
707
+ 4 1000000.2
708
+ 4 1000000.4
709
+ 4 1000000.2
710
+ 4 1000000.4
711
+ 4 1000000.2
712
+ 4 1000000.4
713
+ 4 1000000.2
714
+ 4 1000000.4
715
+ 4 1000000.2
716
+ 4 1000000.4
717
+ 4 1000000.2
718
+ 4 1000000.4
719
+ 4 1000000.2
720
+ 4 1000000.4
721
+ 4 1000000.2
722
+ 4 1000000.4
723
+ 4 1000000.2
724
+ 4 1000000.4
725
+ 4 1000000.2
726
+ 4 1000000.4
727
+ 4 1000000.2
728
+ 4 1000000.4
729
+ 4 1000000.2
730
+ 4 1000000.4
731
+ 4 1000000.2
732
+ 4 1000000.4
733
+ 4 1000000.2
734
+ 4 1000000.4
735
+ 4 1000000.2
736
+ 4 1000000.4
737
+ 4 1000000.2
738
+ 4 1000000.4
739
+ 4 1000000.2
740
+ 4 1000000.4
741
+ 4 1000000.2
742
+ 4 1000000.4
743
+ 4 1000000.2
744
+ 4 1000000.4
745
+ 4 1000000.2
746
+ 4 1000000.4
747
+ 4 1000000.2
748
+ 4 1000000.4
749
+ 4 1000000.2
750
+ 4 1000000.4
751
+ 4 1000000.2
752
+ 4 1000000.4
753
+ 4 1000000.2
754
+ 4 1000000.4
755
+ 4 1000000.2
756
+ 4 1000000.4
757
+ 4 1000000.2
758
+ 4 1000000.4
759
+ 4 1000000.2
760
+ 4 1000000.4
761
+ 4 1000000.2
762
+ 4 1000000.4
763
+ 4 1000000.2
764
+ 4 1000000.4
765
+ 4 1000000.2
766
+ 4 1000000.4
767
+ 4 1000000.2
768
+ 4 1000000.4
769
+ 4 1000000.2
770
+ 4 1000000.4
771
+ 4 1000000.2
772
+ 4 1000000.4
773
+ 4 1000000.2
774
+ 4 1000000.4
775
+ 4 1000000.2
776
+ 4 1000000.4
777
+ 4 1000000.2
778
+ 4 1000000.4
779
+ 4 1000000.2
780
+ 4 1000000.4
781
+ 4 1000000.2
782
+ 4 1000000.4
783
+ 4 1000000.2
784
+ 4 1000000.4
785
+ 4 1000000.2
786
+ 4 1000000.4
787
+ 4 1000000.2
788
+ 4 1000000.4
789
+ 4 1000000.2
790
+ 4 1000000.4
791
+ 4 1000000.2
792
+ 4 1000000.4
793
+ 4 1000000.2
794
+ 4 1000000.4
795
+ 4 1000000.2
796
+ 4 1000000.4
797
+ 4 1000000.2
798
+ 4 1000000.4
799
+ 4 1000000.2
800
+ 4 1000000.4
801
+ 4 1000000.2
802
+ 4 1000000.4
803
+ 4 1000000.2
804
+ 4 1000000.4
805
+ 4 1000000.2
806
+ 4 1000000.4
807
+ 4 1000000.2
808
+ 4 1000000.4
809
+ 4 1000000.2
810
+ 4 1000000.4
811
+ 4 1000000.2
812
+ 4 1000000.4
813
+ 4 1000000.2
814
+ 4 1000000.4
815
+ 4 1000000.2
816
+ 4 1000000.4
817
+ 4 1000000.2
818
+ 4 1000000.4
819
+ 4 1000000.2
820
+ 4 1000000.4
821
+ 4 1000000.2
822
+ 4 1000000.4
823
+ 4 1000000.2
824
+ 4 1000000.4
825
+ 4 1000000.2
826
+ 4 1000000.4
827
+ 4 1000000.2
828
+ 4 1000000.4
829
+ 4 1000000.2
830
+ 4 1000000.4
831
+ 4 1000000.2
832
+ 4 1000000.4
833
+ 4 1000000.2
834
+ 4 1000000.4
835
+ 4 1000000.2
836
+ 4 1000000.4
837
+ 4 1000000.2
838
+ 4 1000000.4
839
+ 4 1000000.2
840
+ 4 1000000.4
841
+ 4 1000000.2
842
+ 4 1000000.4
843
+ 4 1000000.2
844
+ 4 1000000.4
845
+ 4 1000000.2
846
+ 4 1000000.4
847
+ 4 1000000.2
848
+ 4 1000000.4
849
+ 4 1000000.2
850
+ 4 1000000.4
851
+ 4 1000000.2
852
+ 4 1000000.4
853
+ 4 1000000.2
854
+ 4 1000000.4
855
+ 4 1000000.2
856
+ 4 1000000.4
857
+ 4 1000000.2
858
+ 4 1000000.4
859
+ 4 1000000.2
860
+ 4 1000000.4
861
+ 4 1000000.2
862
+ 4 1000000.4
863
+ 4 1000000.2
864
+ 4 1000000.4
865
+ 5 1000000.5
866
+ 5 1000000.4
867
+ 5 1000000.6
868
+ 5 1000000.4
869
+ 5 1000000.6
870
+ 5 1000000.4
871
+ 5 1000000.6
872
+ 5 1000000.4
873
+ 5 1000000.6
874
+ 5 1000000.4
875
+ 5 1000000.6
876
+ 5 1000000.4
877
+ 5 1000000.6
878
+ 5 1000000.4
879
+ 5 1000000.6
880
+ 5 1000000.4
881
+ 5 1000000.6
882
+ 5 1000000.4
883
+ 5 1000000.6
884
+ 5 1000000.4
885
+ 5 1000000.6
886
+ 5 1000000.4
887
+ 5 1000000.6
888
+ 5 1000000.4
889
+ 5 1000000.6
890
+ 5 1000000.4
891
+ 5 1000000.6
892
+ 5 1000000.4
893
+ 5 1000000.6
894
+ 5 1000000.4
895
+ 5 1000000.6
896
+ 5 1000000.4
897
+ 5 1000000.6
898
+ 5 1000000.4
899
+ 5 1000000.6
900
+ 5 1000000.4
901
+ 5 1000000.6
902
+ 5 1000000.4
903
+ 5 1000000.6
904
+ 5 1000000.4
905
+ 5 1000000.6
906
+ 5 1000000.4
907
+ 5 1000000.6
908
+ 5 1000000.4
909
+ 5 1000000.6
910
+ 5 1000000.4
911
+ 5 1000000.6
912
+ 5 1000000.4
913
+ 5 1000000.6
914
+ 5 1000000.4
915
+ 5 1000000.6
916
+ 5 1000000.4
917
+ 5 1000000.6
918
+ 5 1000000.4
919
+ 5 1000000.6
920
+ 5 1000000.4
921
+ 5 1000000.6
922
+ 5 1000000.4
923
+ 5 1000000.6
924
+ 5 1000000.4
925
+ 5 1000000.6
926
+ 5 1000000.4
927
+ 5 1000000.6
928
+ 5 1000000.4
929
+ 5 1000000.6
930
+ 5 1000000.4
931
+ 5 1000000.6
932
+ 5 1000000.4
933
+ 5 1000000.6
934
+ 5 1000000.4
935
+ 5 1000000.6
936
+ 5 1000000.4
937
+ 5 1000000.6
938
+ 5 1000000.4
939
+ 5 1000000.6
940
+ 5 1000000.4
941
+ 5 1000000.6
942
+ 5 1000000.4
943
+ 5 1000000.6
944
+ 5 1000000.4
945
+ 5 1000000.6
946
+ 5 1000000.4
947
+ 5 1000000.6
948
+ 5 1000000.4
949
+ 5 1000000.6
950
+ 5 1000000.4
951
+ 5 1000000.6
952
+ 5 1000000.4
953
+ 5 1000000.6
954
+ 5 1000000.4
955
+ 5 1000000.6
956
+ 5 1000000.4
957
+ 5 1000000.6
958
+ 5 1000000.4
959
+ 5 1000000.6
960
+ 5 1000000.4
961
+ 5 1000000.6
962
+ 5 1000000.4
963
+ 5 1000000.6
964
+ 5 1000000.4
965
+ 5 1000000.6
966
+ 5 1000000.4
967
+ 5 1000000.6
968
+ 5 1000000.4
969
+ 5 1000000.6
970
+ 5 1000000.4
971
+ 5 1000000.6
972
+ 5 1000000.4
973
+ 5 1000000.6
974
+ 5 1000000.4
975
+ 5 1000000.6
976
+ 5 1000000.4
977
+ 5 1000000.6
978
+ 5 1000000.4
979
+ 5 1000000.6
980
+ 5 1000000.4
981
+ 5 1000000.6
982
+ 5 1000000.4
983
+ 5 1000000.6
984
+ 5 1000000.4
985
+ 5 1000000.6
986
+ 5 1000000.4
987
+ 5 1000000.6
988
+ 5 1000000.4
989
+ 5 1000000.6
990
+ 5 1000000.4
991
+ 5 1000000.6
992
+ 5 1000000.4
993
+ 5 1000000.6
994
+ 5 1000000.4
995
+ 5 1000000.6
996
+ 5 1000000.4
997
+ 5 1000000.6
998
+ 5 1000000.4
999
+ 5 1000000.6
1000
+ 5 1000000.4
1001
+ 5 1000000.6
1002
+ 5 1000000.4
1003
+ 5 1000000.6
1004
+ 5 1000000.4
1005
+ 5 1000000.6
1006
+ 5 1000000.4
1007
+ 5 1000000.6
1008
+ 5 1000000.4
1009
+ 5 1000000.6
1010
+ 5 1000000.4
1011
+ 5 1000000.6
1012
+ 5 1000000.4
1013
+ 5 1000000.6
1014
+ 5 1000000.4
1015
+ 5 1000000.6
1016
+ 5 1000000.4
1017
+ 5 1000000.6
1018
+ 5 1000000.4
1019
+ 5 1000000.6
1020
+ 5 1000000.4
1021
+ 5 1000000.6
1022
+ 5 1000000.4
1023
+ 5 1000000.6
1024
+ 5 1000000.4
1025
+ 5 1000000.6
1026
+ 5 1000000.4
1027
+ 5 1000000.6
1028
+ 5 1000000.4
1029
+ 5 1000000.6
1030
+ 5 1000000.4
1031
+ 5 1000000.6
1032
+ 5 1000000.4
1033
+ 5 1000000.6
1034
+ 5 1000000.4
1035
+ 5 1000000.6
1036
+ 5 1000000.4
1037
+ 5 1000000.6
1038
+ 5 1000000.4
1039
+ 5 1000000.6
1040
+ 5 1000000.4
1041
+ 5 1000000.6
1042
+ 5 1000000.4
1043
+ 5 1000000.6
1044
+ 5 1000000.4
1045
+ 5 1000000.6
1046
+ 5 1000000.4
1047
+ 5 1000000.6
1048
+ 5 1000000.4
1049
+ 5 1000000.6
1050
+ 5 1000000.4
1051
+ 5 1000000.6
1052
+ 5 1000000.4
1053
+ 5 1000000.6
1054
+ 5 1000000.4
1055
+ 5 1000000.6
1056
+ 5 1000000.4
1057
+ 5 1000000.6
1058
+ 5 1000000.4
1059
+ 5 1000000.6
1060
+ 5 1000000.4
1061
+ 5 1000000.6
1062
+ 5 1000000.4
1063
+ 5 1000000.6
1064
+ 5 1000000.4
1065
+ 5 1000000.6
1066
+ 6 1000000.3
1067
+ 6 1000000.2
1068
+ 6 1000000.4
1069
+ 6 1000000.2
1070
+ 6 1000000.4
1071
+ 6 1000000.2
1072
+ 6 1000000.4
1073
+ 6 1000000.2
1074
+ 6 1000000.4
1075
+ 6 1000000.2
1076
+ 6 1000000.4
1077
+ 6 1000000.2
1078
+ 6 1000000.4
1079
+ 6 1000000.2
1080
+ 6 1000000.4
1081
+ 6 1000000.2
1082
+ 6 1000000.4
1083
+ 6 1000000.2
1084
+ 6 1000000.4
1085
+ 6 1000000.2
1086
+ 6 1000000.4
1087
+ 6 1000000.2
1088
+ 6 1000000.4
1089
+ 6 1000000.2
1090
+ 6 1000000.4
1091
+ 6 1000000.2
1092
+ 6 1000000.4
1093
+ 6 1000000.2
1094
+ 6 1000000.4
1095
+ 6 1000000.2
1096
+ 6 1000000.4
1097
+ 6 1000000.2
1098
+ 6 1000000.4
1099
+ 6 1000000.2
1100
+ 6 1000000.4
1101
+ 6 1000000.2
1102
+ 6 1000000.4
1103
+ 6 1000000.2
1104
+ 6 1000000.4
1105
+ 6 1000000.2
1106
+ 6 1000000.4
1107
+ 6 1000000.2
1108
+ 6 1000000.4
1109
+ 6 1000000.2
1110
+ 6 1000000.4
1111
+ 6 1000000.2
1112
+ 6 1000000.4
1113
+ 6 1000000.2
1114
+ 6 1000000.4
1115
+ 6 1000000.2
1116
+ 6 1000000.4
1117
+ 6 1000000.2
1118
+ 6 1000000.4
1119
+ 6 1000000.2
1120
+ 6 1000000.4
1121
+ 6 1000000.2
1122
+ 6 1000000.4
1123
+ 6 1000000.2
1124
+ 6 1000000.4
1125
+ 6 1000000.2
1126
+ 6 1000000.4
1127
+ 6 1000000.2
1128
+ 6 1000000.4
1129
+ 6 1000000.2
1130
+ 6 1000000.4
1131
+ 6 1000000.2
1132
+ 6 1000000.4
1133
+ 6 1000000.2
1134
+ 6 1000000.4
1135
+ 6 1000000.2
1136
+ 6 1000000.4
1137
+ 6 1000000.2
1138
+ 6 1000000.4
1139
+ 6 1000000.2
1140
+ 6 1000000.4
1141
+ 6 1000000.2
1142
+ 6 1000000.4
1143
+ 6 1000000.2
1144
+ 6 1000000.4
1145
+ 6 1000000.2
1146
+ 6 1000000.4
1147
+ 6 1000000.2
1148
+ 6 1000000.4
1149
+ 6 1000000.2
1150
+ 6 1000000.4
1151
+ 6 1000000.2
1152
+ 6 1000000.4
1153
+ 6 1000000.2
1154
+ 6 1000000.4
1155
+ 6 1000000.2
1156
+ 6 1000000.4
1157
+ 6 1000000.2
1158
+ 6 1000000.4
1159
+ 6 1000000.2
1160
+ 6 1000000.4
1161
+ 6 1000000.2
1162
+ 6 1000000.4
1163
+ 6 1000000.2
1164
+ 6 1000000.4
1165
+ 6 1000000.2
1166
+ 6 1000000.4
1167
+ 6 1000000.2
1168
+ 6 1000000.4
1169
+ 6 1000000.2
1170
+ 6 1000000.4
1171
+ 6 1000000.2
1172
+ 6 1000000.4
1173
+ 6 1000000.2
1174
+ 6 1000000.4
1175
+ 6 1000000.2
1176
+ 6 1000000.4
1177
+ 6 1000000.2
1178
+ 6 1000000.4
1179
+ 6 1000000.2
1180
+ 6 1000000.4
1181
+ 6 1000000.2
1182
+ 6 1000000.4
1183
+ 6 1000000.2
1184
+ 6 1000000.4
1185
+ 6 1000000.2
1186
+ 6 1000000.4
1187
+ 6 1000000.2
1188
+ 6 1000000.4
1189
+ 6 1000000.2
1190
+ 6 1000000.4
1191
+ 6 1000000.2
1192
+ 6 1000000.4
1193
+ 6 1000000.2
1194
+ 6 1000000.4
1195
+ 6 1000000.2
1196
+ 6 1000000.4
1197
+ 6 1000000.2
1198
+ 6 1000000.4
1199
+ 6 1000000.2
1200
+ 6 1000000.4
1201
+ 6 1000000.2
1202
+ 6 1000000.4
1203
+ 6 1000000.2
1204
+ 6 1000000.4
1205
+ 6 1000000.2
1206
+ 6 1000000.4
1207
+ 6 1000000.2
1208
+ 6 1000000.4
1209
+ 6 1000000.2
1210
+ 6 1000000.4
1211
+ 6 1000000.2
1212
+ 6 1000000.4
1213
+ 6 1000000.2
1214
+ 6 1000000.4
1215
+ 6 1000000.2
1216
+ 6 1000000.4
1217
+ 6 1000000.2
1218
+ 6 1000000.4
1219
+ 6 1000000.2
1220
+ 6 1000000.4
1221
+ 6 1000000.2
1222
+ 6 1000000.4
1223
+ 6 1000000.2
1224
+ 6 1000000.4
1225
+ 6 1000000.2
1226
+ 6 1000000.4
1227
+ 6 1000000.2
1228
+ 6 1000000.4
1229
+ 6 1000000.2
1230
+ 6 1000000.4
1231
+ 6 1000000.2
1232
+ 6 1000000.4
1233
+ 6 1000000.2
1234
+ 6 1000000.4
1235
+ 6 1000000.2
1236
+ 6 1000000.4
1237
+ 6 1000000.2
1238
+ 6 1000000.4
1239
+ 6 1000000.2
1240
+ 6 1000000.4
1241
+ 6 1000000.2
1242
+ 6 1000000.4
1243
+ 6 1000000.2
1244
+ 6 1000000.4
1245
+ 6 1000000.2
1246
+ 6 1000000.4
1247
+ 6 1000000.2
1248
+ 6 1000000.4
1249
+ 6 1000000.2
1250
+ 6 1000000.4
1251
+ 6 1000000.2
1252
+ 6 1000000.4
1253
+ 6 1000000.2
1254
+ 6 1000000.4
1255
+ 6 1000000.2
1256
+ 6 1000000.4
1257
+ 6 1000000.2
1258
+ 6 1000000.4
1259
+ 6 1000000.2
1260
+ 6 1000000.4
1261
+ 6 1000000.2
1262
+ 6 1000000.4
1263
+ 6 1000000.2
1264
+ 6 1000000.4
1265
+ 6 1000000.2
1266
+ 6 1000000.4
1267
+ 7 1000000.5
1268
+ 7 1000000.4
1269
+ 7 1000000.6
1270
+ 7 1000000.4
1271
+ 7 1000000.6
1272
+ 7 1000000.4
1273
+ 7 1000000.6
1274
+ 7 1000000.4
1275
+ 7 1000000.6
1276
+ 7 1000000.4
1277
+ 7 1000000.6
1278
+ 7 1000000.4
1279
+ 7 1000000.6
1280
+ 7 1000000.4
1281
+ 7 1000000.6
1282
+ 7 1000000.4
1283
+ 7 1000000.6
1284
+ 7 1000000.4
1285
+ 7 1000000.6
1286
+ 7 1000000.4
1287
+ 7 1000000.6
1288
+ 7 1000000.4
1289
+ 7 1000000.6
1290
+ 7 1000000.4
1291
+ 7 1000000.6
1292
+ 7 1000000.4
1293
+ 7 1000000.6
1294
+ 7 1000000.4
1295
+ 7 1000000.6
1296
+ 7 1000000.4
1297
+ 7 1000000.6
1298
+ 7 1000000.4
1299
+ 7 1000000.6
1300
+ 7 1000000.4
1301
+ 7 1000000.6
1302
+ 7 1000000.4
1303
+ 7 1000000.6
1304
+ 7 1000000.4
1305
+ 7 1000000.6
1306
+ 7 1000000.4
1307
+ 7 1000000.6
1308
+ 7 1000000.4
1309
+ 7 1000000.6
1310
+ 7 1000000.4
1311
+ 7 1000000.6
1312
+ 7 1000000.4
1313
+ 7 1000000.6
1314
+ 7 1000000.4
1315
+ 7 1000000.6
1316
+ 7 1000000.4
1317
+ 7 1000000.6
1318
+ 7 1000000.4
1319
+ 7 1000000.6
1320
+ 7 1000000.4
1321
+ 7 1000000.6
1322
+ 7 1000000.4
1323
+ 7 1000000.6
1324
+ 7 1000000.4
1325
+ 7 1000000.6
1326
+ 7 1000000.4
1327
+ 7 1000000.6
1328
+ 7 1000000.4
1329
+ 7 1000000.6
1330
+ 7 1000000.4
1331
+ 7 1000000.6
1332
+ 7 1000000.4
1333
+ 7 1000000.6
1334
+ 7 1000000.4
1335
+ 7 1000000.6
1336
+ 7 1000000.4
1337
+ 7 1000000.6
1338
+ 7 1000000.4
1339
+ 7 1000000.6
1340
+ 7 1000000.4
1341
+ 7 1000000.6
1342
+ 7 1000000.4
1343
+ 7 1000000.6
1344
+ 7 1000000.4
1345
+ 7 1000000.6
1346
+ 7 1000000.4
1347
+ 7 1000000.6
1348
+ 7 1000000.4
1349
+ 7 1000000.6
1350
+ 7 1000000.4
1351
+ 7 1000000.6
1352
+ 7 1000000.4
1353
+ 7 1000000.6
1354
+ 7 1000000.4
1355
+ 7 1000000.6
1356
+ 7 1000000.4
1357
+ 7 1000000.6
1358
+ 7 1000000.4
1359
+ 7 1000000.6
1360
+ 7 1000000.4
1361
+ 7 1000000.6
1362
+ 7 1000000.4
1363
+ 7 1000000.6
1364
+ 7 1000000.4
1365
+ 7 1000000.6
1366
+ 7 1000000.4
1367
+ 7 1000000.6
1368
+ 7 1000000.4
1369
+ 7 1000000.6
1370
+ 7 1000000.4
1371
+ 7 1000000.6
1372
+ 7 1000000.4
1373
+ 7 1000000.6
1374
+ 7 1000000.4
1375
+ 7 1000000.6
1376
+ 7 1000000.4
1377
+ 7 1000000.6
1378
+ 7 1000000.4
1379
+ 7 1000000.6
1380
+ 7 1000000.4
1381
+ 7 1000000.6
1382
+ 7 1000000.4
1383
+ 7 1000000.6
1384
+ 7 1000000.4
1385
+ 7 1000000.6
1386
+ 7 1000000.4
1387
+ 7 1000000.6
1388
+ 7 1000000.4
1389
+ 7 1000000.6
1390
+ 7 1000000.4
1391
+ 7 1000000.6
1392
+ 7 1000000.4
1393
+ 7 1000000.6
1394
+ 7 1000000.4
1395
+ 7 1000000.6
1396
+ 7 1000000.4
1397
+ 7 1000000.6
1398
+ 7 1000000.4
1399
+ 7 1000000.6
1400
+ 7 1000000.4
1401
+ 7 1000000.6
1402
+ 7 1000000.4
1403
+ 7 1000000.6
1404
+ 7 1000000.4
1405
+ 7 1000000.6
1406
+ 7 1000000.4
1407
+ 7 1000000.6
1408
+ 7 1000000.4
1409
+ 7 1000000.6
1410
+ 7 1000000.4
1411
+ 7 1000000.6
1412
+ 7 1000000.4
1413
+ 7 1000000.6
1414
+ 7 1000000.4
1415
+ 7 1000000.6
1416
+ 7 1000000.4
1417
+ 7 1000000.6
1418
+ 7 1000000.4
1419
+ 7 1000000.6
1420
+ 7 1000000.4
1421
+ 7 1000000.6
1422
+ 7 1000000.4
1423
+ 7 1000000.6
1424
+ 7 1000000.4
1425
+ 7 1000000.6
1426
+ 7 1000000.4
1427
+ 7 1000000.6
1428
+ 7 1000000.4
1429
+ 7 1000000.6
1430
+ 7 1000000.4
1431
+ 7 1000000.6
1432
+ 7 1000000.4
1433
+ 7 1000000.6
1434
+ 7 1000000.4
1435
+ 7 1000000.6
1436
+ 7 1000000.4
1437
+ 7 1000000.6
1438
+ 7 1000000.4
1439
+ 7 1000000.6
1440
+ 7 1000000.4
1441
+ 7 1000000.6
1442
+ 7 1000000.4
1443
+ 7 1000000.6
1444
+ 7 1000000.4
1445
+ 7 1000000.6
1446
+ 7 1000000.4
1447
+ 7 1000000.6
1448
+ 7 1000000.4
1449
+ 7 1000000.6
1450
+ 7 1000000.4
1451
+ 7 1000000.6
1452
+ 7 1000000.4
1453
+ 7 1000000.6
1454
+ 7 1000000.4
1455
+ 7 1000000.6
1456
+ 7 1000000.4
1457
+ 7 1000000.6
1458
+ 7 1000000.4
1459
+ 7 1000000.6
1460
+ 7 1000000.4
1461
+ 7 1000000.6
1462
+ 7 1000000.4
1463
+ 7 1000000.6
1464
+ 7 1000000.4
1465
+ 7 1000000.6
1466
+ 7 1000000.4
1467
+ 7 1000000.6
1468
+ 8 1000000.3
1469
+ 8 1000000.2
1470
+ 8 1000000.4
1471
+ 8 1000000.2
1472
+ 8 1000000.4
1473
+ 8 1000000.2
1474
+ 8 1000000.4
1475
+ 8 1000000.2
1476
+ 8 1000000.4
1477
+ 8 1000000.2
1478
+ 8 1000000.4
1479
+ 8 1000000.2
1480
+ 8 1000000.4
1481
+ 8 1000000.2
1482
+ 8 1000000.4
1483
+ 8 1000000.2
1484
+ 8 1000000.4
1485
+ 8 1000000.2
1486
+ 8 1000000.4
1487
+ 8 1000000.2
1488
+ 8 1000000.4
1489
+ 8 1000000.2
1490
+ 8 1000000.4
1491
+ 8 1000000.2
1492
+ 8 1000000.4
1493
+ 8 1000000.2
1494
+ 8 1000000.4
1495
+ 8 1000000.2
1496
+ 8 1000000.4
1497
+ 8 1000000.2
1498
+ 8 1000000.4
1499
+ 8 1000000.2
1500
+ 8 1000000.4
1501
+ 8 1000000.2
1502
+ 8 1000000.4
1503
+ 8 1000000.2
1504
+ 8 1000000.4
1505
+ 8 1000000.2
1506
+ 8 1000000.4
1507
+ 8 1000000.2
1508
+ 8 1000000.4
1509
+ 8 1000000.2
1510
+ 8 1000000.4
1511
+ 8 1000000.2
1512
+ 8 1000000.4
1513
+ 8 1000000.2
1514
+ 8 1000000.4
1515
+ 8 1000000.2
1516
+ 8 1000000.4
1517
+ 8 1000000.2
1518
+ 8 1000000.4
1519
+ 8 1000000.2
1520
+ 8 1000000.4
1521
+ 8 1000000.2
1522
+ 8 1000000.4
1523
+ 8 1000000.2
1524
+ 8 1000000.4
1525
+ 8 1000000.2
1526
+ 8 1000000.4
1527
+ 8 1000000.2
1528
+ 8 1000000.4
1529
+ 8 1000000.2
1530
+ 8 1000000.4
1531
+ 8 1000000.2
1532
+ 8 1000000.4
1533
+ 8 1000000.2
1534
+ 8 1000000.4
1535
+ 8 1000000.2
1536
+ 8 1000000.4
1537
+ 8 1000000.2
1538
+ 8 1000000.4
1539
+ 8 1000000.2
1540
+ 8 1000000.4
1541
+ 8 1000000.2
1542
+ 8 1000000.4
1543
+ 8 1000000.2
1544
+ 8 1000000.4
1545
+ 8 1000000.2
1546
+ 8 1000000.4
1547
+ 8 1000000.2
1548
+ 8 1000000.4
1549
+ 8 1000000.2
1550
+ 8 1000000.4
1551
+ 8 1000000.2
1552
+ 8 1000000.4
1553
+ 8 1000000.2
1554
+ 8 1000000.4
1555
+ 8 1000000.2
1556
+ 8 1000000.4
1557
+ 8 1000000.2
1558
+ 8 1000000.4
1559
+ 8 1000000.2
1560
+ 8 1000000.4
1561
+ 8 1000000.2
1562
+ 8 1000000.4
1563
+ 8 1000000.2
1564
+ 8 1000000.4
1565
+ 8 1000000.2
1566
+ 8 1000000.4
1567
+ 8 1000000.2
1568
+ 8 1000000.4
1569
+ 8 1000000.2
1570
+ 8 1000000.4
1571
+ 8 1000000.2
1572
+ 8 1000000.4
1573
+ 8 1000000.2
1574
+ 8 1000000.4
1575
+ 8 1000000.2
1576
+ 8 1000000.4
1577
+ 8 1000000.2
1578
+ 8 1000000.4
1579
+ 8 1000000.2
1580
+ 8 1000000.4
1581
+ 8 1000000.2
1582
+ 8 1000000.4
1583
+ 8 1000000.2
1584
+ 8 1000000.4
1585
+ 8 1000000.2
1586
+ 8 1000000.4
1587
+ 8 1000000.2
1588
+ 8 1000000.4
1589
+ 8 1000000.2
1590
+ 8 1000000.4
1591
+ 8 1000000.2
1592
+ 8 1000000.4
1593
+ 8 1000000.2
1594
+ 8 1000000.4
1595
+ 8 1000000.2
1596
+ 8 1000000.4
1597
+ 8 1000000.2
1598
+ 8 1000000.4
1599
+ 8 1000000.2
1600
+ 8 1000000.4
1601
+ 8 1000000.2
1602
+ 8 1000000.4
1603
+ 8 1000000.2
1604
+ 8 1000000.4
1605
+ 8 1000000.2
1606
+ 8 1000000.4
1607
+ 8 1000000.2
1608
+ 8 1000000.4
1609
+ 8 1000000.2
1610
+ 8 1000000.4
1611
+ 8 1000000.2
1612
+ 8 1000000.4
1613
+ 8 1000000.2
1614
+ 8 1000000.4
1615
+ 8 1000000.2
1616
+ 8 1000000.4
1617
+ 8 1000000.2
1618
+ 8 1000000.4
1619
+ 8 1000000.2
1620
+ 8 1000000.4
1621
+ 8 1000000.2
1622
+ 8 1000000.4
1623
+ 8 1000000.2
1624
+ 8 1000000.4
1625
+ 8 1000000.2
1626
+ 8 1000000.4
1627
+ 8 1000000.2
1628
+ 8 1000000.4
1629
+ 8 1000000.2
1630
+ 8 1000000.4
1631
+ 8 1000000.2
1632
+ 8 1000000.4
1633
+ 8 1000000.2
1634
+ 8 1000000.4
1635
+ 8 1000000.2
1636
+ 8 1000000.4
1637
+ 8 1000000.2
1638
+ 8 1000000.4
1639
+ 8 1000000.2
1640
+ 8 1000000.4
1641
+ 8 1000000.2
1642
+ 8 1000000.4
1643
+ 8 1000000.2
1644
+ 8 1000000.4
1645
+ 8 1000000.2
1646
+ 8 1000000.4
1647
+ 8 1000000.2
1648
+ 8 1000000.4
1649
+ 8 1000000.2
1650
+ 8 1000000.4
1651
+ 8 1000000.2
1652
+ 8 1000000.4
1653
+ 8 1000000.2
1654
+ 8 1000000.4
1655
+ 8 1000000.2
1656
+ 8 1000000.4
1657
+ 8 1000000.2
1658
+ 8 1000000.4
1659
+ 8 1000000.2
1660
+ 8 1000000.4
1661
+ 8 1000000.2
1662
+ 8 1000000.4
1663
+ 8 1000000.2
1664
+ 8 1000000.4
1665
+ 8 1000000.2
1666
+ 8 1000000.4
1667
+ 8 1000000.2
1668
+ 8 1000000.4
1669
+ 9 1000000.5
1670
+ 9 1000000.4
1671
+ 9 1000000.6
1672
+ 9 1000000.4
1673
+ 9 1000000.6
1674
+ 9 1000000.4
1675
+ 9 1000000.6
1676
+ 9 1000000.4
1677
+ 9 1000000.6
1678
+ 9 1000000.4
1679
+ 9 1000000.6
1680
+ 9 1000000.4
1681
+ 9 1000000.6
1682
+ 9 1000000.4
1683
+ 9 1000000.6
1684
+ 9 1000000.4
1685
+ 9 1000000.6
1686
+ 9 1000000.4
1687
+ 9 1000000.6
1688
+ 9 1000000.4
1689
+ 9 1000000.6
1690
+ 9 1000000.4
1691
+ 9 1000000.6
1692
+ 9 1000000.4
1693
+ 9 1000000.6
1694
+ 9 1000000.4
1695
+ 9 1000000.6
1696
+ 9 1000000.4
1697
+ 9 1000000.6
1698
+ 9 1000000.4
1699
+ 9 1000000.6
1700
+ 9 1000000.4
1701
+ 9 1000000.6
1702
+ 9 1000000.4
1703
+ 9 1000000.6
1704
+ 9 1000000.4
1705
+ 9 1000000.6
1706
+ 9 1000000.4
1707
+ 9 1000000.6
1708
+ 9 1000000.4
1709
+ 9 1000000.6
1710
+ 9 1000000.4
1711
+ 9 1000000.6
1712
+ 9 1000000.4
1713
+ 9 1000000.6
1714
+ 9 1000000.4
1715
+ 9 1000000.6
1716
+ 9 1000000.4
1717
+ 9 1000000.6
1718
+ 9 1000000.4
1719
+ 9 1000000.6
1720
+ 9 1000000.4
1721
+ 9 1000000.6
1722
+ 9 1000000.4
1723
+ 9 1000000.6
1724
+ 9 1000000.4
1725
+ 9 1000000.6
1726
+ 9 1000000.4
1727
+ 9 1000000.6
1728
+ 9 1000000.4
1729
+ 9 1000000.6
1730
+ 9 1000000.4
1731
+ 9 1000000.6
1732
+ 9 1000000.4
1733
+ 9 1000000.6
1734
+ 9 1000000.4
1735
+ 9 1000000.6
1736
+ 9 1000000.4
1737
+ 9 1000000.6
1738
+ 9 1000000.4
1739
+ 9 1000000.6
1740
+ 9 1000000.4
1741
+ 9 1000000.6
1742
+ 9 1000000.4
1743
+ 9 1000000.6
1744
+ 9 1000000.4
1745
+ 9 1000000.6
1746
+ 9 1000000.4
1747
+ 9 1000000.6
1748
+ 9 1000000.4
1749
+ 9 1000000.6
1750
+ 9 1000000.4
1751
+ 9 1000000.6
1752
+ 9 1000000.4
1753
+ 9 1000000.6
1754
+ 9 1000000.4
1755
+ 9 1000000.6
1756
+ 9 1000000.4
1757
+ 9 1000000.6
1758
+ 9 1000000.4
1759
+ 9 1000000.6
1760
+ 9 1000000.4
1761
+ 9 1000000.6
1762
+ 9 1000000.4
1763
+ 9 1000000.6
1764
+ 9 1000000.4
1765
+ 9 1000000.6
1766
+ 9 1000000.4
1767
+ 9 1000000.6
1768
+ 9 1000000.4
1769
+ 9 1000000.6
1770
+ 9 1000000.4
1771
+ 9 1000000.6
1772
+ 9 1000000.4
1773
+ 9 1000000.6
1774
+ 9 1000000.4
1775
+ 9 1000000.6
1776
+ 9 1000000.4
1777
+ 9 1000000.6
1778
+ 9 1000000.4
1779
+ 9 1000000.6
1780
+ 9 1000000.4
1781
+ 9 1000000.6
1782
+ 9 1000000.4
1783
+ 9 1000000.6
1784
+ 9 1000000.4
1785
+ 9 1000000.6
1786
+ 9 1000000.4
1787
+ 9 1000000.6
1788
+ 9 1000000.4
1789
+ 9 1000000.6
1790
+ 9 1000000.4
1791
+ 9 1000000.6
1792
+ 9 1000000.4
1793
+ 9 1000000.6
1794
+ 9 1000000.4
1795
+ 9 1000000.6
1796
+ 9 1000000.4
1797
+ 9 1000000.6
1798
+ 9 1000000.4
1799
+ 9 1000000.6
1800
+ 9 1000000.4
1801
+ 9 1000000.6
1802
+ 9 1000000.4
1803
+ 9 1000000.6
1804
+ 9 1000000.4
1805
+ 9 1000000.6
1806
+ 9 1000000.4
1807
+ 9 1000000.6
1808
+ 9 1000000.4
1809
+ 9 1000000.6
1810
+ 9 1000000.4
1811
+ 9 1000000.6
1812
+ 9 1000000.4
1813
+ 9 1000000.6
1814
+ 9 1000000.4
1815
+ 9 1000000.6
1816
+ 9 1000000.4
1817
+ 9 1000000.6
1818
+ 9 1000000.4
1819
+ 9 1000000.6
1820
+ 9 1000000.4
1821
+ 9 1000000.6
1822
+ 9 1000000.4
1823
+ 9 1000000.6
1824
+ 9 1000000.4
1825
+ 9 1000000.6
1826
+ 9 1000000.4
1827
+ 9 1000000.6
1828
+ 9 1000000.4
1829
+ 9 1000000.6
1830
+ 9 1000000.4
1831
+ 9 1000000.6
1832
+ 9 1000000.4
1833
+ 9 1000000.6
1834
+ 9 1000000.4
1835
+ 9 1000000.6
1836
+ 9 1000000.4
1837
+ 9 1000000.6
1838
+ 9 1000000.4
1839
+ 9 1000000.6
1840
+ 9 1000000.4
1841
+ 9 1000000.6
1842
+ 9 1000000.4
1843
+ 9 1000000.6
1844
+ 9 1000000.4
1845
+ 9 1000000.6
1846
+ 9 1000000.4
1847
+ 9 1000000.6
1848
+ 9 1000000.4
1849
+ 9 1000000.6
1850
+ 9 1000000.4
1851
+ 9 1000000.6
1852
+ 9 1000000.4
1853
+ 9 1000000.6
1854
+ 9 1000000.4
1855
+ 9 1000000.6
1856
+ 9 1000000.4
1857
+ 9 1000000.6
1858
+ 9 1000000.4
1859
+ 9 1000000.6
1860
+ 9 1000000.4
1861
+ 9 1000000.6
1862
+ 9 1000000.4
1863
+ 9 1000000.6
1864
+ 9 1000000.4
1865
+ 9 1000000.6
1866
+ 9 1000000.4
1867
+ 9 1000000.6
1868
+ 9 1000000.4
1869
+ 9 1000000.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs06.dat ADDED
The diff for this file is too large to render. See raw diff
 
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs07.dat ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs07 (SmLs07.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 249)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 21 Replicates/Cell
22
+ 189 Observations
23
+ 13 Constant Leading Digits
24
+ Higher Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.68000000000000E+00 2.10000000000000E-01 2.10000000000000E+01
42
+ Within Treatment 180 1.80000000000000E+00 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.82758620689655E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1000000000000.4
62
+ 1 1000000000000.3
63
+ 1 1000000000000.5
64
+ 1 1000000000000.3
65
+ 1 1000000000000.5
66
+ 1 1000000000000.3
67
+ 1 1000000000000.5
68
+ 1 1000000000000.3
69
+ 1 1000000000000.5
70
+ 1 1000000000000.3
71
+ 1 1000000000000.5
72
+ 1 1000000000000.3
73
+ 1 1000000000000.5
74
+ 1 1000000000000.3
75
+ 1 1000000000000.5
76
+ 1 1000000000000.3
77
+ 1 1000000000000.5
78
+ 1 1000000000000.3
79
+ 1 1000000000000.5
80
+ 1 1000000000000.3
81
+ 1 1000000000000.5
82
+ 2 1000000000000.3
83
+ 2 1000000000000.2
84
+ 2 1000000000000.4
85
+ 2 1000000000000.2
86
+ 2 1000000000000.4
87
+ 2 1000000000000.2
88
+ 2 1000000000000.4
89
+ 2 1000000000000.2
90
+ 2 1000000000000.4
91
+ 2 1000000000000.2
92
+ 2 1000000000000.4
93
+ 2 1000000000000.2
94
+ 2 1000000000000.4
95
+ 2 1000000000000.2
96
+ 2 1000000000000.4
97
+ 2 1000000000000.2
98
+ 2 1000000000000.4
99
+ 2 1000000000000.2
100
+ 2 1000000000000.4
101
+ 2 1000000000000.2
102
+ 2 1000000000000.4
103
+ 3 1000000000000.5
104
+ 3 1000000000000.4
105
+ 3 1000000000000.6
106
+ 3 1000000000000.4
107
+ 3 1000000000000.6
108
+ 3 1000000000000.4
109
+ 3 1000000000000.6
110
+ 3 1000000000000.4
111
+ 3 1000000000000.6
112
+ 3 1000000000000.4
113
+ 3 1000000000000.6
114
+ 3 1000000000000.4
115
+ 3 1000000000000.6
116
+ 3 1000000000000.4
117
+ 3 1000000000000.6
118
+ 3 1000000000000.4
119
+ 3 1000000000000.6
120
+ 3 1000000000000.4
121
+ 3 1000000000000.6
122
+ 3 1000000000000.4
123
+ 3 1000000000000.6
124
+ 4 1000000000000.3
125
+ 4 1000000000000.2
126
+ 4 1000000000000.4
127
+ 4 1000000000000.2
128
+ 4 1000000000000.4
129
+ 4 1000000000000.2
130
+ 4 1000000000000.4
131
+ 4 1000000000000.2
132
+ 4 1000000000000.4
133
+ 4 1000000000000.2
134
+ 4 1000000000000.4
135
+ 4 1000000000000.2
136
+ 4 1000000000000.4
137
+ 4 1000000000000.2
138
+ 4 1000000000000.4
139
+ 4 1000000000000.2
140
+ 4 1000000000000.4
141
+ 4 1000000000000.2
142
+ 4 1000000000000.4
143
+ 4 1000000000000.2
144
+ 4 1000000000000.4
145
+ 5 1000000000000.5
146
+ 5 1000000000000.4
147
+ 5 1000000000000.6
148
+ 5 1000000000000.4
149
+ 5 1000000000000.6
150
+ 5 1000000000000.4
151
+ 5 1000000000000.6
152
+ 5 1000000000000.4
153
+ 5 1000000000000.6
154
+ 5 1000000000000.4
155
+ 5 1000000000000.6
156
+ 5 1000000000000.4
157
+ 5 1000000000000.6
158
+ 5 1000000000000.4
159
+ 5 1000000000000.6
160
+ 5 1000000000000.4
161
+ 5 1000000000000.6
162
+ 5 1000000000000.4
163
+ 5 1000000000000.6
164
+ 5 1000000000000.4
165
+ 5 1000000000000.6
166
+ 6 1000000000000.3
167
+ 6 1000000000000.2
168
+ 6 1000000000000.4
169
+ 6 1000000000000.2
170
+ 6 1000000000000.4
171
+ 6 1000000000000.2
172
+ 6 1000000000000.4
173
+ 6 1000000000000.2
174
+ 6 1000000000000.4
175
+ 6 1000000000000.2
176
+ 6 1000000000000.4
177
+ 6 1000000000000.2
178
+ 6 1000000000000.4
179
+ 6 1000000000000.2
180
+ 6 1000000000000.4
181
+ 6 1000000000000.2
182
+ 6 1000000000000.4
183
+ 6 1000000000000.2
184
+ 6 1000000000000.4
185
+ 6 1000000000000.2
186
+ 6 1000000000000.4
187
+ 7 1000000000000.5
188
+ 7 1000000000000.4
189
+ 7 1000000000000.6
190
+ 7 1000000000000.4
191
+ 7 1000000000000.6
192
+ 7 1000000000000.4
193
+ 7 1000000000000.6
194
+ 7 1000000000000.4
195
+ 7 1000000000000.6
196
+ 7 1000000000000.4
197
+ 7 1000000000000.6
198
+ 7 1000000000000.4
199
+ 7 1000000000000.6
200
+ 7 1000000000000.4
201
+ 7 1000000000000.6
202
+ 7 1000000000000.4
203
+ 7 1000000000000.6
204
+ 7 1000000000000.4
205
+ 7 1000000000000.6
206
+ 7 1000000000000.4
207
+ 7 1000000000000.6
208
+ 8 1000000000000.3
209
+ 8 1000000000000.2
210
+ 8 1000000000000.4
211
+ 8 1000000000000.2
212
+ 8 1000000000000.4
213
+ 8 1000000000000.2
214
+ 8 1000000000000.4
215
+ 8 1000000000000.2
216
+ 8 1000000000000.4
217
+ 8 1000000000000.2
218
+ 8 1000000000000.4
219
+ 8 1000000000000.2
220
+ 8 1000000000000.4
221
+ 8 1000000000000.2
222
+ 8 1000000000000.4
223
+ 8 1000000000000.2
224
+ 8 1000000000000.4
225
+ 8 1000000000000.2
226
+ 8 1000000000000.4
227
+ 8 1000000000000.2
228
+ 8 1000000000000.4
229
+ 9 1000000000000.5
230
+ 9 1000000000000.4
231
+ 9 1000000000000.6
232
+ 9 1000000000000.4
233
+ 9 1000000000000.6
234
+ 9 1000000000000.4
235
+ 9 1000000000000.6
236
+ 9 1000000000000.4
237
+ 9 1000000000000.6
238
+ 9 1000000000000.4
239
+ 9 1000000000000.6
240
+ 9 1000000000000.4
241
+ 9 1000000000000.6
242
+ 9 1000000000000.4
243
+ 9 1000000000000.6
244
+ 9 1000000000000.4
245
+ 9 1000000000000.6
246
+ 9 1000000000000.4
247
+ 9 1000000000000.6
248
+ 9 1000000000000.4
249
+ 9 1000000000000.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs08.dat ADDED
@@ -0,0 +1,1869 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: SmLs08 (SmLs08.dat)
3
+
4
+
5
+ File Format: ASCII
6
+ Certified Values (lines 41 to 47)
7
+ Data (lines 61 to 1869)
8
+
9
+
10
+ Procedure: Analysis of Variance
11
+
12
+
13
+ Reference: Simon, Stephen D. and Lesage, James P. (1989).
14
+ "Assessing the Accuracy of ANOVA Calculations in
15
+ Statistical Software".
16
+ Computational Statistics & Data Analysis, 8, pp. 325-332.
17
+
18
+
19
+ Data: 1 Factor
20
+ 9 Treatments
21
+ 201 Replicates/Cell
22
+ 1809 Observations
23
+ 13 Constant Leading Digits
24
+ Higher Level of Difficulty
25
+ Generated Data
26
+
27
+
28
+ Model: 10 Parameters (mu,tau_1, ... , tau_9)
29
+ y_{ij} = mu + tau_i + epsilon_{ij}
30
+
31
+
32
+
33
+
34
+
35
+
36
+ Certified Values:
37
+
38
+ Source of Sums of Mean
39
+ Variation df Squares Squares F Statistic
40
+
41
+ Between Treatment 8 1.60800000000000E+01 2.01000000000000E+00 2.01000000000000E+02
42
+ Within Treatment 1800 1.80000000000000E+01 1.00000000000000E-02
43
+
44
+ Certified R-Squared 4.71830985915493E-01
45
+
46
+ Certified Residual
47
+ Standard Deviation 1.00000000000000E-01
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: Treatment Response
61
+ 1 1000000000000.4
62
+ 1 1000000000000.3
63
+ 1 1000000000000.5
64
+ 1 1000000000000.3
65
+ 1 1000000000000.5
66
+ 1 1000000000000.3
67
+ 1 1000000000000.5
68
+ 1 1000000000000.3
69
+ 1 1000000000000.5
70
+ 1 1000000000000.3
71
+ 1 1000000000000.5
72
+ 1 1000000000000.3
73
+ 1 1000000000000.5
74
+ 1 1000000000000.3
75
+ 1 1000000000000.5
76
+ 1 1000000000000.3
77
+ 1 1000000000000.5
78
+ 1 1000000000000.3
79
+ 1 1000000000000.5
80
+ 1 1000000000000.3
81
+ 1 1000000000000.5
82
+ 1 1000000000000.3
83
+ 1 1000000000000.5
84
+ 1 1000000000000.3
85
+ 1 1000000000000.5
86
+ 1 1000000000000.3
87
+ 1 1000000000000.5
88
+ 1 1000000000000.3
89
+ 1 1000000000000.5
90
+ 1 1000000000000.3
91
+ 1 1000000000000.5
92
+ 1 1000000000000.3
93
+ 1 1000000000000.5
94
+ 1 1000000000000.3
95
+ 1 1000000000000.5
96
+ 1 1000000000000.3
97
+ 1 1000000000000.5
98
+ 1 1000000000000.3
99
+ 1 1000000000000.5
100
+ 1 1000000000000.3
101
+ 1 1000000000000.5
102
+ 1 1000000000000.3
103
+ 1 1000000000000.5
104
+ 1 1000000000000.3
105
+ 1 1000000000000.5
106
+ 1 1000000000000.3
107
+ 1 1000000000000.5
108
+ 1 1000000000000.3
109
+ 1 1000000000000.5
110
+ 1 1000000000000.3
111
+ 1 1000000000000.5
112
+ 1 1000000000000.3
113
+ 1 1000000000000.5
114
+ 1 1000000000000.3
115
+ 1 1000000000000.5
116
+ 1 1000000000000.3
117
+ 1 1000000000000.5
118
+ 1 1000000000000.3
119
+ 1 1000000000000.5
120
+ 1 1000000000000.3
121
+ 1 1000000000000.5
122
+ 1 1000000000000.3
123
+ 1 1000000000000.5
124
+ 1 1000000000000.3
125
+ 1 1000000000000.5
126
+ 1 1000000000000.3
127
+ 1 1000000000000.5
128
+ 1 1000000000000.3
129
+ 1 1000000000000.5
130
+ 1 1000000000000.3
131
+ 1 1000000000000.5
132
+ 1 1000000000000.3
133
+ 1 1000000000000.5
134
+ 1 1000000000000.3
135
+ 1 1000000000000.5
136
+ 1 1000000000000.3
137
+ 1 1000000000000.5
138
+ 1 1000000000000.3
139
+ 1 1000000000000.5
140
+ 1 1000000000000.3
141
+ 1 1000000000000.5
142
+ 1 1000000000000.3
143
+ 1 1000000000000.5
144
+ 1 1000000000000.3
145
+ 1 1000000000000.5
146
+ 1 1000000000000.3
147
+ 1 1000000000000.5
148
+ 1 1000000000000.3
149
+ 1 1000000000000.5
150
+ 1 1000000000000.3
151
+ 1 1000000000000.5
152
+ 1 1000000000000.3
153
+ 1 1000000000000.5
154
+ 1 1000000000000.3
155
+ 1 1000000000000.5
156
+ 1 1000000000000.3
157
+ 1 1000000000000.5
158
+ 1 1000000000000.3
159
+ 1 1000000000000.5
160
+ 1 1000000000000.3
161
+ 1 1000000000000.5
162
+ 1 1000000000000.3
163
+ 1 1000000000000.5
164
+ 1 1000000000000.3
165
+ 1 1000000000000.5
166
+ 1 1000000000000.3
167
+ 1 1000000000000.5
168
+ 1 1000000000000.3
169
+ 1 1000000000000.5
170
+ 1 1000000000000.3
171
+ 1 1000000000000.5
172
+ 1 1000000000000.3
173
+ 1 1000000000000.5
174
+ 1 1000000000000.3
175
+ 1 1000000000000.5
176
+ 1 1000000000000.3
177
+ 1 1000000000000.5
178
+ 1 1000000000000.3
179
+ 1 1000000000000.5
180
+ 1 1000000000000.3
181
+ 1 1000000000000.5
182
+ 1 1000000000000.3
183
+ 1 1000000000000.5
184
+ 1 1000000000000.3
185
+ 1 1000000000000.5
186
+ 1 1000000000000.3
187
+ 1 1000000000000.5
188
+ 1 1000000000000.3
189
+ 1 1000000000000.5
190
+ 1 1000000000000.3
191
+ 1 1000000000000.5
192
+ 1 1000000000000.3
193
+ 1 1000000000000.5
194
+ 1 1000000000000.3
195
+ 1 1000000000000.5
196
+ 1 1000000000000.3
197
+ 1 1000000000000.5
198
+ 1 1000000000000.3
199
+ 1 1000000000000.5
200
+ 1 1000000000000.3
201
+ 1 1000000000000.5
202
+ 1 1000000000000.3
203
+ 1 1000000000000.5
204
+ 1 1000000000000.3
205
+ 1 1000000000000.5
206
+ 1 1000000000000.3
207
+ 1 1000000000000.5
208
+ 1 1000000000000.3
209
+ 1 1000000000000.5
210
+ 1 1000000000000.3
211
+ 1 1000000000000.5
212
+ 1 1000000000000.3
213
+ 1 1000000000000.5
214
+ 1 1000000000000.3
215
+ 1 1000000000000.5
216
+ 1 1000000000000.3
217
+ 1 1000000000000.5
218
+ 1 1000000000000.3
219
+ 1 1000000000000.5
220
+ 1 1000000000000.3
221
+ 1 1000000000000.5
222
+ 1 1000000000000.3
223
+ 1 1000000000000.5
224
+ 1 1000000000000.3
225
+ 1 1000000000000.5
226
+ 1 1000000000000.3
227
+ 1 1000000000000.5
228
+ 1 1000000000000.3
229
+ 1 1000000000000.5
230
+ 1 1000000000000.3
231
+ 1 1000000000000.5
232
+ 1 1000000000000.3
233
+ 1 1000000000000.5
234
+ 1 1000000000000.3
235
+ 1 1000000000000.5
236
+ 1 1000000000000.3
237
+ 1 1000000000000.5
238
+ 1 1000000000000.3
239
+ 1 1000000000000.5
240
+ 1 1000000000000.3
241
+ 1 1000000000000.5
242
+ 1 1000000000000.3
243
+ 1 1000000000000.5
244
+ 1 1000000000000.3
245
+ 1 1000000000000.5
246
+ 1 1000000000000.3
247
+ 1 1000000000000.5
248
+ 1 1000000000000.3
249
+ 1 1000000000000.5
250
+ 1 1000000000000.3
251
+ 1 1000000000000.5
252
+ 1 1000000000000.3
253
+ 1 1000000000000.5
254
+ 1 1000000000000.3
255
+ 1 1000000000000.5
256
+ 1 1000000000000.3
257
+ 1 1000000000000.5
258
+ 1 1000000000000.3
259
+ 1 1000000000000.5
260
+ 1 1000000000000.3
261
+ 1 1000000000000.5
262
+ 2 1000000000000.3
263
+ 2 1000000000000.2
264
+ 2 1000000000000.4
265
+ 2 1000000000000.2
266
+ 2 1000000000000.4
267
+ 2 1000000000000.2
268
+ 2 1000000000000.4
269
+ 2 1000000000000.2
270
+ 2 1000000000000.4
271
+ 2 1000000000000.2
272
+ 2 1000000000000.4
273
+ 2 1000000000000.2
274
+ 2 1000000000000.4
275
+ 2 1000000000000.2
276
+ 2 1000000000000.4
277
+ 2 1000000000000.2
278
+ 2 1000000000000.4
279
+ 2 1000000000000.2
280
+ 2 1000000000000.4
281
+ 2 1000000000000.2
282
+ 2 1000000000000.4
283
+ 2 1000000000000.2
284
+ 2 1000000000000.4
285
+ 2 1000000000000.2
286
+ 2 1000000000000.4
287
+ 2 1000000000000.2
288
+ 2 1000000000000.4
289
+ 2 1000000000000.2
290
+ 2 1000000000000.4
291
+ 2 1000000000000.2
292
+ 2 1000000000000.4
293
+ 2 1000000000000.2
294
+ 2 1000000000000.4
295
+ 2 1000000000000.2
296
+ 2 1000000000000.4
297
+ 2 1000000000000.2
298
+ 2 1000000000000.4
299
+ 2 1000000000000.2
300
+ 2 1000000000000.4
301
+ 2 1000000000000.2
302
+ 2 1000000000000.4
303
+ 2 1000000000000.2
304
+ 2 1000000000000.4
305
+ 2 1000000000000.2
306
+ 2 1000000000000.4
307
+ 2 1000000000000.2
308
+ 2 1000000000000.4
309
+ 2 1000000000000.2
310
+ 2 1000000000000.4
311
+ 2 1000000000000.2
312
+ 2 1000000000000.4
313
+ 2 1000000000000.2
314
+ 2 1000000000000.4
315
+ 2 1000000000000.2
316
+ 2 1000000000000.4
317
+ 2 1000000000000.2
318
+ 2 1000000000000.4
319
+ 2 1000000000000.2
320
+ 2 1000000000000.4
321
+ 2 1000000000000.2
322
+ 2 1000000000000.4
323
+ 2 1000000000000.2
324
+ 2 1000000000000.4
325
+ 2 1000000000000.2
326
+ 2 1000000000000.4
327
+ 2 1000000000000.2
328
+ 2 1000000000000.4
329
+ 2 1000000000000.2
330
+ 2 1000000000000.4
331
+ 2 1000000000000.2
332
+ 2 1000000000000.4
333
+ 2 1000000000000.2
334
+ 2 1000000000000.4
335
+ 2 1000000000000.2
336
+ 2 1000000000000.4
337
+ 2 1000000000000.2
338
+ 2 1000000000000.4
339
+ 2 1000000000000.2
340
+ 2 1000000000000.4
341
+ 2 1000000000000.2
342
+ 2 1000000000000.4
343
+ 2 1000000000000.2
344
+ 2 1000000000000.4
345
+ 2 1000000000000.2
346
+ 2 1000000000000.4
347
+ 2 1000000000000.2
348
+ 2 1000000000000.4
349
+ 2 1000000000000.2
350
+ 2 1000000000000.4
351
+ 2 1000000000000.2
352
+ 2 1000000000000.4
353
+ 2 1000000000000.2
354
+ 2 1000000000000.4
355
+ 2 1000000000000.2
356
+ 2 1000000000000.4
357
+ 2 1000000000000.2
358
+ 2 1000000000000.4
359
+ 2 1000000000000.2
360
+ 2 1000000000000.4
361
+ 2 1000000000000.2
362
+ 2 1000000000000.4
363
+ 2 1000000000000.2
364
+ 2 1000000000000.4
365
+ 2 1000000000000.2
366
+ 2 1000000000000.4
367
+ 2 1000000000000.2
368
+ 2 1000000000000.4
369
+ 2 1000000000000.2
370
+ 2 1000000000000.4
371
+ 2 1000000000000.2
372
+ 2 1000000000000.4
373
+ 2 1000000000000.2
374
+ 2 1000000000000.4
375
+ 2 1000000000000.2
376
+ 2 1000000000000.4
377
+ 2 1000000000000.2
378
+ 2 1000000000000.4
379
+ 2 1000000000000.2
380
+ 2 1000000000000.4
381
+ 2 1000000000000.2
382
+ 2 1000000000000.4
383
+ 2 1000000000000.2
384
+ 2 1000000000000.4
385
+ 2 1000000000000.2
386
+ 2 1000000000000.4
387
+ 2 1000000000000.2
388
+ 2 1000000000000.4
389
+ 2 1000000000000.2
390
+ 2 1000000000000.4
391
+ 2 1000000000000.2
392
+ 2 1000000000000.4
393
+ 2 1000000000000.2
394
+ 2 1000000000000.4
395
+ 2 1000000000000.2
396
+ 2 1000000000000.4
397
+ 2 1000000000000.2
398
+ 2 1000000000000.4
399
+ 2 1000000000000.2
400
+ 2 1000000000000.4
401
+ 2 1000000000000.2
402
+ 2 1000000000000.4
403
+ 2 1000000000000.2
404
+ 2 1000000000000.4
405
+ 2 1000000000000.2
406
+ 2 1000000000000.4
407
+ 2 1000000000000.2
408
+ 2 1000000000000.4
409
+ 2 1000000000000.2
410
+ 2 1000000000000.4
411
+ 2 1000000000000.2
412
+ 2 1000000000000.4
413
+ 2 1000000000000.2
414
+ 2 1000000000000.4
415
+ 2 1000000000000.2
416
+ 2 1000000000000.4
417
+ 2 1000000000000.2
418
+ 2 1000000000000.4
419
+ 2 1000000000000.2
420
+ 2 1000000000000.4
421
+ 2 1000000000000.2
422
+ 2 1000000000000.4
423
+ 2 1000000000000.2
424
+ 2 1000000000000.4
425
+ 2 1000000000000.2
426
+ 2 1000000000000.4
427
+ 2 1000000000000.2
428
+ 2 1000000000000.4
429
+ 2 1000000000000.2
430
+ 2 1000000000000.4
431
+ 2 1000000000000.2
432
+ 2 1000000000000.4
433
+ 2 1000000000000.2
434
+ 2 1000000000000.4
435
+ 2 1000000000000.2
436
+ 2 1000000000000.4
437
+ 2 1000000000000.2
438
+ 2 1000000000000.4
439
+ 2 1000000000000.2
440
+ 2 1000000000000.4
441
+ 2 1000000000000.2
442
+ 2 1000000000000.4
443
+ 2 1000000000000.2
444
+ 2 1000000000000.4
445
+ 2 1000000000000.2
446
+ 2 1000000000000.4
447
+ 2 1000000000000.2
448
+ 2 1000000000000.4
449
+ 2 1000000000000.2
450
+ 2 1000000000000.4
451
+ 2 1000000000000.2
452
+ 2 1000000000000.4
453
+ 2 1000000000000.2
454
+ 2 1000000000000.4
455
+ 2 1000000000000.2
456
+ 2 1000000000000.4
457
+ 2 1000000000000.2
458
+ 2 1000000000000.4
459
+ 2 1000000000000.2
460
+ 2 1000000000000.4
461
+ 2 1000000000000.2
462
+ 2 1000000000000.4
463
+ 3 1000000000000.5
464
+ 3 1000000000000.4
465
+ 3 1000000000000.6
466
+ 3 1000000000000.4
467
+ 3 1000000000000.6
468
+ 3 1000000000000.4
469
+ 3 1000000000000.6
470
+ 3 1000000000000.4
471
+ 3 1000000000000.6
472
+ 3 1000000000000.4
473
+ 3 1000000000000.6
474
+ 3 1000000000000.4
475
+ 3 1000000000000.6
476
+ 3 1000000000000.4
477
+ 3 1000000000000.6
478
+ 3 1000000000000.4
479
+ 3 1000000000000.6
480
+ 3 1000000000000.4
481
+ 3 1000000000000.6
482
+ 3 1000000000000.4
483
+ 3 1000000000000.6
484
+ 3 1000000000000.4
485
+ 3 1000000000000.6
486
+ 3 1000000000000.4
487
+ 3 1000000000000.6
488
+ 3 1000000000000.4
489
+ 3 1000000000000.6
490
+ 3 1000000000000.4
491
+ 3 1000000000000.6
492
+ 3 1000000000000.4
493
+ 3 1000000000000.6
494
+ 3 1000000000000.4
495
+ 3 1000000000000.6
496
+ 3 1000000000000.4
497
+ 3 1000000000000.6
498
+ 3 1000000000000.4
499
+ 3 1000000000000.6
500
+ 3 1000000000000.4
501
+ 3 1000000000000.6
502
+ 3 1000000000000.4
503
+ 3 1000000000000.6
504
+ 3 1000000000000.4
505
+ 3 1000000000000.6
506
+ 3 1000000000000.4
507
+ 3 1000000000000.6
508
+ 3 1000000000000.4
509
+ 3 1000000000000.6
510
+ 3 1000000000000.4
511
+ 3 1000000000000.6
512
+ 3 1000000000000.4
513
+ 3 1000000000000.6
514
+ 3 1000000000000.4
515
+ 3 1000000000000.6
516
+ 3 1000000000000.4
517
+ 3 1000000000000.6
518
+ 3 1000000000000.4
519
+ 3 1000000000000.6
520
+ 3 1000000000000.4
521
+ 3 1000000000000.6
522
+ 3 1000000000000.4
523
+ 3 1000000000000.6
524
+ 3 1000000000000.4
525
+ 3 1000000000000.6
526
+ 3 1000000000000.4
527
+ 3 1000000000000.6
528
+ 3 1000000000000.4
529
+ 3 1000000000000.6
530
+ 3 1000000000000.4
531
+ 3 1000000000000.6
532
+ 3 1000000000000.4
533
+ 3 1000000000000.6
534
+ 3 1000000000000.4
535
+ 3 1000000000000.6
536
+ 3 1000000000000.4
537
+ 3 1000000000000.6
538
+ 3 1000000000000.4
539
+ 3 1000000000000.6
540
+ 3 1000000000000.4
541
+ 3 1000000000000.6
542
+ 3 1000000000000.4
543
+ 3 1000000000000.6
544
+ 3 1000000000000.4
545
+ 3 1000000000000.6
546
+ 3 1000000000000.4
547
+ 3 1000000000000.6
548
+ 3 1000000000000.4
549
+ 3 1000000000000.6
550
+ 3 1000000000000.4
551
+ 3 1000000000000.6
552
+ 3 1000000000000.4
553
+ 3 1000000000000.6
554
+ 3 1000000000000.4
555
+ 3 1000000000000.6
556
+ 3 1000000000000.4
557
+ 3 1000000000000.6
558
+ 3 1000000000000.4
559
+ 3 1000000000000.6
560
+ 3 1000000000000.4
561
+ 3 1000000000000.6
562
+ 3 1000000000000.4
563
+ 3 1000000000000.6
564
+ 3 1000000000000.4
565
+ 3 1000000000000.6
566
+ 3 1000000000000.4
567
+ 3 1000000000000.6
568
+ 3 1000000000000.4
569
+ 3 1000000000000.6
570
+ 3 1000000000000.4
571
+ 3 1000000000000.6
572
+ 3 1000000000000.4
573
+ 3 1000000000000.6
574
+ 3 1000000000000.4
575
+ 3 1000000000000.6
576
+ 3 1000000000000.4
577
+ 3 1000000000000.6
578
+ 3 1000000000000.4
579
+ 3 1000000000000.6
580
+ 3 1000000000000.4
581
+ 3 1000000000000.6
582
+ 3 1000000000000.4
583
+ 3 1000000000000.6
584
+ 3 1000000000000.4
585
+ 3 1000000000000.6
586
+ 3 1000000000000.4
587
+ 3 1000000000000.6
588
+ 3 1000000000000.4
589
+ 3 1000000000000.6
590
+ 3 1000000000000.4
591
+ 3 1000000000000.6
592
+ 3 1000000000000.4
593
+ 3 1000000000000.6
594
+ 3 1000000000000.4
595
+ 3 1000000000000.6
596
+ 3 1000000000000.4
597
+ 3 1000000000000.6
598
+ 3 1000000000000.4
599
+ 3 1000000000000.6
600
+ 3 1000000000000.4
601
+ 3 1000000000000.6
602
+ 3 1000000000000.4
603
+ 3 1000000000000.6
604
+ 3 1000000000000.4
605
+ 3 1000000000000.6
606
+ 3 1000000000000.4
607
+ 3 1000000000000.6
608
+ 3 1000000000000.4
609
+ 3 1000000000000.6
610
+ 3 1000000000000.4
611
+ 3 1000000000000.6
612
+ 3 1000000000000.4
613
+ 3 1000000000000.6
614
+ 3 1000000000000.4
615
+ 3 1000000000000.6
616
+ 3 1000000000000.4
617
+ 3 1000000000000.6
618
+ 3 1000000000000.4
619
+ 3 1000000000000.6
620
+ 3 1000000000000.4
621
+ 3 1000000000000.6
622
+ 3 1000000000000.4
623
+ 3 1000000000000.6
624
+ 3 1000000000000.4
625
+ 3 1000000000000.6
626
+ 3 1000000000000.4
627
+ 3 1000000000000.6
628
+ 3 1000000000000.4
629
+ 3 1000000000000.6
630
+ 3 1000000000000.4
631
+ 3 1000000000000.6
632
+ 3 1000000000000.4
633
+ 3 1000000000000.6
634
+ 3 1000000000000.4
635
+ 3 1000000000000.6
636
+ 3 1000000000000.4
637
+ 3 1000000000000.6
638
+ 3 1000000000000.4
639
+ 3 1000000000000.6
640
+ 3 1000000000000.4
641
+ 3 1000000000000.6
642
+ 3 1000000000000.4
643
+ 3 1000000000000.6
644
+ 3 1000000000000.4
645
+ 3 1000000000000.6
646
+ 3 1000000000000.4
647
+ 3 1000000000000.6
648
+ 3 1000000000000.4
649
+ 3 1000000000000.6
650
+ 3 1000000000000.4
651
+ 3 1000000000000.6
652
+ 3 1000000000000.4
653
+ 3 1000000000000.6
654
+ 3 1000000000000.4
655
+ 3 1000000000000.6
656
+ 3 1000000000000.4
657
+ 3 1000000000000.6
658
+ 3 1000000000000.4
659
+ 3 1000000000000.6
660
+ 3 1000000000000.4
661
+ 3 1000000000000.6
662
+ 3 1000000000000.4
663
+ 3 1000000000000.6
664
+ 4 1000000000000.3
665
+ 4 1000000000000.2
666
+ 4 1000000000000.4
667
+ 4 1000000000000.2
668
+ 4 1000000000000.4
669
+ 4 1000000000000.2
670
+ 4 1000000000000.4
671
+ 4 1000000000000.2
672
+ 4 1000000000000.4
673
+ 4 1000000000000.2
674
+ 4 1000000000000.4
675
+ 4 1000000000000.2
676
+ 4 1000000000000.4
677
+ 4 1000000000000.2
678
+ 4 1000000000000.4
679
+ 4 1000000000000.2
680
+ 4 1000000000000.4
681
+ 4 1000000000000.2
682
+ 4 1000000000000.4
683
+ 4 1000000000000.2
684
+ 4 1000000000000.4
685
+ 4 1000000000000.2
686
+ 4 1000000000000.4
687
+ 4 1000000000000.2
688
+ 4 1000000000000.4
689
+ 4 1000000000000.2
690
+ 4 1000000000000.4
691
+ 4 1000000000000.2
692
+ 4 1000000000000.4
693
+ 4 1000000000000.2
694
+ 4 1000000000000.4
695
+ 4 1000000000000.2
696
+ 4 1000000000000.4
697
+ 4 1000000000000.2
698
+ 4 1000000000000.4
699
+ 4 1000000000000.2
700
+ 4 1000000000000.4
701
+ 4 1000000000000.2
702
+ 4 1000000000000.4
703
+ 4 1000000000000.2
704
+ 4 1000000000000.4
705
+ 4 1000000000000.2
706
+ 4 1000000000000.4
707
+ 4 1000000000000.2
708
+ 4 1000000000000.4
709
+ 4 1000000000000.2
710
+ 4 1000000000000.4
711
+ 4 1000000000000.2
712
+ 4 1000000000000.4
713
+ 4 1000000000000.2
714
+ 4 1000000000000.4
715
+ 4 1000000000000.2
716
+ 4 1000000000000.4
717
+ 4 1000000000000.2
718
+ 4 1000000000000.4
719
+ 4 1000000000000.2
720
+ 4 1000000000000.4
721
+ 4 1000000000000.2
722
+ 4 1000000000000.4
723
+ 4 1000000000000.2
724
+ 4 1000000000000.4
725
+ 4 1000000000000.2
726
+ 4 1000000000000.4
727
+ 4 1000000000000.2
728
+ 4 1000000000000.4
729
+ 4 1000000000000.2
730
+ 4 1000000000000.4
731
+ 4 1000000000000.2
732
+ 4 1000000000000.4
733
+ 4 1000000000000.2
734
+ 4 1000000000000.4
735
+ 4 1000000000000.2
736
+ 4 1000000000000.4
737
+ 4 1000000000000.2
738
+ 4 1000000000000.4
739
+ 4 1000000000000.2
740
+ 4 1000000000000.4
741
+ 4 1000000000000.2
742
+ 4 1000000000000.4
743
+ 4 1000000000000.2
744
+ 4 1000000000000.4
745
+ 4 1000000000000.2
746
+ 4 1000000000000.4
747
+ 4 1000000000000.2
748
+ 4 1000000000000.4
749
+ 4 1000000000000.2
750
+ 4 1000000000000.4
751
+ 4 1000000000000.2
752
+ 4 1000000000000.4
753
+ 4 1000000000000.2
754
+ 4 1000000000000.4
755
+ 4 1000000000000.2
756
+ 4 1000000000000.4
757
+ 4 1000000000000.2
758
+ 4 1000000000000.4
759
+ 4 1000000000000.2
760
+ 4 1000000000000.4
761
+ 4 1000000000000.2
762
+ 4 1000000000000.4
763
+ 4 1000000000000.2
764
+ 4 1000000000000.4
765
+ 4 1000000000000.2
766
+ 4 1000000000000.4
767
+ 4 1000000000000.2
768
+ 4 1000000000000.4
769
+ 4 1000000000000.2
770
+ 4 1000000000000.4
771
+ 4 1000000000000.2
772
+ 4 1000000000000.4
773
+ 4 1000000000000.2
774
+ 4 1000000000000.4
775
+ 4 1000000000000.2
776
+ 4 1000000000000.4
777
+ 4 1000000000000.2
778
+ 4 1000000000000.4
779
+ 4 1000000000000.2
780
+ 4 1000000000000.4
781
+ 4 1000000000000.2
782
+ 4 1000000000000.4
783
+ 4 1000000000000.2
784
+ 4 1000000000000.4
785
+ 4 1000000000000.2
786
+ 4 1000000000000.4
787
+ 4 1000000000000.2
788
+ 4 1000000000000.4
789
+ 4 1000000000000.2
790
+ 4 1000000000000.4
791
+ 4 1000000000000.2
792
+ 4 1000000000000.4
793
+ 4 1000000000000.2
794
+ 4 1000000000000.4
795
+ 4 1000000000000.2
796
+ 4 1000000000000.4
797
+ 4 1000000000000.2
798
+ 4 1000000000000.4
799
+ 4 1000000000000.2
800
+ 4 1000000000000.4
801
+ 4 1000000000000.2
802
+ 4 1000000000000.4
803
+ 4 1000000000000.2
804
+ 4 1000000000000.4
805
+ 4 1000000000000.2
806
+ 4 1000000000000.4
807
+ 4 1000000000000.2
808
+ 4 1000000000000.4
809
+ 4 1000000000000.2
810
+ 4 1000000000000.4
811
+ 4 1000000000000.2
812
+ 4 1000000000000.4
813
+ 4 1000000000000.2
814
+ 4 1000000000000.4
815
+ 4 1000000000000.2
816
+ 4 1000000000000.4
817
+ 4 1000000000000.2
818
+ 4 1000000000000.4
819
+ 4 1000000000000.2
820
+ 4 1000000000000.4
821
+ 4 1000000000000.2
822
+ 4 1000000000000.4
823
+ 4 1000000000000.2
824
+ 4 1000000000000.4
825
+ 4 1000000000000.2
826
+ 4 1000000000000.4
827
+ 4 1000000000000.2
828
+ 4 1000000000000.4
829
+ 4 1000000000000.2
830
+ 4 1000000000000.4
831
+ 4 1000000000000.2
832
+ 4 1000000000000.4
833
+ 4 1000000000000.2
834
+ 4 1000000000000.4
835
+ 4 1000000000000.2
836
+ 4 1000000000000.4
837
+ 4 1000000000000.2
838
+ 4 1000000000000.4
839
+ 4 1000000000000.2
840
+ 4 1000000000000.4
841
+ 4 1000000000000.2
842
+ 4 1000000000000.4
843
+ 4 1000000000000.2
844
+ 4 1000000000000.4
845
+ 4 1000000000000.2
846
+ 4 1000000000000.4
847
+ 4 1000000000000.2
848
+ 4 1000000000000.4
849
+ 4 1000000000000.2
850
+ 4 1000000000000.4
851
+ 4 1000000000000.2
852
+ 4 1000000000000.4
853
+ 4 1000000000000.2
854
+ 4 1000000000000.4
855
+ 4 1000000000000.2
856
+ 4 1000000000000.4
857
+ 4 1000000000000.2
858
+ 4 1000000000000.4
859
+ 4 1000000000000.2
860
+ 4 1000000000000.4
861
+ 4 1000000000000.2
862
+ 4 1000000000000.4
863
+ 4 1000000000000.2
864
+ 4 1000000000000.4
865
+ 5 1000000000000.5
866
+ 5 1000000000000.4
867
+ 5 1000000000000.6
868
+ 5 1000000000000.4
869
+ 5 1000000000000.6
870
+ 5 1000000000000.4
871
+ 5 1000000000000.6
872
+ 5 1000000000000.4
873
+ 5 1000000000000.6
874
+ 5 1000000000000.4
875
+ 5 1000000000000.6
876
+ 5 1000000000000.4
877
+ 5 1000000000000.6
878
+ 5 1000000000000.4
879
+ 5 1000000000000.6
880
+ 5 1000000000000.4
881
+ 5 1000000000000.6
882
+ 5 1000000000000.4
883
+ 5 1000000000000.6
884
+ 5 1000000000000.4
885
+ 5 1000000000000.6
886
+ 5 1000000000000.4
887
+ 5 1000000000000.6
888
+ 5 1000000000000.4
889
+ 5 1000000000000.6
890
+ 5 1000000000000.4
891
+ 5 1000000000000.6
892
+ 5 1000000000000.4
893
+ 5 1000000000000.6
894
+ 5 1000000000000.4
895
+ 5 1000000000000.6
896
+ 5 1000000000000.4
897
+ 5 1000000000000.6
898
+ 5 1000000000000.4
899
+ 5 1000000000000.6
900
+ 5 1000000000000.4
901
+ 5 1000000000000.6
902
+ 5 1000000000000.4
903
+ 5 1000000000000.6
904
+ 5 1000000000000.4
905
+ 5 1000000000000.6
906
+ 5 1000000000000.4
907
+ 5 1000000000000.6
908
+ 5 1000000000000.4
909
+ 5 1000000000000.6
910
+ 5 1000000000000.4
911
+ 5 1000000000000.6
912
+ 5 1000000000000.4
913
+ 5 1000000000000.6
914
+ 5 1000000000000.4
915
+ 5 1000000000000.6
916
+ 5 1000000000000.4
917
+ 5 1000000000000.6
918
+ 5 1000000000000.4
919
+ 5 1000000000000.6
920
+ 5 1000000000000.4
921
+ 5 1000000000000.6
922
+ 5 1000000000000.4
923
+ 5 1000000000000.6
924
+ 5 1000000000000.4
925
+ 5 1000000000000.6
926
+ 5 1000000000000.4
927
+ 5 1000000000000.6
928
+ 5 1000000000000.4
929
+ 5 1000000000000.6
930
+ 5 1000000000000.4
931
+ 5 1000000000000.6
932
+ 5 1000000000000.4
933
+ 5 1000000000000.6
934
+ 5 1000000000000.4
935
+ 5 1000000000000.6
936
+ 5 1000000000000.4
937
+ 5 1000000000000.6
938
+ 5 1000000000000.4
939
+ 5 1000000000000.6
940
+ 5 1000000000000.4
941
+ 5 1000000000000.6
942
+ 5 1000000000000.4
943
+ 5 1000000000000.6
944
+ 5 1000000000000.4
945
+ 5 1000000000000.6
946
+ 5 1000000000000.4
947
+ 5 1000000000000.6
948
+ 5 1000000000000.4
949
+ 5 1000000000000.6
950
+ 5 1000000000000.4
951
+ 5 1000000000000.6
952
+ 5 1000000000000.4
953
+ 5 1000000000000.6
954
+ 5 1000000000000.4
955
+ 5 1000000000000.6
956
+ 5 1000000000000.4
957
+ 5 1000000000000.6
958
+ 5 1000000000000.4
959
+ 5 1000000000000.6
960
+ 5 1000000000000.4
961
+ 5 1000000000000.6
962
+ 5 1000000000000.4
963
+ 5 1000000000000.6
964
+ 5 1000000000000.4
965
+ 5 1000000000000.6
966
+ 5 1000000000000.4
967
+ 5 1000000000000.6
968
+ 5 1000000000000.4
969
+ 5 1000000000000.6
970
+ 5 1000000000000.4
971
+ 5 1000000000000.6
972
+ 5 1000000000000.4
973
+ 5 1000000000000.6
974
+ 5 1000000000000.4
975
+ 5 1000000000000.6
976
+ 5 1000000000000.4
977
+ 5 1000000000000.6
978
+ 5 1000000000000.4
979
+ 5 1000000000000.6
980
+ 5 1000000000000.4
981
+ 5 1000000000000.6
982
+ 5 1000000000000.4
983
+ 5 1000000000000.6
984
+ 5 1000000000000.4
985
+ 5 1000000000000.6
986
+ 5 1000000000000.4
987
+ 5 1000000000000.6
988
+ 5 1000000000000.4
989
+ 5 1000000000000.6
990
+ 5 1000000000000.4
991
+ 5 1000000000000.6
992
+ 5 1000000000000.4
993
+ 5 1000000000000.6
994
+ 5 1000000000000.4
995
+ 5 1000000000000.6
996
+ 5 1000000000000.4
997
+ 5 1000000000000.6
998
+ 5 1000000000000.4
999
+ 5 1000000000000.6
1000
+ 5 1000000000000.4
1001
+ 5 1000000000000.6
1002
+ 5 1000000000000.4
1003
+ 5 1000000000000.6
1004
+ 5 1000000000000.4
1005
+ 5 1000000000000.6
1006
+ 5 1000000000000.4
1007
+ 5 1000000000000.6
1008
+ 5 1000000000000.4
1009
+ 5 1000000000000.6
1010
+ 5 1000000000000.4
1011
+ 5 1000000000000.6
1012
+ 5 1000000000000.4
1013
+ 5 1000000000000.6
1014
+ 5 1000000000000.4
1015
+ 5 1000000000000.6
1016
+ 5 1000000000000.4
1017
+ 5 1000000000000.6
1018
+ 5 1000000000000.4
1019
+ 5 1000000000000.6
1020
+ 5 1000000000000.4
1021
+ 5 1000000000000.6
1022
+ 5 1000000000000.4
1023
+ 5 1000000000000.6
1024
+ 5 1000000000000.4
1025
+ 5 1000000000000.6
1026
+ 5 1000000000000.4
1027
+ 5 1000000000000.6
1028
+ 5 1000000000000.4
1029
+ 5 1000000000000.6
1030
+ 5 1000000000000.4
1031
+ 5 1000000000000.6
1032
+ 5 1000000000000.4
1033
+ 5 1000000000000.6
1034
+ 5 1000000000000.4
1035
+ 5 1000000000000.6
1036
+ 5 1000000000000.4
1037
+ 5 1000000000000.6
1038
+ 5 1000000000000.4
1039
+ 5 1000000000000.6
1040
+ 5 1000000000000.4
1041
+ 5 1000000000000.6
1042
+ 5 1000000000000.4
1043
+ 5 1000000000000.6
1044
+ 5 1000000000000.4
1045
+ 5 1000000000000.6
1046
+ 5 1000000000000.4
1047
+ 5 1000000000000.6
1048
+ 5 1000000000000.4
1049
+ 5 1000000000000.6
1050
+ 5 1000000000000.4
1051
+ 5 1000000000000.6
1052
+ 5 1000000000000.4
1053
+ 5 1000000000000.6
1054
+ 5 1000000000000.4
1055
+ 5 1000000000000.6
1056
+ 5 1000000000000.4
1057
+ 5 1000000000000.6
1058
+ 5 1000000000000.4
1059
+ 5 1000000000000.6
1060
+ 5 1000000000000.4
1061
+ 5 1000000000000.6
1062
+ 5 1000000000000.4
1063
+ 5 1000000000000.6
1064
+ 5 1000000000000.4
1065
+ 5 1000000000000.6
1066
+ 6 1000000000000.3
1067
+ 6 1000000000000.2
1068
+ 6 1000000000000.4
1069
+ 6 1000000000000.2
1070
+ 6 1000000000000.4
1071
+ 6 1000000000000.2
1072
+ 6 1000000000000.4
1073
+ 6 1000000000000.2
1074
+ 6 1000000000000.4
1075
+ 6 1000000000000.2
1076
+ 6 1000000000000.4
1077
+ 6 1000000000000.2
1078
+ 6 1000000000000.4
1079
+ 6 1000000000000.2
1080
+ 6 1000000000000.4
1081
+ 6 1000000000000.2
1082
+ 6 1000000000000.4
1083
+ 6 1000000000000.2
1084
+ 6 1000000000000.4
1085
+ 6 1000000000000.2
1086
+ 6 1000000000000.4
1087
+ 6 1000000000000.2
1088
+ 6 1000000000000.4
1089
+ 6 1000000000000.2
1090
+ 6 1000000000000.4
1091
+ 6 1000000000000.2
1092
+ 6 1000000000000.4
1093
+ 6 1000000000000.2
1094
+ 6 1000000000000.4
1095
+ 6 1000000000000.2
1096
+ 6 1000000000000.4
1097
+ 6 1000000000000.2
1098
+ 6 1000000000000.4
1099
+ 6 1000000000000.2
1100
+ 6 1000000000000.4
1101
+ 6 1000000000000.2
1102
+ 6 1000000000000.4
1103
+ 6 1000000000000.2
1104
+ 6 1000000000000.4
1105
+ 6 1000000000000.2
1106
+ 6 1000000000000.4
1107
+ 6 1000000000000.2
1108
+ 6 1000000000000.4
1109
+ 6 1000000000000.2
1110
+ 6 1000000000000.4
1111
+ 6 1000000000000.2
1112
+ 6 1000000000000.4
1113
+ 6 1000000000000.2
1114
+ 6 1000000000000.4
1115
+ 6 1000000000000.2
1116
+ 6 1000000000000.4
1117
+ 6 1000000000000.2
1118
+ 6 1000000000000.4
1119
+ 6 1000000000000.2
1120
+ 6 1000000000000.4
1121
+ 6 1000000000000.2
1122
+ 6 1000000000000.4
1123
+ 6 1000000000000.2
1124
+ 6 1000000000000.4
1125
+ 6 1000000000000.2
1126
+ 6 1000000000000.4
1127
+ 6 1000000000000.2
1128
+ 6 1000000000000.4
1129
+ 6 1000000000000.2
1130
+ 6 1000000000000.4
1131
+ 6 1000000000000.2
1132
+ 6 1000000000000.4
1133
+ 6 1000000000000.2
1134
+ 6 1000000000000.4
1135
+ 6 1000000000000.2
1136
+ 6 1000000000000.4
1137
+ 6 1000000000000.2
1138
+ 6 1000000000000.4
1139
+ 6 1000000000000.2
1140
+ 6 1000000000000.4
1141
+ 6 1000000000000.2
1142
+ 6 1000000000000.4
1143
+ 6 1000000000000.2
1144
+ 6 1000000000000.4
1145
+ 6 1000000000000.2
1146
+ 6 1000000000000.4
1147
+ 6 1000000000000.2
1148
+ 6 1000000000000.4
1149
+ 6 1000000000000.2
1150
+ 6 1000000000000.4
1151
+ 6 1000000000000.2
1152
+ 6 1000000000000.4
1153
+ 6 1000000000000.2
1154
+ 6 1000000000000.4
1155
+ 6 1000000000000.2
1156
+ 6 1000000000000.4
1157
+ 6 1000000000000.2
1158
+ 6 1000000000000.4
1159
+ 6 1000000000000.2
1160
+ 6 1000000000000.4
1161
+ 6 1000000000000.2
1162
+ 6 1000000000000.4
1163
+ 6 1000000000000.2
1164
+ 6 1000000000000.4
1165
+ 6 1000000000000.2
1166
+ 6 1000000000000.4
1167
+ 6 1000000000000.2
1168
+ 6 1000000000000.4
1169
+ 6 1000000000000.2
1170
+ 6 1000000000000.4
1171
+ 6 1000000000000.2
1172
+ 6 1000000000000.4
1173
+ 6 1000000000000.2
1174
+ 6 1000000000000.4
1175
+ 6 1000000000000.2
1176
+ 6 1000000000000.4
1177
+ 6 1000000000000.2
1178
+ 6 1000000000000.4
1179
+ 6 1000000000000.2
1180
+ 6 1000000000000.4
1181
+ 6 1000000000000.2
1182
+ 6 1000000000000.4
1183
+ 6 1000000000000.2
1184
+ 6 1000000000000.4
1185
+ 6 1000000000000.2
1186
+ 6 1000000000000.4
1187
+ 6 1000000000000.2
1188
+ 6 1000000000000.4
1189
+ 6 1000000000000.2
1190
+ 6 1000000000000.4
1191
+ 6 1000000000000.2
1192
+ 6 1000000000000.4
1193
+ 6 1000000000000.2
1194
+ 6 1000000000000.4
1195
+ 6 1000000000000.2
1196
+ 6 1000000000000.4
1197
+ 6 1000000000000.2
1198
+ 6 1000000000000.4
1199
+ 6 1000000000000.2
1200
+ 6 1000000000000.4
1201
+ 6 1000000000000.2
1202
+ 6 1000000000000.4
1203
+ 6 1000000000000.2
1204
+ 6 1000000000000.4
1205
+ 6 1000000000000.2
1206
+ 6 1000000000000.4
1207
+ 6 1000000000000.2
1208
+ 6 1000000000000.4
1209
+ 6 1000000000000.2
1210
+ 6 1000000000000.4
1211
+ 6 1000000000000.2
1212
+ 6 1000000000000.4
1213
+ 6 1000000000000.2
1214
+ 6 1000000000000.4
1215
+ 6 1000000000000.2
1216
+ 6 1000000000000.4
1217
+ 6 1000000000000.2
1218
+ 6 1000000000000.4
1219
+ 6 1000000000000.2
1220
+ 6 1000000000000.4
1221
+ 6 1000000000000.2
1222
+ 6 1000000000000.4
1223
+ 6 1000000000000.2
1224
+ 6 1000000000000.4
1225
+ 6 1000000000000.2
1226
+ 6 1000000000000.4
1227
+ 6 1000000000000.2
1228
+ 6 1000000000000.4
1229
+ 6 1000000000000.2
1230
+ 6 1000000000000.4
1231
+ 6 1000000000000.2
1232
+ 6 1000000000000.4
1233
+ 6 1000000000000.2
1234
+ 6 1000000000000.4
1235
+ 6 1000000000000.2
1236
+ 6 1000000000000.4
1237
+ 6 1000000000000.2
1238
+ 6 1000000000000.4
1239
+ 6 1000000000000.2
1240
+ 6 1000000000000.4
1241
+ 6 1000000000000.2
1242
+ 6 1000000000000.4
1243
+ 6 1000000000000.2
1244
+ 6 1000000000000.4
1245
+ 6 1000000000000.2
1246
+ 6 1000000000000.4
1247
+ 6 1000000000000.2
1248
+ 6 1000000000000.4
1249
+ 6 1000000000000.2
1250
+ 6 1000000000000.4
1251
+ 6 1000000000000.2
1252
+ 6 1000000000000.4
1253
+ 6 1000000000000.2
1254
+ 6 1000000000000.4
1255
+ 6 1000000000000.2
1256
+ 6 1000000000000.4
1257
+ 6 1000000000000.2
1258
+ 6 1000000000000.4
1259
+ 6 1000000000000.2
1260
+ 6 1000000000000.4
1261
+ 6 1000000000000.2
1262
+ 6 1000000000000.4
1263
+ 6 1000000000000.2
1264
+ 6 1000000000000.4
1265
+ 6 1000000000000.2
1266
+ 6 1000000000000.4
1267
+ 7 1000000000000.5
1268
+ 7 1000000000000.4
1269
+ 7 1000000000000.6
1270
+ 7 1000000000000.4
1271
+ 7 1000000000000.6
1272
+ 7 1000000000000.4
1273
+ 7 1000000000000.6
1274
+ 7 1000000000000.4
1275
+ 7 1000000000000.6
1276
+ 7 1000000000000.4
1277
+ 7 1000000000000.6
1278
+ 7 1000000000000.4
1279
+ 7 1000000000000.6
1280
+ 7 1000000000000.4
1281
+ 7 1000000000000.6
1282
+ 7 1000000000000.4
1283
+ 7 1000000000000.6
1284
+ 7 1000000000000.4
1285
+ 7 1000000000000.6
1286
+ 7 1000000000000.4
1287
+ 7 1000000000000.6
1288
+ 7 1000000000000.4
1289
+ 7 1000000000000.6
1290
+ 7 1000000000000.4
1291
+ 7 1000000000000.6
1292
+ 7 1000000000000.4
1293
+ 7 1000000000000.6
1294
+ 7 1000000000000.4
1295
+ 7 1000000000000.6
1296
+ 7 1000000000000.4
1297
+ 7 1000000000000.6
1298
+ 7 1000000000000.4
1299
+ 7 1000000000000.6
1300
+ 7 1000000000000.4
1301
+ 7 1000000000000.6
1302
+ 7 1000000000000.4
1303
+ 7 1000000000000.6
1304
+ 7 1000000000000.4
1305
+ 7 1000000000000.6
1306
+ 7 1000000000000.4
1307
+ 7 1000000000000.6
1308
+ 7 1000000000000.4
1309
+ 7 1000000000000.6
1310
+ 7 1000000000000.4
1311
+ 7 1000000000000.6
1312
+ 7 1000000000000.4
1313
+ 7 1000000000000.6
1314
+ 7 1000000000000.4
1315
+ 7 1000000000000.6
1316
+ 7 1000000000000.4
1317
+ 7 1000000000000.6
1318
+ 7 1000000000000.4
1319
+ 7 1000000000000.6
1320
+ 7 1000000000000.4
1321
+ 7 1000000000000.6
1322
+ 7 1000000000000.4
1323
+ 7 1000000000000.6
1324
+ 7 1000000000000.4
1325
+ 7 1000000000000.6
1326
+ 7 1000000000000.4
1327
+ 7 1000000000000.6
1328
+ 7 1000000000000.4
1329
+ 7 1000000000000.6
1330
+ 7 1000000000000.4
1331
+ 7 1000000000000.6
1332
+ 7 1000000000000.4
1333
+ 7 1000000000000.6
1334
+ 7 1000000000000.4
1335
+ 7 1000000000000.6
1336
+ 7 1000000000000.4
1337
+ 7 1000000000000.6
1338
+ 7 1000000000000.4
1339
+ 7 1000000000000.6
1340
+ 7 1000000000000.4
1341
+ 7 1000000000000.6
1342
+ 7 1000000000000.4
1343
+ 7 1000000000000.6
1344
+ 7 1000000000000.4
1345
+ 7 1000000000000.6
1346
+ 7 1000000000000.4
1347
+ 7 1000000000000.6
1348
+ 7 1000000000000.4
1349
+ 7 1000000000000.6
1350
+ 7 1000000000000.4
1351
+ 7 1000000000000.6
1352
+ 7 1000000000000.4
1353
+ 7 1000000000000.6
1354
+ 7 1000000000000.4
1355
+ 7 1000000000000.6
1356
+ 7 1000000000000.4
1357
+ 7 1000000000000.6
1358
+ 7 1000000000000.4
1359
+ 7 1000000000000.6
1360
+ 7 1000000000000.4
1361
+ 7 1000000000000.6
1362
+ 7 1000000000000.4
1363
+ 7 1000000000000.6
1364
+ 7 1000000000000.4
1365
+ 7 1000000000000.6
1366
+ 7 1000000000000.4
1367
+ 7 1000000000000.6
1368
+ 7 1000000000000.4
1369
+ 7 1000000000000.6
1370
+ 7 1000000000000.4
1371
+ 7 1000000000000.6
1372
+ 7 1000000000000.4
1373
+ 7 1000000000000.6
1374
+ 7 1000000000000.4
1375
+ 7 1000000000000.6
1376
+ 7 1000000000000.4
1377
+ 7 1000000000000.6
1378
+ 7 1000000000000.4
1379
+ 7 1000000000000.6
1380
+ 7 1000000000000.4
1381
+ 7 1000000000000.6
1382
+ 7 1000000000000.4
1383
+ 7 1000000000000.6
1384
+ 7 1000000000000.4
1385
+ 7 1000000000000.6
1386
+ 7 1000000000000.4
1387
+ 7 1000000000000.6
1388
+ 7 1000000000000.4
1389
+ 7 1000000000000.6
1390
+ 7 1000000000000.4
1391
+ 7 1000000000000.6
1392
+ 7 1000000000000.4
1393
+ 7 1000000000000.6
1394
+ 7 1000000000000.4
1395
+ 7 1000000000000.6
1396
+ 7 1000000000000.4
1397
+ 7 1000000000000.6
1398
+ 7 1000000000000.4
1399
+ 7 1000000000000.6
1400
+ 7 1000000000000.4
1401
+ 7 1000000000000.6
1402
+ 7 1000000000000.4
1403
+ 7 1000000000000.6
1404
+ 7 1000000000000.4
1405
+ 7 1000000000000.6
1406
+ 7 1000000000000.4
1407
+ 7 1000000000000.6
1408
+ 7 1000000000000.4
1409
+ 7 1000000000000.6
1410
+ 7 1000000000000.4
1411
+ 7 1000000000000.6
1412
+ 7 1000000000000.4
1413
+ 7 1000000000000.6
1414
+ 7 1000000000000.4
1415
+ 7 1000000000000.6
1416
+ 7 1000000000000.4
1417
+ 7 1000000000000.6
1418
+ 7 1000000000000.4
1419
+ 7 1000000000000.6
1420
+ 7 1000000000000.4
1421
+ 7 1000000000000.6
1422
+ 7 1000000000000.4
1423
+ 7 1000000000000.6
1424
+ 7 1000000000000.4
1425
+ 7 1000000000000.6
1426
+ 7 1000000000000.4
1427
+ 7 1000000000000.6
1428
+ 7 1000000000000.4
1429
+ 7 1000000000000.6
1430
+ 7 1000000000000.4
1431
+ 7 1000000000000.6
1432
+ 7 1000000000000.4
1433
+ 7 1000000000000.6
1434
+ 7 1000000000000.4
1435
+ 7 1000000000000.6
1436
+ 7 1000000000000.4
1437
+ 7 1000000000000.6
1438
+ 7 1000000000000.4
1439
+ 7 1000000000000.6
1440
+ 7 1000000000000.4
1441
+ 7 1000000000000.6
1442
+ 7 1000000000000.4
1443
+ 7 1000000000000.6
1444
+ 7 1000000000000.4
1445
+ 7 1000000000000.6
1446
+ 7 1000000000000.4
1447
+ 7 1000000000000.6
1448
+ 7 1000000000000.4
1449
+ 7 1000000000000.6
1450
+ 7 1000000000000.4
1451
+ 7 1000000000000.6
1452
+ 7 1000000000000.4
1453
+ 7 1000000000000.6
1454
+ 7 1000000000000.4
1455
+ 7 1000000000000.6
1456
+ 7 1000000000000.4
1457
+ 7 1000000000000.6
1458
+ 7 1000000000000.4
1459
+ 7 1000000000000.6
1460
+ 7 1000000000000.4
1461
+ 7 1000000000000.6
1462
+ 7 1000000000000.4
1463
+ 7 1000000000000.6
1464
+ 7 1000000000000.4
1465
+ 7 1000000000000.6
1466
+ 7 1000000000000.4
1467
+ 7 1000000000000.6
1468
+ 8 1000000000000.3
1469
+ 8 1000000000000.2
1470
+ 8 1000000000000.4
1471
+ 8 1000000000000.2
1472
+ 8 1000000000000.4
1473
+ 8 1000000000000.2
1474
+ 8 1000000000000.4
1475
+ 8 1000000000000.2
1476
+ 8 1000000000000.4
1477
+ 8 1000000000000.2
1478
+ 8 1000000000000.4
1479
+ 8 1000000000000.2
1480
+ 8 1000000000000.4
1481
+ 8 1000000000000.2
1482
+ 8 1000000000000.4
1483
+ 8 1000000000000.2
1484
+ 8 1000000000000.4
1485
+ 8 1000000000000.2
1486
+ 8 1000000000000.4
1487
+ 8 1000000000000.2
1488
+ 8 1000000000000.4
1489
+ 8 1000000000000.2
1490
+ 8 1000000000000.4
1491
+ 8 1000000000000.2
1492
+ 8 1000000000000.4
1493
+ 8 1000000000000.2
1494
+ 8 1000000000000.4
1495
+ 8 1000000000000.2
1496
+ 8 1000000000000.4
1497
+ 8 1000000000000.2
1498
+ 8 1000000000000.4
1499
+ 8 1000000000000.2
1500
+ 8 1000000000000.4
1501
+ 8 1000000000000.2
1502
+ 8 1000000000000.4
1503
+ 8 1000000000000.2
1504
+ 8 1000000000000.4
1505
+ 8 1000000000000.2
1506
+ 8 1000000000000.4
1507
+ 8 1000000000000.2
1508
+ 8 1000000000000.4
1509
+ 8 1000000000000.2
1510
+ 8 1000000000000.4
1511
+ 8 1000000000000.2
1512
+ 8 1000000000000.4
1513
+ 8 1000000000000.2
1514
+ 8 1000000000000.4
1515
+ 8 1000000000000.2
1516
+ 8 1000000000000.4
1517
+ 8 1000000000000.2
1518
+ 8 1000000000000.4
1519
+ 8 1000000000000.2
1520
+ 8 1000000000000.4
1521
+ 8 1000000000000.2
1522
+ 8 1000000000000.4
1523
+ 8 1000000000000.2
1524
+ 8 1000000000000.4
1525
+ 8 1000000000000.2
1526
+ 8 1000000000000.4
1527
+ 8 1000000000000.2
1528
+ 8 1000000000000.4
1529
+ 8 1000000000000.2
1530
+ 8 1000000000000.4
1531
+ 8 1000000000000.2
1532
+ 8 1000000000000.4
1533
+ 8 1000000000000.2
1534
+ 8 1000000000000.4
1535
+ 8 1000000000000.2
1536
+ 8 1000000000000.4
1537
+ 8 1000000000000.2
1538
+ 8 1000000000000.4
1539
+ 8 1000000000000.2
1540
+ 8 1000000000000.4
1541
+ 8 1000000000000.2
1542
+ 8 1000000000000.4
1543
+ 8 1000000000000.2
1544
+ 8 1000000000000.4
1545
+ 8 1000000000000.2
1546
+ 8 1000000000000.4
1547
+ 8 1000000000000.2
1548
+ 8 1000000000000.4
1549
+ 8 1000000000000.2
1550
+ 8 1000000000000.4
1551
+ 8 1000000000000.2
1552
+ 8 1000000000000.4
1553
+ 8 1000000000000.2
1554
+ 8 1000000000000.4
1555
+ 8 1000000000000.2
1556
+ 8 1000000000000.4
1557
+ 8 1000000000000.2
1558
+ 8 1000000000000.4
1559
+ 8 1000000000000.2
1560
+ 8 1000000000000.4
1561
+ 8 1000000000000.2
1562
+ 8 1000000000000.4
1563
+ 8 1000000000000.2
1564
+ 8 1000000000000.4
1565
+ 8 1000000000000.2
1566
+ 8 1000000000000.4
1567
+ 8 1000000000000.2
1568
+ 8 1000000000000.4
1569
+ 8 1000000000000.2
1570
+ 8 1000000000000.4
1571
+ 8 1000000000000.2
1572
+ 8 1000000000000.4
1573
+ 8 1000000000000.2
1574
+ 8 1000000000000.4
1575
+ 8 1000000000000.2
1576
+ 8 1000000000000.4
1577
+ 8 1000000000000.2
1578
+ 8 1000000000000.4
1579
+ 8 1000000000000.2
1580
+ 8 1000000000000.4
1581
+ 8 1000000000000.2
1582
+ 8 1000000000000.4
1583
+ 8 1000000000000.2
1584
+ 8 1000000000000.4
1585
+ 8 1000000000000.2
1586
+ 8 1000000000000.4
1587
+ 8 1000000000000.2
1588
+ 8 1000000000000.4
1589
+ 8 1000000000000.2
1590
+ 8 1000000000000.4
1591
+ 8 1000000000000.2
1592
+ 8 1000000000000.4
1593
+ 8 1000000000000.2
1594
+ 8 1000000000000.4
1595
+ 8 1000000000000.2
1596
+ 8 1000000000000.4
1597
+ 8 1000000000000.2
1598
+ 8 1000000000000.4
1599
+ 8 1000000000000.2
1600
+ 8 1000000000000.4
1601
+ 8 1000000000000.2
1602
+ 8 1000000000000.4
1603
+ 8 1000000000000.2
1604
+ 8 1000000000000.4
1605
+ 8 1000000000000.2
1606
+ 8 1000000000000.4
1607
+ 8 1000000000000.2
1608
+ 8 1000000000000.4
1609
+ 8 1000000000000.2
1610
+ 8 1000000000000.4
1611
+ 8 1000000000000.2
1612
+ 8 1000000000000.4
1613
+ 8 1000000000000.2
1614
+ 8 1000000000000.4
1615
+ 8 1000000000000.2
1616
+ 8 1000000000000.4
1617
+ 8 1000000000000.2
1618
+ 8 1000000000000.4
1619
+ 8 1000000000000.2
1620
+ 8 1000000000000.4
1621
+ 8 1000000000000.2
1622
+ 8 1000000000000.4
1623
+ 8 1000000000000.2
1624
+ 8 1000000000000.4
1625
+ 8 1000000000000.2
1626
+ 8 1000000000000.4
1627
+ 8 1000000000000.2
1628
+ 8 1000000000000.4
1629
+ 8 1000000000000.2
1630
+ 8 1000000000000.4
1631
+ 8 1000000000000.2
1632
+ 8 1000000000000.4
1633
+ 8 1000000000000.2
1634
+ 8 1000000000000.4
1635
+ 8 1000000000000.2
1636
+ 8 1000000000000.4
1637
+ 8 1000000000000.2
1638
+ 8 1000000000000.4
1639
+ 8 1000000000000.2
1640
+ 8 1000000000000.4
1641
+ 8 1000000000000.2
1642
+ 8 1000000000000.4
1643
+ 8 1000000000000.2
1644
+ 8 1000000000000.4
1645
+ 8 1000000000000.2
1646
+ 8 1000000000000.4
1647
+ 8 1000000000000.2
1648
+ 8 1000000000000.4
1649
+ 8 1000000000000.2
1650
+ 8 1000000000000.4
1651
+ 8 1000000000000.2
1652
+ 8 1000000000000.4
1653
+ 8 1000000000000.2
1654
+ 8 1000000000000.4
1655
+ 8 1000000000000.2
1656
+ 8 1000000000000.4
1657
+ 8 1000000000000.2
1658
+ 8 1000000000000.4
1659
+ 8 1000000000000.2
1660
+ 8 1000000000000.4
1661
+ 8 1000000000000.2
1662
+ 8 1000000000000.4
1663
+ 8 1000000000000.2
1664
+ 8 1000000000000.4
1665
+ 8 1000000000000.2
1666
+ 8 1000000000000.4
1667
+ 8 1000000000000.2
1668
+ 8 1000000000000.4
1669
+ 9 1000000000000.5
1670
+ 9 1000000000000.4
1671
+ 9 1000000000000.6
1672
+ 9 1000000000000.4
1673
+ 9 1000000000000.6
1674
+ 9 1000000000000.4
1675
+ 9 1000000000000.6
1676
+ 9 1000000000000.4
1677
+ 9 1000000000000.6
1678
+ 9 1000000000000.4
1679
+ 9 1000000000000.6
1680
+ 9 1000000000000.4
1681
+ 9 1000000000000.6
1682
+ 9 1000000000000.4
1683
+ 9 1000000000000.6
1684
+ 9 1000000000000.4
1685
+ 9 1000000000000.6
1686
+ 9 1000000000000.4
1687
+ 9 1000000000000.6
1688
+ 9 1000000000000.4
1689
+ 9 1000000000000.6
1690
+ 9 1000000000000.4
1691
+ 9 1000000000000.6
1692
+ 9 1000000000000.4
1693
+ 9 1000000000000.6
1694
+ 9 1000000000000.4
1695
+ 9 1000000000000.6
1696
+ 9 1000000000000.4
1697
+ 9 1000000000000.6
1698
+ 9 1000000000000.4
1699
+ 9 1000000000000.6
1700
+ 9 1000000000000.4
1701
+ 9 1000000000000.6
1702
+ 9 1000000000000.4
1703
+ 9 1000000000000.6
1704
+ 9 1000000000000.4
1705
+ 9 1000000000000.6
1706
+ 9 1000000000000.4
1707
+ 9 1000000000000.6
1708
+ 9 1000000000000.4
1709
+ 9 1000000000000.6
1710
+ 9 1000000000000.4
1711
+ 9 1000000000000.6
1712
+ 9 1000000000000.4
1713
+ 9 1000000000000.6
1714
+ 9 1000000000000.4
1715
+ 9 1000000000000.6
1716
+ 9 1000000000000.4
1717
+ 9 1000000000000.6
1718
+ 9 1000000000000.4
1719
+ 9 1000000000000.6
1720
+ 9 1000000000000.4
1721
+ 9 1000000000000.6
1722
+ 9 1000000000000.4
1723
+ 9 1000000000000.6
1724
+ 9 1000000000000.4
1725
+ 9 1000000000000.6
1726
+ 9 1000000000000.4
1727
+ 9 1000000000000.6
1728
+ 9 1000000000000.4
1729
+ 9 1000000000000.6
1730
+ 9 1000000000000.4
1731
+ 9 1000000000000.6
1732
+ 9 1000000000000.4
1733
+ 9 1000000000000.6
1734
+ 9 1000000000000.4
1735
+ 9 1000000000000.6
1736
+ 9 1000000000000.4
1737
+ 9 1000000000000.6
1738
+ 9 1000000000000.4
1739
+ 9 1000000000000.6
1740
+ 9 1000000000000.4
1741
+ 9 1000000000000.6
1742
+ 9 1000000000000.4
1743
+ 9 1000000000000.6
1744
+ 9 1000000000000.4
1745
+ 9 1000000000000.6
1746
+ 9 1000000000000.4
1747
+ 9 1000000000000.6
1748
+ 9 1000000000000.4
1749
+ 9 1000000000000.6
1750
+ 9 1000000000000.4
1751
+ 9 1000000000000.6
1752
+ 9 1000000000000.4
1753
+ 9 1000000000000.6
1754
+ 9 1000000000000.4
1755
+ 9 1000000000000.6
1756
+ 9 1000000000000.4
1757
+ 9 1000000000000.6
1758
+ 9 1000000000000.4
1759
+ 9 1000000000000.6
1760
+ 9 1000000000000.4
1761
+ 9 1000000000000.6
1762
+ 9 1000000000000.4
1763
+ 9 1000000000000.6
1764
+ 9 1000000000000.4
1765
+ 9 1000000000000.6
1766
+ 9 1000000000000.4
1767
+ 9 1000000000000.6
1768
+ 9 1000000000000.4
1769
+ 9 1000000000000.6
1770
+ 9 1000000000000.4
1771
+ 9 1000000000000.6
1772
+ 9 1000000000000.4
1773
+ 9 1000000000000.6
1774
+ 9 1000000000000.4
1775
+ 9 1000000000000.6
1776
+ 9 1000000000000.4
1777
+ 9 1000000000000.6
1778
+ 9 1000000000000.4
1779
+ 9 1000000000000.6
1780
+ 9 1000000000000.4
1781
+ 9 1000000000000.6
1782
+ 9 1000000000000.4
1783
+ 9 1000000000000.6
1784
+ 9 1000000000000.4
1785
+ 9 1000000000000.6
1786
+ 9 1000000000000.4
1787
+ 9 1000000000000.6
1788
+ 9 1000000000000.4
1789
+ 9 1000000000000.6
1790
+ 9 1000000000000.4
1791
+ 9 1000000000000.6
1792
+ 9 1000000000000.4
1793
+ 9 1000000000000.6
1794
+ 9 1000000000000.4
1795
+ 9 1000000000000.6
1796
+ 9 1000000000000.4
1797
+ 9 1000000000000.6
1798
+ 9 1000000000000.4
1799
+ 9 1000000000000.6
1800
+ 9 1000000000000.4
1801
+ 9 1000000000000.6
1802
+ 9 1000000000000.4
1803
+ 9 1000000000000.6
1804
+ 9 1000000000000.4
1805
+ 9 1000000000000.6
1806
+ 9 1000000000000.4
1807
+ 9 1000000000000.6
1808
+ 9 1000000000000.4
1809
+ 9 1000000000000.6
1810
+ 9 1000000000000.4
1811
+ 9 1000000000000.6
1812
+ 9 1000000000000.4
1813
+ 9 1000000000000.6
1814
+ 9 1000000000000.4
1815
+ 9 1000000000000.6
1816
+ 9 1000000000000.4
1817
+ 9 1000000000000.6
1818
+ 9 1000000000000.4
1819
+ 9 1000000000000.6
1820
+ 9 1000000000000.4
1821
+ 9 1000000000000.6
1822
+ 9 1000000000000.4
1823
+ 9 1000000000000.6
1824
+ 9 1000000000000.4
1825
+ 9 1000000000000.6
1826
+ 9 1000000000000.4
1827
+ 9 1000000000000.6
1828
+ 9 1000000000000.4
1829
+ 9 1000000000000.6
1830
+ 9 1000000000000.4
1831
+ 9 1000000000000.6
1832
+ 9 1000000000000.4
1833
+ 9 1000000000000.6
1834
+ 9 1000000000000.4
1835
+ 9 1000000000000.6
1836
+ 9 1000000000000.4
1837
+ 9 1000000000000.6
1838
+ 9 1000000000000.4
1839
+ 9 1000000000000.6
1840
+ 9 1000000000000.4
1841
+ 9 1000000000000.6
1842
+ 9 1000000000000.4
1843
+ 9 1000000000000.6
1844
+ 9 1000000000000.4
1845
+ 9 1000000000000.6
1846
+ 9 1000000000000.4
1847
+ 9 1000000000000.6
1848
+ 9 1000000000000.4
1849
+ 9 1000000000000.6
1850
+ 9 1000000000000.4
1851
+ 9 1000000000000.6
1852
+ 9 1000000000000.4
1853
+ 9 1000000000000.6
1854
+ 9 1000000000000.4
1855
+ 9 1000000000000.6
1856
+ 9 1000000000000.4
1857
+ 9 1000000000000.6
1858
+ 9 1000000000000.4
1859
+ 9 1000000000000.6
1860
+ 9 1000000000000.4
1861
+ 9 1000000000000.6
1862
+ 9 1000000000000.4
1863
+ 9 1000000000000.6
1864
+ 9 1000000000000.4
1865
+ 9 1000000000000.6
1866
+ 9 1000000000000.4
1867
+ 9 1000000000000.6
1868
+ 9 1000000000000.4
1869
+ 9 1000000000000.6
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_anova/SmLs09.dat ADDED
The diff for this file is too large to render. See raw diff
 
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/nist_linregress/Norris.dat ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NIST/ITL StRD
2
+ Dataset Name: Norris (Norris.dat)
3
+
4
+ File Format: ASCII
5
+ Certified Values (lines 31 to 46)
6
+ Data (lines 61 to 96)
7
+
8
+ Procedure: Linear Least Squares Regression
9
+
10
+ Reference: Norris, J., NIST.
11
+ Calibration of Ozone Monitors.
12
+
13
+ Data: 1 Response Variable (y)
14
+ 1 Predictor Variable (x)
15
+ 36 Observations
16
+ Lower Level of Difficulty
17
+ Observed Data
18
+
19
+ Model: Linear Class
20
+ 2 Parameters (B0,B1)
21
+
22
+ y = B0 + B1*x + e
23
+
24
+
25
+
26
+ Certified Regression Statistics
27
+
28
+ Standard Deviation
29
+ Parameter Estimate of Estimate
30
+
31
+ B0 -0.262323073774029 0.232818234301152
32
+ B1 1.00211681802045 0.429796848199937E-03
33
+
34
+ Residual
35
+ Standard Deviation 0.884796396144373
36
+
37
+ R-Squared 0.999993745883712
38
+
39
+
40
+ Certified Analysis of Variance Table
41
+
42
+ Source of Degrees of Sums of Mean
43
+ Variation Freedom Squares Squares F Statistic
44
+
45
+ Regression 1 4255954.13232369 4255954.13232369 5436385.54079785
46
+ Residual 34 26.6173985294224 0.782864662630069
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ Data: y x
61
+ 0.1 0.2
62
+ 338.8 337.4
63
+ 118.1 118.2
64
+ 888.0 884.6
65
+ 9.2 10.1
66
+ 228.1 226.5
67
+ 668.5 666.3
68
+ 998.5 996.3
69
+ 449.1 448.6
70
+ 778.9 777.0
71
+ 559.2 558.2
72
+ 0.3 0.4
73
+ 0.1 0.6
74
+ 778.1 775.5
75
+ 668.8 666.9
76
+ 339.3 338.0
77
+ 448.9 447.5
78
+ 10.8 11.6
79
+ 557.7 556.0
80
+ 228.3 228.1
81
+ 998.0 995.8
82
+ 888.8 887.6
83
+ 119.6 120.2
84
+ 0.3 0.3
85
+ 0.6 0.3
86
+ 557.6 556.8
87
+ 339.3 339.1
88
+ 888.0 887.2
89
+ 998.5 999.0
90
+ 778.9 779.0
91
+ 10.2 11.1
92
+ 117.6 118.3
93
+ 228.9 229.2
94
+ 668.4 669.1
95
+ 449.2 448.9
96
+ 0.2 0.5
97
+
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/data/studentized_range_mpmath_ref.json ADDED
@@ -0,0 +1,1499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
11
+ },
12
+ "mp_result": 1.0
13
+ },
14
+ {
15
+ "src_case": {
16
+ "m": 1,
17
+ "k": 3,
18
+ "v": 10,
19
+ "expected_atol": 1e-09,
20
+ "expected_rtol": 1e-09
21
+ },
22
+ "mp_result": 1.8342745127927962
23
+ },
24
+ {
25
+ "src_case": {
26
+ "m": 2,
27
+ "k": 3,
28
+ "v": 10,
29
+ "expected_atol": 1e-09,
30
+ "expected_rtol": 1e-09
31
+ },
32
+ "mp_result": 4.567483357831711
33
+ },
34
+ {
35
+ "src_case": {
36
+ "m": 3,
37
+ "k": 3,
38
+ "v": 10,
39
+ "expected_atol": 1e-09,
40
+ "expected_rtol": 1e-09
41
+ },
42
+ "mp_result": 14.412156886227011
43
+ },
44
+ {
45
+ "src_case": {
46
+ "m": 4,
47
+ "k": 3,
48
+ "v": 10,
49
+ "expected_atol": 1e-09,
50
+ "expected_rtol": 1e-09
51
+ },
52
+ "mp_result": 56.012250366720444
53
+ }
54
+ ],
55
+ "cdf_data": [
56
+ {
57
+ "src_case": {
58
+ "q": 0.1,
59
+ "k": 3,
60
+ "v": 3,
61
+ "expected_atol": 1e-11,
62
+ "expected_rtol": 1e-11
63
+ },
64
+ "mp_result": 0.0027502772229359594
65
+ },
66
+ {
67
+ "src_case": {
68
+ "q": 0.1,
69
+ "k": 10,
70
+ "v": 10,
71
+ "expected_atol": 1e-11,
72
+ "expected_rtol": 1e-11
73
+ },
74
+ "mp_result": 2.8544145010066327e-12
75
+ },
76
+ {
77
+ "src_case": {
78
+ "q": 0.1,
79
+ "k": 3,
80
+ "v": 10,
81
+ "expected_atol": 1e-11,
82
+ "expected_rtol": 1e-11
83
+ },
84
+ "mp_result": 0.0027520560662338336
85
+ },
86
+ {
87
+ "src_case": {
88
+ "q": 0.1,
89
+ "k": 10,
90
+ "v": 100,
91
+ "expected_atol": 1e-11,
92
+ "expected_rtol": 1e-11
93
+ },
94
+ "mp_result": 9.39089126131273e-13
95
+ },
96
+ {
97
+ "src_case": {
98
+ "q": 0.1,
99
+ "k": 3,
100
+ "v": 20,
101
+ "expected_atol": 1e-11,
102
+ "expected_rtol": 1e-11
103
+ },
104
+ "mp_result": 0.002752437649536182
105
+ },
106
+ {
107
+ "src_case": {
108
+ "q": 0.1,
109
+ "k": 10,
110
+ "v": 50,
111
+ "expected_atol": 1e-11,
112
+ "expected_rtol": 1e-11
113
+ },
114
+ "mp_result": 1.0862189999210748e-12
115
+ },
116
+ {
117
+ "src_case": {
118
+ "q": 0.1,
119
+ "k": 3,
120
+ "v": 120,
121
+ "expected_atol": 1e-11,
122
+ "expected_rtol": 1e-11
123
+ },
124
+ "mp_result": 0.002752755744313648
125
+ },
126
+ {
127
+ "src_case": {
128
+ "q": 0.1,
129
+ "k": 3,
130
+ "v": 100,
131
+ "expected_atol": 1e-11,
132
+ "expected_rtol": 1e-11
133
+ },
134
+ "mp_result": 0.0027527430186246545
135
+ },
136
+ {
137
+ "src_case": {
138
+ "q": 0.1,
139
+ "k": 3,
140
+ "v": 50,
141
+ "expected_atol": 1e-11,
142
+ "expected_rtol": 1e-11
143
+ },
144
+ "mp_result": 0.002752666667812431
145
+ },
146
+ {
147
+ "src_case": {
148
+ "q": 0.1,
149
+ "k": 20,
150
+ "v": 10,
151
+ "expected_atol": 1e-11,
152
+ "expected_rtol": 1e-11
153
+ },
154
+ "mp_result": 2.505275157135514e-24
155
+ },
156
+ {
157
+ "src_case": {
158
+ "q": 0.1,
159
+ "k": 20,
160
+ "v": 20,
161
+ "expected_atol": 1e-11,
162
+ "expected_rtol": 1e-11
163
+ },
164
+ "mp_result": 3.8546698113384126e-25
165
+ },
166
+ {
167
+ "src_case": {
168
+ "q": 0.1,
169
+ "k": 10,
170
+ "v": 3,
171
+ "expected_atol": 1e-11,
172
+ "expected_rtol": 1e-11
173
+ },
174
+ "mp_result": 1.7362668562706085e-11
175
+ },
176
+ {
177
+ "src_case": {
178
+ "q": 0.1,
179
+ "k": 20,
180
+ "v": 50,
181
+ "expected_atol": 1e-11,
182
+ "expected_rtol": 1e-11
183
+ },
184
+ "mp_result": 5.571947730052616e-26
185
+ },
186
+ {
187
+ "src_case": {
188
+ "q": 0.1,
189
+ "k": 20,
190
+ "v": 100,
191
+ "expected_atol": 1e-11,
192
+ "expected_rtol": 1e-11
193
+ },
194
+ "mp_result": 2.032619249089036e-27
195
+ },
196
+ {
197
+ "src_case": {
198
+ "q": 0.1,
199
+ "k": 20,
200
+ "v": 3,
201
+ "expected_atol": 1e-11,
202
+ "expected_rtol": 1e-11
203
+ },
204
+ "mp_result": 9.539763646681808e-22
205
+ },
206
+ {
207
+ "src_case": {
208
+ "q": 0.1,
209
+ "k": 10,
210
+ "v": 20,
211
+ "expected_atol": 1e-11,
212
+ "expected_rtol": 1e-11
213
+ },
214
+ "mp_result": 1.618313512511099e-12
215
+ },
216
+ {
217
+ "src_case": {
218
+ "q": 0.1,
219
+ "k": 20,
220
+ "v": 120,
221
+ "expected_atol": 1e-11,
222
+ "expected_rtol": 1e-11
223
+ },
224
+ "mp_result": 4.919231733354114e-28
225
+ },
226
+ {
227
+ "src_case": {
228
+ "q": 0.1,
229
+ "k": 10,
230
+ "v": 120,
231
+ "expected_atol": 1e-11,
232
+ "expected_rtol": 1e-11
233
+ },
234
+ "mp_result": 9.159348906295542e-13
235
+ },
236
+ {
237
+ "src_case": {
238
+ "q": 1,
239
+ "k": 3,
240
+ "v": 3,
241
+ "expected_atol": 1e-11,
242
+ "expected_rtol": 1e-11
243
+ },
244
+ "mp_result": 0.22331624289542043
245
+ },
246
+ {
247
+ "src_case": {
248
+ "q": 1,
249
+ "k": 3,
250
+ "v": 50,
251
+ "expected_atol": 1e-11,
252
+ "expected_rtol": 1e-11
253
+ },
254
+ "mp_result": 0.2395624637676257
255
+ },
256
+ {
257
+ "src_case": {
258
+ "q": 1,
259
+ "k": 3,
260
+ "v": 10,
261
+ "expected_atol": 1e-11,
262
+ "expected_rtol": 1e-11
263
+ },
264
+ "mp_result": 0.23510918942128056
265
+ },
266
+ {
267
+ "src_case": {
268
+ "q": 1,
269
+ "k": 3,
270
+ "v": 20,
271
+ "expected_atol": 1e-11,
272
+ "expected_rtol": 1e-11
273
+ },
274
+ "mp_result": 0.23786536230099864
275
+ },
276
+ {
277
+ "src_case": {
278
+ "q": 1,
279
+ "k": 10,
280
+ "v": 50,
281
+ "expected_atol": 1e-11,
282
+ "expected_rtol": 1e-11
283
+ },
284
+ "mp_result": 0.000651656693149116
285
+ },
286
+ {
287
+ "src_case": {
288
+ "q": 1,
289
+ "k": 3,
290
+ "v": 100,
291
+ "expected_atol": 1e-11,
292
+ "expected_rtol": 1e-11
293
+ },
294
+ "mp_result": 0.2401356460422021
295
+ },
296
+ {
297
+ "src_case": {
298
+ "q": 1,
299
+ "k": 10,
300
+ "v": 3,
301
+ "expected_atol": 1e-11,
302
+ "expected_rtol": 1e-11
303
+ },
304
+ "mp_result": 0.003971273224673166
305
+ },
306
+ {
307
+ "src_case": {
308
+ "q": 1,
309
+ "k": 10,
310
+ "v": 20,
311
+ "expected_atol": 1e-11,
312
+ "expected_rtol": 1e-11
313
+ },
314
+ "mp_result": 0.0008732969319364606
315
+ },
316
+ {
317
+ "src_case": {
318
+ "q": 1,
319
+ "k": 3,
320
+ "v": 120,
321
+ "expected_atol": 1e-11,
322
+ "expected_rtol": 1e-11
323
+ },
324
+ "mp_result": 0.24023154593376422
325
+ },
326
+ {
327
+ "src_case": {
328
+ "q": 1,
329
+ "k": 10,
330
+ "v": 10,
331
+ "expected_atol": 1e-11,
332
+ "expected_rtol": 1e-11
333
+ },
334
+ "mp_result": 0.001300816146573152
335
+ },
336
+ {
337
+ "src_case": {
338
+ "q": 1,
339
+ "k": 20,
340
+ "v": 50,
341
+ "expected_atol": 1e-11,
342
+ "expected_rtol": 1e-11
343
+ },
344
+ "mp_result": 1.5682573722040226e-07
345
+ },
346
+ {
347
+ "src_case": {
348
+ "q": 1,
349
+ "k": 10,
350
+ "v": 100,
351
+ "expected_atol": 1e-11,
352
+ "expected_rtol": 1e-11
353
+ },
354
+ "mp_result": 0.0005841098057517027
355
+ },
356
+ {
357
+ "src_case": {
358
+ "q": 1,
359
+ "k": 20,
360
+ "v": 3,
361
+ "expected_atol": 1e-11,
362
+ "expected_rtol": 1e-11
363
+ },
364
+ "mp_result": 9.2267674885784e-05
365
+ },
366
+ {
367
+ "src_case": {
368
+ "q": 1,
369
+ "k": 10,
370
+ "v": 120,
371
+ "expected_atol": 1e-11,
372
+ "expected_rtol": 1e-11
373
+ },
374
+ "mp_result": 0.0005731712496327297
375
+ },
376
+ {
377
+ "src_case": {
378
+ "q": 1,
379
+ "k": 20,
380
+ "v": 10,
381
+ "expected_atol": 1e-11,
382
+ "expected_rtol": 1e-11
383
+ },
384
+ "mp_result": 2.746798012658064e-06
385
+ },
386
+ {
387
+ "src_case": {
388
+ "q": 1,
389
+ "k": 20,
390
+ "v": 20,
391
+ "expected_atol": 1e-11,
392
+ "expected_rtol": 1e-11
393
+ },
394
+ "mp_result": 5.807700350854172e-07
395
+ },
396
+ {
397
+ "src_case": {
398
+ "q": 1,
399
+ "k": 20,
400
+ "v": 100,
401
+ "expected_atol": 1e-11,
402
+ "expected_rtol": 1e-11
403
+ },
404
+ "mp_result": 9.147637957472628e-08
405
+ },
406
+ {
407
+ "src_case": {
408
+ "q": 1,
409
+ "k": 20,
410
+ "v": 120,
411
+ "expected_atol": 1e-11,
412
+ "expected_rtol": 1e-11
413
+ },
414
+ "mp_result": 8.306675539750552e-08
415
+ },
416
+ {
417
+ "src_case": {
418
+ "q": 4,
419
+ "k": 3,
420
+ "v": 3,
421
+ "expected_atol": 1e-11,
422
+ "expected_rtol": 1e-11
423
+ },
424
+ "mp_result": 0.8711786295203324
425
+ },
426
+ {
427
+ "src_case": {
428
+ "q": 4,
429
+ "k": 3,
430
+ "v": 50,
431
+ "expected_atol": 1e-11,
432
+ "expected_rtol": 1e-11
433
+ },
434
+ "mp_result": 0.9818862781476212
435
+ },
436
+ {
437
+ "src_case": {
438
+ "q": 4,
439
+ "k": 3,
440
+ "v": 10,
441
+ "expected_atol": 1e-11,
442
+ "expected_rtol": 1e-11
443
+ },
444
+ "mp_result": 0.9566506502400175
445
+ },
446
+ {
447
+ "src_case": {
448
+ "q": 4,
449
+ "k": 3,
450
+ "v": 120,
451
+ "expected_atol": 1e-11,
452
+ "expected_rtol": 1e-11
453
+ },
454
+ "mp_result": 0.9849546621386962
455
+ },
456
+ {
457
+ "src_case": {
458
+ "q": 4,
459
+ "k": 3,
460
+ "v": 20,
461
+ "expected_atol": 1e-11,
462
+ "expected_rtol": 1e-11
463
+ },
464
+ "mp_result": 0.9731488893573804
465
+ },
466
+ {
467
+ "src_case": {
468
+ "q": 4,
469
+ "k": 10,
470
+ "v": 50,
471
+ "expected_atol": 1e-11,
472
+ "expected_rtol": 1e-11
473
+ },
474
+ "mp_result": 0.8450530667988544
475
+ },
476
+ {
477
+ "src_case": {
478
+ "q": 4,
479
+ "k": 10,
480
+ "v": 3,
481
+ "expected_atol": 1e-11,
482
+ "expected_rtol": 1e-11
483
+ },
484
+ "mp_result": 0.6164875232404174
485
+ },
486
+ {
487
+ "src_case": {
488
+ "q": 4,
489
+ "k": 3,
490
+ "v": 100,
491
+ "expected_atol": 1e-11,
492
+ "expected_rtol": 1e-11
493
+ },
494
+ "mp_result": 0.9845292772767739
495
+ },
496
+ {
497
+ "src_case": {
498
+ "q": 4,
499
+ "k": 10,
500
+ "v": 20,
501
+ "expected_atol": 1e-11,
502
+ "expected_rtol": 1e-11
503
+ },
504
+ "mp_result": 0.8079691517949077
505
+ },
506
+ {
507
+ "src_case": {
508
+ "q": 4,
509
+ "k": 10,
510
+ "v": 10,
511
+ "expected_atol": 1e-11,
512
+ "expected_rtol": 1e-11
513
+ },
514
+ "mp_result": 0.7573606942645745
515
+ },
516
+ {
517
+ "src_case": {
518
+ "q": 4,
519
+ "k": 10,
520
+ "v": 100,
521
+ "expected_atol": 1e-11,
522
+ "expected_rtol": 1e-11
523
+ },
524
+ "mp_result": 0.8587525248147736
525
+ },
526
+ {
527
+ "src_case": {
528
+ "q": 4,
529
+ "k": 10,
530
+ "v": 120,
531
+ "expected_atol": 1e-11,
532
+ "expected_rtol": 1e-11
533
+ },
534
+ "mp_result": 0.8611036193280976
535
+ },
536
+ {
537
+ "src_case": {
538
+ "q": 4,
539
+ "k": 20,
540
+ "v": 3,
541
+ "expected_atol": 1e-11,
542
+ "expected_rtol": 1e-11
543
+ },
544
+ "mp_result": 0.46523135355387657
545
+ },
546
+ {
547
+ "src_case": {
548
+ "q": 4,
549
+ "k": 20,
550
+ "v": 50,
551
+ "expected_atol": 1e-11,
552
+ "expected_rtol": 1e-11
553
+ },
554
+ "mp_result": 0.6318042819232383
555
+ },
556
+ {
557
+ "src_case": {
558
+ "q": 4,
559
+ "k": 20,
560
+ "v": 10,
561
+ "expected_atol": 1e-11,
562
+ "expected_rtol": 1e-11
563
+ },
564
+ "mp_result": 0.5574947140294286
565
+ },
566
+ {
567
+ "src_case": {
568
+ "q": 4,
569
+ "k": 20,
570
+ "v": 20,
571
+ "expected_atol": 1e-11,
572
+ "expected_rtol": 1e-11
573
+ },
574
+ "mp_result": 0.5970517763141937
575
+ },
576
+ {
577
+ "src_case": {
578
+ "q": 4,
579
+ "k": 20,
580
+ "v": 120,
581
+ "expected_atol": 1e-11,
582
+ "expected_rtol": 1e-11
583
+ },
584
+ "mp_result": 0.6493671527818267
585
+ },
586
+ {
587
+ "src_case": {
588
+ "q": 4,
589
+ "k": 20,
590
+ "v": 100,
591
+ "expected_atol": 1e-11,
592
+ "expected_rtol": 1e-11
593
+ },
594
+ "mp_result": 0.6466699776044968
595
+ },
596
+ {
597
+ "src_case": {
598
+ "q": 10,
599
+ "k": 3,
600
+ "v": 3,
601
+ "expected_atol": 1e-11,
602
+ "expected_rtol": 1e-11
603
+ },
604
+ "mp_result": 0.9881335633712994
605
+ },
606
+ {
607
+ "src_case": {
608
+ "q": 10,
609
+ "k": 3,
610
+ "v": 50,
611
+ "expected_atol": 1e-11,
612
+ "expected_rtol": 1e-11
613
+ },
614
+ "mp_result": 0.9999999861266821
615
+ },
616
+ {
617
+ "src_case": {
618
+ "q": 10,
619
+ "k": 3,
620
+ "v": 10,
621
+ "expected_atol": 1e-11,
622
+ "expected_rtol": 1e-11
623
+ },
624
+ "mp_result": 0.999908236635449
625
+ },
626
+ {
627
+ "src_case": {
628
+ "q": 10,
629
+ "k": 3,
630
+ "v": 20,
631
+ "expected_atol": 1e-11,
632
+ "expected_rtol": 1e-11
633
+ },
634
+ "mp_result": 0.9999978467928313
635
+ },
636
+ {
637
+ "src_case": {
638
+ "q": 10,
639
+ "k": 3,
640
+ "v": 120,
641
+ "expected_atol": 1e-11,
642
+ "expected_rtol": 1e-11
643
+ },
644
+ "mp_result": 0.9999999996690216
645
+ },
646
+ {
647
+ "src_case": {
648
+ "q": 10,
649
+ "k": 3,
650
+ "v": 100,
651
+ "expected_atol": 1e-11,
652
+ "expected_rtol": 1e-11
653
+ },
654
+ "mp_result": 0.9999999993640496
655
+ },
656
+ {
657
+ "src_case": {
658
+ "q": 10,
659
+ "k": 10,
660
+ "v": 3,
661
+ "expected_atol": 1e-11,
662
+ "expected_rtol": 1e-11
663
+ },
664
+ "mp_result": 0.9570401457077894
665
+ },
666
+ {
667
+ "src_case": {
668
+ "q": 10,
669
+ "k": 10,
670
+ "v": 50,
671
+ "expected_atol": 1e-11,
672
+ "expected_rtol": 1e-11
673
+ },
674
+ "mp_result": 0.9999997977351971
675
+ },
676
+ {
677
+ "src_case": {
678
+ "q": 10,
679
+ "k": 10,
680
+ "v": 10,
681
+ "expected_atol": 1e-11,
682
+ "expected_rtol": 1e-11
683
+ },
684
+ "mp_result": 0.9991738325963548
685
+ },
686
+ {
687
+ "src_case": {
688
+ "q": 10,
689
+ "k": 10,
690
+ "v": 20,
691
+ "expected_atol": 1e-11,
692
+ "expected_rtol": 1e-11
693
+ },
694
+ "mp_result": 0.9999730883609333
695
+ },
696
+ {
697
+ "src_case": {
698
+ "q": 10,
699
+ "k": 10,
700
+ "v": 100,
701
+ "expected_atol": 1e-11,
702
+ "expected_rtol": 1e-11
703
+ },
704
+ "mp_result": 0.9999999905199205
705
+ },
706
+ {
707
+ "src_case": {
708
+ "q": 10,
709
+ "k": 10,
710
+ "v": 120,
711
+ "expected_atol": 1e-11,
712
+ "expected_rtol": 1e-11
713
+ },
714
+ "mp_result": 0.9999999950566264
715
+ },
716
+ {
717
+ "src_case": {
718
+ "q": 10,
719
+ "k": 20,
720
+ "v": 3,
721
+ "expected_atol": 1e-11,
722
+ "expected_rtol": 1e-11
723
+ },
724
+ "mp_result": 0.9312318042339768
725
+ },
726
+ {
727
+ "src_case": {
728
+ "q": 10,
729
+ "k": 20,
730
+ "v": 50,
731
+ "expected_atol": 1e-11,
732
+ "expected_rtol": 1e-11
733
+ },
734
+ "mp_result": 0.9999991743904675
735
+ },
736
+ {
737
+ "src_case": {
738
+ "q": 10,
739
+ "k": 20,
740
+ "v": 10,
741
+ "expected_atol": 1e-11,
742
+ "expected_rtol": 1e-11
743
+ },
744
+ "mp_result": 0.9977643922032399
745
+ },
746
+ {
747
+ "src_case": {
748
+ "q": 10,
749
+ "k": 20,
750
+ "v": 20,
751
+ "expected_atol": 1e-11,
752
+ "expected_rtol": 1e-11
753
+ },
754
+ "mp_result": 0.9999054426012515
755
+ },
756
+ {
757
+ "src_case": {
758
+ "q": 10,
759
+ "k": 20,
760
+ "v": 100,
761
+ "expected_atol": 1e-11,
762
+ "expected_rtol": 1e-11
763
+ },
764
+ "mp_result": 0.9999999602948055
765
+ },
766
+ {
767
+ "src_case": {
768
+ "q": 10,
769
+ "k": 20,
770
+ "v": 120,
771
+ "expected_atol": 1e-11,
772
+ "expected_rtol": 1e-11
773
+ },
774
+ "mp_result": 0.9999999792458618
775
+ }
776
+ ],
777
+ "pdf_data": [
778
+ {
779
+ "src_case": {
780
+ "q": 0.1,
781
+ "k": 3,
782
+ "v": 3,
783
+ "expected_atol": 1e-11,
784
+ "expected_rtol": 1e-11
785
+ },
786
+ "mp_result": 0.05487847613526332
787
+ },
788
+ {
789
+ "src_case": {
790
+ "q": 0.1,
791
+ "k": 10,
792
+ "v": 10,
793
+ "expected_atol": 1e-11,
794
+ "expected_rtol": 1e-11
795
+ },
796
+ "mp_result": 2.564099684606509e-10
797
+ },
798
+ {
799
+ "src_case": {
800
+ "q": 0.1,
801
+ "k": 3,
802
+ "v": 10,
803
+ "expected_atol": 1e-11,
804
+ "expected_rtol": 1e-11
805
+ },
806
+ "mp_result": 0.05494947290360002
807
+ },
808
+ {
809
+ "src_case": {
810
+ "q": 0.1,
811
+ "k": 10,
812
+ "v": 100,
813
+ "expected_atol": 1e-11,
814
+ "expected_rtol": 1e-11
815
+ },
816
+ "mp_result": 8.442593793786411e-11
817
+ },
818
+ {
819
+ "src_case": {
820
+ "q": 0.1,
821
+ "k": 3,
822
+ "v": 20,
823
+ "expected_atol": 1e-11,
824
+ "expected_rtol": 1e-11
825
+ },
826
+ "mp_result": 0.054964710604860405
827
+ },
828
+ {
829
+ "src_case": {
830
+ "q": 0.1,
831
+ "k": 10,
832
+ "v": 50,
833
+ "expected_atol": 1e-11,
834
+ "expected_rtol": 1e-11
835
+ },
836
+ "mp_result": 9.764441961563576e-11
837
+ },
838
+ {
839
+ "src_case": {
840
+ "q": 0.1,
841
+ "k": 3,
842
+ "v": 100,
843
+ "expected_atol": 1e-11,
844
+ "expected_rtol": 1e-11
845
+ },
846
+ "mp_result": 0.05497690690332341
847
+ },
848
+ {
849
+ "src_case": {
850
+ "q": 0.1,
851
+ "k": 3,
852
+ "v": 50,
853
+ "expected_atol": 1e-11,
854
+ "expected_rtol": 1e-11
855
+ },
856
+ "mp_result": 0.05497385731702228
857
+ },
858
+ {
859
+ "src_case": {
860
+ "q": 0.1,
861
+ "k": 20,
862
+ "v": 10,
863
+ "expected_atol": 1e-11,
864
+ "expected_rtol": 1e-11
865
+ },
866
+ "mp_result": 4.758021225803992e-22
867
+ },
868
+ {
869
+ "src_case": {
870
+ "q": 0.1,
871
+ "k": 3,
872
+ "v": 120,
873
+ "expected_atol": 1e-11,
874
+ "expected_rtol": 1e-11
875
+ },
876
+ "mp_result": 0.054977415200879516
877
+ },
878
+ {
879
+ "src_case": {
880
+ "q": 0.1,
881
+ "k": 20,
882
+ "v": 3,
883
+ "expected_atol": 1e-11,
884
+ "expected_rtol": 1e-11
885
+ },
886
+ "mp_result": 1.8004731453548083e-19
887
+ },
888
+ {
889
+ "src_case": {
890
+ "q": 0.1,
891
+ "k": 10,
892
+ "v": 3,
893
+ "expected_atol": 1e-11,
894
+ "expected_rtol": 1e-11
895
+ },
896
+ "mp_result": 1.5564176176604816e-09
897
+ },
898
+ {
899
+ "src_case": {
900
+ "q": 0.1,
901
+ "k": 20,
902
+ "v": 50,
903
+ "expected_atol": 1e-11,
904
+ "expected_rtol": 1e-11
905
+ },
906
+ "mp_result": 9.342768070688728e-24
907
+ },
908
+ {
909
+ "src_case": {
910
+ "q": 0.1,
911
+ "k": 10,
912
+ "v": 20,
913
+ "expected_atol": 1e-11,
914
+ "expected_rtol": 1e-11
915
+ },
916
+ "mp_result": 1.454372265306114e-10
917
+ },
918
+ {
919
+ "src_case": {
920
+ "q": 0.1,
921
+ "k": 20,
922
+ "v": 100,
923
+ "expected_atol": 1e-11,
924
+ "expected_rtol": 1e-11
925
+ },
926
+ "mp_result": 3.9138464398429654e-25
927
+ },
928
+ {
929
+ "src_case": {
930
+ "q": 0.1,
931
+ "k": 20,
932
+ "v": 20,
933
+ "expected_atol": 1e-11,
934
+ "expected_rtol": 1e-11
935
+ },
936
+ "mp_result": 5.266341131767418e-23
937
+ },
938
+ {
939
+ "src_case": {
940
+ "q": 0.1,
941
+ "k": 10,
942
+ "v": 120,
943
+ "expected_atol": 1e-11,
944
+ "expected_rtol": 1e-11
945
+ },
946
+ "mp_result": 8.234556126446594e-11
947
+ },
948
+ {
949
+ "src_case": {
950
+ "q": 0.1,
951
+ "k": 20,
952
+ "v": 120,
953
+ "expected_atol": 1e-11,
954
+ "expected_rtol": 1e-11
955
+ },
956
+ "mp_result": 9.32929780487562e-26
957
+ },
958
+ {
959
+ "src_case": {
960
+ "q": 1,
961
+ "k": 3,
962
+ "v": 3,
963
+ "expected_atol": 1e-11,
964
+ "expected_rtol": 1e-11
965
+ },
966
+ "mp_result": 0.36083736990527154
967
+ },
968
+ {
969
+ "src_case": {
970
+ "q": 1,
971
+ "k": 3,
972
+ "v": 50,
973
+ "expected_atol": 1e-11,
974
+ "expected_rtol": 1e-11
975
+ },
976
+ "mp_result": 0.4137959132282269
977
+ },
978
+ {
979
+ "src_case": {
980
+ "q": 1,
981
+ "k": 3,
982
+ "v": 20,
983
+ "expected_atol": 1e-11,
984
+ "expected_rtol": 1e-11
985
+ },
986
+ "mp_result": 0.4080239698771056
987
+ },
988
+ {
989
+ "src_case": {
990
+ "q": 1,
991
+ "k": 3,
992
+ "v": 10,
993
+ "expected_atol": 1e-11,
994
+ "expected_rtol": 1e-11
995
+ },
996
+ "mp_result": 0.398772020275752
997
+ },
998
+ {
999
+ "src_case": {
1000
+ "q": 1,
1001
+ "k": 3,
1002
+ "v": 120,
1003
+ "expected_atol": 1e-11,
1004
+ "expected_rtol": 1e-11
1005
+ },
1006
+ "mp_result": 0.4160873922094346
1007
+ },
1008
+ {
1009
+ "src_case": {
1010
+ "q": 1,
1011
+ "k": 3,
1012
+ "v": 100,
1013
+ "expected_atol": 1e-11,
1014
+ "expected_rtol": 1e-11
1015
+ },
1016
+ "mp_result": 0.4157583991350054
1017
+ },
1018
+ {
1019
+ "src_case": {
1020
+ "q": 1,
1021
+ "k": 10,
1022
+ "v": 50,
1023
+ "expected_atol": 1e-11,
1024
+ "expected_rtol": 1e-11
1025
+ },
1026
+ "mp_result": 0.005210720148451848
1027
+ },
1028
+ {
1029
+ "src_case": {
1030
+ "q": 1,
1031
+ "k": 10,
1032
+ "v": 3,
1033
+ "expected_atol": 1e-11,
1034
+ "expected_rtol": 1e-11
1035
+ },
1036
+ "mp_result": 0.02575314059867804
1037
+ },
1038
+ {
1039
+ "src_case": {
1040
+ "q": 1,
1041
+ "k": 10,
1042
+ "v": 10,
1043
+ "expected_atol": 1e-11,
1044
+ "expected_rtol": 1e-11
1045
+ },
1046
+ "mp_result": 0.009782573637596617
1047
+ },
1048
+ {
1049
+ "src_case": {
1050
+ "q": 1,
1051
+ "k": 10,
1052
+ "v": 20,
1053
+ "expected_atol": 1e-11,
1054
+ "expected_rtol": 1e-11
1055
+ },
1056
+ "mp_result": 0.006818708302379005
1057
+ },
1058
+ {
1059
+ "src_case": {
1060
+ "q": 1,
1061
+ "k": 10,
1062
+ "v": 100,
1063
+ "expected_atol": 1e-11,
1064
+ "expected_rtol": 1e-11
1065
+ },
1066
+ "mp_result": 0.0047089182958790715
1067
+ },
1068
+ {
1069
+ "src_case": {
1070
+ "q": 1,
1071
+ "k": 10,
1072
+ "v": 120,
1073
+ "expected_atol": 1e-11,
1074
+ "expected_rtol": 1e-11
1075
+ },
1076
+ "mp_result": 0.004627085294166373
1077
+ },
1078
+ {
1079
+ "src_case": {
1080
+ "q": 1,
1081
+ "k": 20,
1082
+ "v": 3,
1083
+ "expected_atol": 1e-11,
1084
+ "expected_rtol": 1e-11
1085
+ },
1086
+ "mp_result": 0.0010886280311369462
1087
+ },
1088
+ {
1089
+ "src_case": {
1090
+ "q": 1,
1091
+ "k": 20,
1092
+ "v": 50,
1093
+ "expected_atol": 1e-11,
1094
+ "expected_rtol": 1e-11
1095
+ },
1096
+ "mp_result": 2.630674470916427e-06
1097
+ },
1098
+ {
1099
+ "src_case": {
1100
+ "q": 1,
1101
+ "k": 20,
1102
+ "v": 10,
1103
+ "expected_atol": 1e-11,
1104
+ "expected_rtol": 1e-11
1105
+ },
1106
+ "mp_result": 4.121713278199428e-05
1107
+ },
1108
+ {
1109
+ "src_case": {
1110
+ "q": 1,
1111
+ "k": 20,
1112
+ "v": 20,
1113
+ "expected_atol": 1e-11,
1114
+ "expected_rtol": 1e-11
1115
+ },
1116
+ "mp_result": 9.319506007252685e-06
1117
+ },
1118
+ {
1119
+ "src_case": {
1120
+ "q": 1,
1121
+ "k": 20,
1122
+ "v": 100,
1123
+ "expected_atol": 1e-11,
1124
+ "expected_rtol": 1e-11
1125
+ },
1126
+ "mp_result": 1.5585754418789747e-06
1127
+ },
1128
+ {
1129
+ "src_case": {
1130
+ "q": 1,
1131
+ "k": 20,
1132
+ "v": 120,
1133
+ "expected_atol": 1e-11,
1134
+ "expected_rtol": 1e-11
1135
+ },
1136
+ "mp_result": 1.4190335899441991e-06
1137
+ },
1138
+ {
1139
+ "src_case": {
1140
+ "q": 4,
1141
+ "k": 3,
1142
+ "v": 3,
1143
+ "expected_atol": 1e-11,
1144
+ "expected_rtol": 1e-11
1145
+ },
1146
+ "mp_result": 0.07185383302009114
1147
+ },
1148
+ {
1149
+ "src_case": {
1150
+ "q": 4,
1151
+ "k": 3,
1152
+ "v": 10,
1153
+ "expected_atol": 1e-11,
1154
+ "expected_rtol": 1e-11
1155
+ },
1156
+ "mp_result": 0.050268901219386576
1157
+ },
1158
+ {
1159
+ "src_case": {
1160
+ "q": 4,
1161
+ "k": 3,
1162
+ "v": 50,
1163
+ "expected_atol": 1e-11,
1164
+ "expected_rtol": 1e-11
1165
+ },
1166
+ "mp_result": 0.03321056847176124
1167
+ },
1168
+ {
1169
+ "src_case": {
1170
+ "q": 4,
1171
+ "k": 3,
1172
+ "v": 20,
1173
+ "expected_atol": 1e-11,
1174
+ "expected_rtol": 1e-11
1175
+ },
1176
+ "mp_result": 0.04044172384981084
1177
+ },
1178
+ {
1179
+ "src_case": {
1180
+ "q": 4,
1181
+ "k": 3,
1182
+ "v": 100,
1183
+ "expected_atol": 1e-11,
1184
+ "expected_rtol": 1e-11
1185
+ },
1186
+ "mp_result": 0.030571365659999617
1187
+ },
1188
+ {
1189
+ "src_case": {
1190
+ "q": 4,
1191
+ "k": 3,
1192
+ "v": 120,
1193
+ "expected_atol": 1e-11,
1194
+ "expected_rtol": 1e-11
1195
+ },
1196
+ "mp_result": 0.030120779149073032
1197
+ },
1198
+ {
1199
+ "src_case": {
1200
+ "q": 4,
1201
+ "k": 10,
1202
+ "v": 3,
1203
+ "expected_atol": 1e-11,
1204
+ "expected_rtol": 1e-11
1205
+ },
1206
+ "mp_result": 0.17501664247670937
1207
+ },
1208
+ {
1209
+ "src_case": {
1210
+ "q": 4,
1211
+ "k": 10,
1212
+ "v": 10,
1213
+ "expected_atol": 1e-11,
1214
+ "expected_rtol": 1e-11
1215
+ },
1216
+ "mp_result": 0.22374394725370736
1217
+ },
1218
+ {
1219
+ "src_case": {
1220
+ "q": 4,
1221
+ "k": 10,
1222
+ "v": 50,
1223
+ "expected_atol": 1e-11,
1224
+ "expected_rtol": 1e-11
1225
+ },
1226
+ "mp_result": 0.23246597521020534
1227
+ },
1228
+ {
1229
+ "src_case": {
1230
+ "q": 4,
1231
+ "k": 10,
1232
+ "v": 20,
1233
+ "expected_atol": 1e-11,
1234
+ "expected_rtol": 1e-11
1235
+ },
1236
+ "mp_result": 0.23239043677504484
1237
+ },
1238
+ {
1239
+ "src_case": {
1240
+ "q": 4,
1241
+ "k": 10,
1242
+ "v": 100,
1243
+ "expected_atol": 1e-11,
1244
+ "expected_rtol": 1e-11
1245
+ },
1246
+ "mp_result": 0.23057775622748988
1247
+ },
1248
+ {
1249
+ "src_case": {
1250
+ "q": 4,
1251
+ "k": 10,
1252
+ "v": 120,
1253
+ "expected_atol": 1e-11,
1254
+ "expected_rtol": 1e-11
1255
+ },
1256
+ "mp_result": 0.23012666145240815
1257
+ },
1258
+ {
1259
+ "src_case": {
1260
+ "q": 4,
1261
+ "k": 20,
1262
+ "v": 3,
1263
+ "expected_atol": 1e-11,
1264
+ "expected_rtol": 1e-11
1265
+ },
1266
+ "mp_result": 0.2073676639537027
1267
+ },
1268
+ {
1269
+ "src_case": {
1270
+ "q": 4,
1271
+ "k": 20,
1272
+ "v": 10,
1273
+ "expected_atol": 1e-11,
1274
+ "expected_rtol": 1e-11
1275
+ },
1276
+ "mp_result": 0.3245990542431859
1277
+ },
1278
+ {
1279
+ "src_case": {
1280
+ "q": 10,
1281
+ "k": 3,
1282
+ "v": 3,
1283
+ "expected_atol": 1e-11,
1284
+ "expected_rtol": 1e-11
1285
+ },
1286
+ "mp_result": 0.0033733228559870584
1287
+ },
1288
+ {
1289
+ "src_case": {
1290
+ "q": 10,
1291
+ "k": 3,
1292
+ "v": 10,
1293
+ "expected_atol": 1e-11,
1294
+ "expected_rtol": 1e-11
1295
+ },
1296
+ "mp_result": 7.728665739003835e-05
1297
+ },
1298
+ {
1299
+ "src_case": {
1300
+ "q": 4,
1301
+ "k": 20,
1302
+ "v": 20,
1303
+ "expected_atol": 1e-11,
1304
+ "expected_rtol": 1e-11
1305
+ },
1306
+ "mp_result": 0.38244500549096866
1307
+ },
1308
+ {
1309
+ "src_case": {
1310
+ "q": 4,
1311
+ "k": 20,
1312
+ "v": 100,
1313
+ "expected_atol": 1e-11,
1314
+ "expected_rtol": 1e-11
1315
+ },
1316
+ "mp_result": 0.45434978340834464
1317
+ },
1318
+ {
1319
+ "src_case": {
1320
+ "q": 4,
1321
+ "k": 20,
1322
+ "v": 50,
1323
+ "expected_atol": 1e-11,
1324
+ "expected_rtol": 1e-11
1325
+ },
1326
+ "mp_result": 0.43334135870667473
1327
+ },
1328
+ {
1329
+ "src_case": {
1330
+ "q": 10,
1331
+ "k": 3,
1332
+ "v": 100,
1333
+ "expected_atol": 1e-11,
1334
+ "expected_rtol": 1e-11
1335
+ },
1336
+ "mp_result": 2.159522630228393e-09
1337
+ },
1338
+ {
1339
+ "src_case": {
1340
+ "q": 4,
1341
+ "k": 20,
1342
+ "v": 120,
1343
+ "expected_atol": 1e-11,
1344
+ "expected_rtol": 1e-11
1345
+ },
1346
+ "mp_result": 0.45807877248528855
1347
+ },
1348
+ {
1349
+ "src_case": {
1350
+ "q": 10,
1351
+ "k": 3,
1352
+ "v": 50,
1353
+ "expected_atol": 1e-11,
1354
+ "expected_rtol": 1e-11
1355
+ },
1356
+ "mp_result": 3.5303467191175695e-08
1357
+ },
1358
+ {
1359
+ "src_case": {
1360
+ "q": 10,
1361
+ "k": 3,
1362
+ "v": 20,
1363
+ "expected_atol": 1e-11,
1364
+ "expected_rtol": 1e-11
1365
+ },
1366
+ "mp_result": 3.121281850105421e-06
1367
+ },
1368
+ {
1369
+ "src_case": {
1370
+ "q": 10,
1371
+ "k": 3,
1372
+ "v": 120,
1373
+ "expected_atol": 1e-11,
1374
+ "expected_rtol": 1e-11
1375
+ },
1376
+ "mp_result": 1.1901591191700855e-09
1377
+ },
1378
+ {
1379
+ "src_case": {
1380
+ "q": 10,
1381
+ "k": 10,
1382
+ "v": 10,
1383
+ "expected_atol": 1e-11,
1384
+ "expected_rtol": 1e-11
1385
+ },
1386
+ "mp_result": 0.0006784051704217357
1387
+ },
1388
+ {
1389
+ "src_case": {
1390
+ "q": 10,
1391
+ "k": 10,
1392
+ "v": 3,
1393
+ "expected_atol": 1e-11,
1394
+ "expected_rtol": 1e-11
1395
+ },
1396
+ "mp_result": 0.011845582636101885
1397
+ },
1398
+ {
1399
+ "src_case": {
1400
+ "q": 10,
1401
+ "k": 10,
1402
+ "v": 20,
1403
+ "expected_atol": 1e-11,
1404
+ "expected_rtol": 1e-11
1405
+ },
1406
+ "mp_result": 3.844183552674918e-05
1407
+ },
1408
+ {
1409
+ "src_case": {
1410
+ "q": 10,
1411
+ "k": 10,
1412
+ "v": 100,
1413
+ "expected_atol": 1e-11,
1414
+ "expected_rtol": 1e-11
1415
+ },
1416
+ "mp_result": 3.215093171597309e-08
1417
+ },
1418
+ {
1419
+ "src_case": {
1420
+ "q": 10,
1421
+ "k": 10,
1422
+ "v": 50,
1423
+ "expected_atol": 1e-11,
1424
+ "expected_rtol": 1e-11
1425
+ },
1426
+ "mp_result": 5.125792577534542e-07
1427
+ },
1428
+ {
1429
+ "src_case": {
1430
+ "q": 10,
1431
+ "k": 10,
1432
+ "v": 120,
1433
+ "expected_atol": 1e-11,
1434
+ "expected_rtol": 1e-11
1435
+ },
1436
+ "mp_result": 1.7759015355532446e-08
1437
+ },
1438
+ {
1439
+ "src_case": {
1440
+ "q": 10,
1441
+ "k": 20,
1442
+ "v": 10,
1443
+ "expected_atol": 1e-11,
1444
+ "expected_rtol": 1e-11
1445
+ },
1446
+ "mp_result": 0.0017957646258393628
1447
+ },
1448
+ {
1449
+ "src_case": {
1450
+ "q": 10,
1451
+ "k": 20,
1452
+ "v": 3,
1453
+ "expected_atol": 1e-11,
1454
+ "expected_rtol": 1e-11
1455
+ },
1456
+ "mp_result": 0.018534407764819284
1457
+ },
1458
+ {
1459
+ "src_case": {
1460
+ "q": 10,
1461
+ "k": 20,
1462
+ "v": 20,
1463
+ "expected_atol": 1e-11,
1464
+ "expected_rtol": 1e-11
1465
+ },
1466
+ "mp_result": 0.00013316083413164858
1467
+ },
1468
+ {
1469
+ "src_case": {
1470
+ "q": 10,
1471
+ "k": 20,
1472
+ "v": 50,
1473
+ "expected_atol": 1e-11,
1474
+ "expected_rtol": 1e-11
1475
+ },
1476
+ "mp_result": 2.082489228991225e-06
1477
+ },
1478
+ {
1479
+ "src_case": {
1480
+ "q": 10,
1481
+ "k": 20,
1482
+ "v": 100,
1483
+ "expected_atol": 1e-11,
1484
+ "expected_rtol": 1e-11
1485
+ },
1486
+ "mp_result": 1.3444226792257012e-07
1487
+ },
1488
+ {
1489
+ "src_case": {
1490
+ "q": 10,
1491
+ "k": 20,
1492
+ "v": 120,
1493
+ "expected_atol": 1e-11,
1494
+ "expected_rtol": 1e-11
1495
+ },
1496
+ "mp_result": 7.446912854228521e-08
1497
+ }
1498
+ ]
1499
+ }
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_resampling.py ADDED
@@ -0,0 +1,2009 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pytest
2
+
3
+ import numpy as np
4
+ from numpy.testing import assert_allclose, assert_equal, suppress_warnings
5
+
6
+ from scipy.conftest import array_api_compatible
7
+ from scipy._lib._util import rng_integers
8
+ from scipy._lib._array_api import array_namespace, is_numpy
9
+ from scipy._lib._array_api_no_0d import xp_assert_close, xp_assert_equal
10
+ from scipy import stats, special
11
+ from scipy.optimize import root
12
+
13
+ from scipy.stats import bootstrap, monte_carlo_test, permutation_test, power
14
+ import scipy.stats._resampling as _resampling
15
+
16
+
17
+ def test_bootstrap_iv():
18
+
19
+ message = "`data` must be a sequence of samples."
20
+ with pytest.raises(ValueError, match=message):
21
+ bootstrap(1, np.mean)
22
+
23
+ message = "`data` must contain at least one sample."
24
+ with pytest.raises(ValueError, match=message):
25
+ bootstrap(tuple(), np.mean)
26
+
27
+ message = "each sample in `data` must contain two or more observations..."
28
+ with pytest.raises(ValueError, match=message):
29
+ bootstrap(([1, 2, 3], [1]), np.mean)
30
+
31
+ message = ("When `paired is True`, all samples must have the same length ")
32
+ with pytest.raises(ValueError, match=message):
33
+ bootstrap(([1, 2, 3], [1, 2, 3, 4]), np.mean, paired=True)
34
+
35
+ message = "`vectorized` must be `True`, `False`, or `None`."
36
+ with pytest.raises(ValueError, match=message):
37
+ bootstrap(1, np.mean, vectorized='ekki')
38
+
39
+ message = "`axis` must be an integer."
40
+ with pytest.raises(ValueError, match=message):
41
+ bootstrap(([1, 2, 3],), np.mean, axis=1.5)
42
+
43
+ message = "could not convert string to float"
44
+ with pytest.raises(ValueError, match=message):
45
+ bootstrap(([1, 2, 3],), np.mean, confidence_level='ni')
46
+
47
+ message = "`n_resamples` must be a non-negative integer."
48
+ with pytest.raises(ValueError, match=message):
49
+ bootstrap(([1, 2, 3],), np.mean, n_resamples=-1000)
50
+
51
+ message = "`n_resamples` must be a non-negative integer."
52
+ with pytest.raises(ValueError, match=message):
53
+ bootstrap(([1, 2, 3],), np.mean, n_resamples=1000.5)
54
+
55
+ message = "`batch` must be a positive integer or None."
56
+ with pytest.raises(ValueError, match=message):
57
+ bootstrap(([1, 2, 3],), np.mean, batch=-1000)
58
+
59
+ message = "`batch` must be a positive integer or None."
60
+ with pytest.raises(ValueError, match=message):
61
+ bootstrap(([1, 2, 3],), np.mean, batch=1000.5)
62
+
63
+ message = "`method` must be in"
64
+ with pytest.raises(ValueError, match=message):
65
+ bootstrap(([1, 2, 3],), np.mean, method='ekki')
66
+
67
+ message = "`bootstrap_result` must have attribute `bootstrap_distribution'"
68
+ with pytest.raises(ValueError, match=message):
69
+ bootstrap(([1, 2, 3],), np.mean, bootstrap_result=10)
70
+
71
+ message = "Either `bootstrap_result.bootstrap_distribution.size`"
72
+ with pytest.raises(ValueError, match=message):
73
+ bootstrap(([1, 2, 3],), np.mean, n_resamples=0)
74
+
75
+ message = "SeedSequence expects int or sequence of ints"
76
+ with pytest.raises(TypeError, match=message):
77
+ bootstrap(([1, 2, 3],), np.mean, rng='herring')
78
+
79
+
80
+ @pytest.mark.parametrize("method", ['basic', 'percentile', 'BCa'])
81
+ @pytest.mark.parametrize("axis", [0, 1, 2])
82
+ def test_bootstrap_batch(method, axis):
83
+ # for one-sample statistics, batch size shouldn't affect the result
84
+ np.random.seed(0)
85
+
86
+ x = np.random.rand(10, 11, 12)
87
+ # SPEC-007 leave one call with random_state to ensure it still works
88
+ res1 = bootstrap((x,), np.mean, batch=None, method=method,
89
+ random_state=0, axis=axis, n_resamples=100)
90
+ np.random.seed(0)
91
+ res2 = bootstrap((x,), np.mean, batch=10, method=method,
92
+ axis=axis, n_resamples=100)
93
+
94
+ assert_equal(res2.confidence_interval.low, res1.confidence_interval.low)
95
+ assert_equal(res2.confidence_interval.high, res1.confidence_interval.high)
96
+ assert_equal(res2.standard_error, res1.standard_error)
97
+
98
+
99
+ @pytest.mark.parametrize("method", ['basic', 'percentile', 'BCa'])
100
+ def test_bootstrap_paired(method):
101
+ # test that `paired` works as expected
102
+ np.random.seed(0)
103
+ n = 100
104
+ x = np.random.rand(n)
105
+ y = np.random.rand(n)
106
+
107
+ def my_statistic(x, y, axis=-1):
108
+ return ((x-y)**2).mean(axis=axis)
109
+
110
+ def my_paired_statistic(i, axis=-1):
111
+ a = x[i]
112
+ b = y[i]
113
+ res = my_statistic(a, b)
114
+ return res
115
+
116
+ i = np.arange(len(x))
117
+
118
+ res1 = bootstrap((i,), my_paired_statistic, rng=0)
119
+ res2 = bootstrap((x, y), my_statistic, paired=True, rng=0)
120
+
121
+ assert_allclose(res1.confidence_interval, res2.confidence_interval)
122
+ assert_allclose(res1.standard_error, res2.standard_error)
123
+
124
+
125
+ @pytest.mark.parametrize("method", ['basic', 'percentile', 'BCa'])
126
+ @pytest.mark.parametrize("axis", [0, 1, 2])
127
+ @pytest.mark.parametrize("paired", [True, False])
128
+ def test_bootstrap_vectorized(method, axis, paired):
129
+ # test that paired is vectorized as expected: when samples are tiled,
130
+ # CI and standard_error of each axis-slice is the same as those of the
131
+ # original 1d sample
132
+
133
+ np.random.seed(0)
134
+
135
+ def my_statistic(x, y, z, axis=-1):
136
+ return x.mean(axis=axis) + y.mean(axis=axis) + z.mean(axis=axis)
137
+
138
+ shape = 10, 11, 12
139
+ n_samples = shape[axis]
140
+
141
+ x = np.random.rand(n_samples)
142
+ y = np.random.rand(n_samples)
143
+ z = np.random.rand(n_samples)
144
+ res1 = bootstrap((x, y, z), my_statistic, paired=paired, method=method,
145
+ rng=0, axis=0, n_resamples=100)
146
+ assert (res1.bootstrap_distribution.shape
147
+ == res1.standard_error.shape + (100,))
148
+
149
+ reshape = [1, 1, 1]
150
+ reshape[axis] = n_samples
151
+ x = np.broadcast_to(x.reshape(reshape), shape)
152
+ y = np.broadcast_to(y.reshape(reshape), shape)
153
+ z = np.broadcast_to(z.reshape(reshape), shape)
154
+ res2 = bootstrap((x, y, z), my_statistic, paired=paired, method=method,
155
+ rng=0, axis=axis, n_resamples=100)
156
+
157
+ assert_allclose(res2.confidence_interval.low,
158
+ res1.confidence_interval.low)
159
+ assert_allclose(res2.confidence_interval.high,
160
+ res1.confidence_interval.high)
161
+ assert_allclose(res2.standard_error, res1.standard_error)
162
+
163
+ result_shape = list(shape)
164
+ result_shape.pop(axis)
165
+
166
+ assert_equal(res2.confidence_interval.low.shape, result_shape)
167
+ assert_equal(res2.confidence_interval.high.shape, result_shape)
168
+ assert_equal(res2.standard_error.shape, result_shape)
169
+
170
+
171
+ @pytest.mark.slow
172
+ @pytest.mark.xfail_on_32bit("MemoryError with BCa observed in CI")
173
+ @pytest.mark.parametrize("method", ['basic', 'percentile', 'BCa'])
174
+ def test_bootstrap_against_theory(method):
175
+ # based on https://www.statology.org/confidence-intervals-python/
176
+ rng = np.random.default_rng(2442101192988600726)
177
+ data = stats.norm.rvs(loc=5, scale=2, size=5000, random_state=rng)
178
+ alpha = 0.95
179
+ dist = stats.t(df=len(data)-1, loc=np.mean(data), scale=stats.sem(data))
180
+ expected_interval = dist.interval(confidence=alpha)
181
+ expected_se = dist.std()
182
+
183
+ config = dict(data=(data,), statistic=np.mean, n_resamples=5000,
184
+ method=method, rng=rng)
185
+ res = bootstrap(**config, confidence_level=alpha)
186
+ assert_allclose(res.confidence_interval, expected_interval, rtol=5e-4)
187
+ assert_allclose(res.standard_error, expected_se, atol=3e-4)
188
+
189
+ config.update(dict(n_resamples=0, bootstrap_result=res))
190
+ res = bootstrap(**config, confidence_level=alpha, alternative='less')
191
+ assert_allclose(res.confidence_interval.high, dist.ppf(alpha), rtol=5e-4)
192
+
193
+ config.update(dict(n_resamples=0, bootstrap_result=res))
194
+ res = bootstrap(**config, confidence_level=alpha, alternative='greater')
195
+ assert_allclose(res.confidence_interval.low, dist.ppf(1-alpha), rtol=5e-4)
196
+
197
+
198
+ tests_R = {"basic": (23.77, 79.12),
199
+ "percentile": (28.86, 84.21),
200
+ "BCa": (32.31, 91.43)}
201
+
202
+
203
+ @pytest.mark.parametrize("method, expected", tests_R.items())
204
+ def test_bootstrap_against_R(method, expected):
205
+ # Compare against R's "boot" library
206
+ # library(boot)
207
+
208
+ # stat <- function (x, a) {
209
+ # mean(x[a])
210
+ # }
211
+
212
+ # x <- c(10, 12, 12.5, 12.5, 13.9, 15, 21, 22,
213
+ # 23, 34, 50, 81, 89, 121, 134, 213)
214
+
215
+ # # Use a large value so we get a few significant digits for the CI.
216
+ # n = 1000000
217
+ # bootresult = boot(x, stat, n)
218
+ # result <- boot.ci(bootresult)
219
+ # print(result)
220
+ x = np.array([10, 12, 12.5, 12.5, 13.9, 15, 21, 22,
221
+ 23, 34, 50, 81, 89, 121, 134, 213])
222
+ res = bootstrap((x,), np.mean, n_resamples=1000000, method=method,
223
+ rng=0)
224
+ assert_allclose(res.confidence_interval, expected, rtol=0.005)
225
+
226
+
227
+ tests_against_itself_1samp = {"basic": 1780,
228
+ "percentile": 1784,
229
+ "BCa": 1784}
230
+
231
+
232
+ def test_multisample_BCa_against_R():
233
+ # Because bootstrap is stochastic, it's tricky to test against reference
234
+ # behavior. Here, we show that SciPy's BCa CI matches R wboot's BCa CI
235
+ # much more closely than the other SciPy CIs do.
236
+
237
+ # arbitrary skewed data
238
+ x = [0.75859206, 0.5910282, -0.4419409, -0.36654601,
239
+ 0.34955357, -1.38835871, 0.76735821]
240
+ y = [1.41186073, 0.49775975, 0.08275588, 0.24086388,
241
+ 0.03567057, 0.52024419, 0.31966611, 1.32067634]
242
+
243
+ # a multi-sample statistic for which the BCa CI tends to be different
244
+ # from the other CIs
245
+ def statistic(x, y, axis):
246
+ s1 = stats.skew(x, axis=axis)
247
+ s2 = stats.skew(y, axis=axis)
248
+ return s1 - s2
249
+
250
+ # compute confidence intervals using each method
251
+ rng = np.random.default_rng(468865032284792692)
252
+
253
+ res_basic = stats.bootstrap((x, y), statistic, method='basic',
254
+ batch=100, rng=rng)
255
+ res_percent = stats.bootstrap((x, y), statistic, method='percentile',
256
+ batch=100, rng=rng)
257
+ res_bca = stats.bootstrap((x, y), statistic, method='bca',
258
+ batch=100, rng=rng)
259
+
260
+ # compute midpoints so we can compare just one number for each
261
+ mid_basic = np.mean(res_basic.confidence_interval)
262
+ mid_percent = np.mean(res_percent.confidence_interval)
263
+ mid_bca = np.mean(res_bca.confidence_interval)
264
+
265
+ # reference for BCA CI computed using R wboot package:
266
+ # library(wBoot)
267
+ # library(moments)
268
+
269
+ # x = c(0.75859206, 0.5910282, -0.4419409, -0.36654601,
270
+ # 0.34955357, -1.38835871, 0.76735821)
271
+ # y = c(1.41186073, 0.49775975, 0.08275588, 0.24086388,
272
+ # 0.03567057, 0.52024419, 0.31966611, 1.32067634)
273
+
274
+ # twoskew <- function(x1, y1) {skewness(x1) - skewness(y1)}
275
+ # boot.two.bca(x, y, skewness, conf.level = 0.95,
276
+ # R = 9999, stacked = FALSE)
277
+ mid_wboot = -1.5519
278
+
279
+ # compute percent difference relative to wboot BCA method
280
+ diff_basic = (mid_basic - mid_wboot)/abs(mid_wboot)
281
+ diff_percent = (mid_percent - mid_wboot)/abs(mid_wboot)
282
+ diff_bca = (mid_bca - mid_wboot)/abs(mid_wboot)
283
+
284
+ # SciPy's BCa CI midpoint is much closer than that of the other methods
285
+ assert diff_basic < -0.15
286
+ assert diff_percent > 0.15
287
+ assert abs(diff_bca) < 0.03
288
+
289
+
290
+ def test_BCa_acceleration_against_reference():
291
+ # Compare the (deterministic) acceleration parameter for a multi-sample
292
+ # problem against a reference value. The example is from [1], but Efron's
293
+ # value seems inaccurate. Straightforward code for computing the
294
+ # reference acceleration (0.011008228344026734) is available at:
295
+ # https://github.com/scipy/scipy/pull/16455#issuecomment-1193400981
296
+
297
+ y = np.array([10, 27, 31, 40, 46, 50, 52, 104, 146])
298
+ z = np.array([16, 23, 38, 94, 99, 141, 197])
299
+
300
+ def statistic(z, y, axis=0):
301
+ return np.mean(z, axis=axis) - np.mean(y, axis=axis)
302
+
303
+ data = [z, y]
304
+ res = stats.bootstrap(data, statistic)
305
+
306
+ axis = -1
307
+ alpha = 0.95
308
+ theta_hat_b = res.bootstrap_distribution
309
+ batch = 100
310
+ _, _, a_hat = _resampling._bca_interval(data, statistic, axis, alpha,
311
+ theta_hat_b, batch)
312
+ assert_allclose(a_hat, 0.011008228344026734)
313
+
314
+
315
+ @pytest.mark.slow
316
+ @pytest.mark.parametrize("method, expected",
317
+ tests_against_itself_1samp.items())
318
+ def test_bootstrap_against_itself_1samp(method, expected):
319
+ # The expected values in this test were generated using bootstrap
320
+ # to check for unintended changes in behavior. The test also makes sure
321
+ # that bootstrap works with multi-sample statistics and that the
322
+ # `axis` argument works as expected / function is vectorized.
323
+ np.random.seed(0)
324
+
325
+ n = 100 # size of sample
326
+ n_resamples = 999 # number of bootstrap resamples used to form each CI
327
+ confidence_level = 0.9
328
+
329
+ # The true mean is 5
330
+ dist = stats.norm(loc=5, scale=1)
331
+ stat_true = dist.mean()
332
+
333
+ # Do the same thing 2000 times. (The code is fully vectorized.)
334
+ n_replications = 2000
335
+ data = dist.rvs(size=(n_replications, n))
336
+ res = bootstrap((data,),
337
+ statistic=np.mean,
338
+ confidence_level=confidence_level,
339
+ n_resamples=n_resamples,
340
+ batch=50,
341
+ method=method,
342
+ axis=-1)
343
+ ci = res.confidence_interval
344
+
345
+ # ci contains vectors of lower and upper confidence interval bounds
346
+ ci_contains_true = np.sum((ci[0] < stat_true) & (stat_true < ci[1]))
347
+ assert ci_contains_true == expected
348
+
349
+ # ci_contains_true is not inconsistent with confidence_level
350
+ pvalue = stats.binomtest(ci_contains_true, n_replications,
351
+ confidence_level).pvalue
352
+ assert pvalue > 0.1
353
+
354
+
355
+ tests_against_itself_2samp = {"basic": 892,
356
+ "percentile": 890}
357
+
358
+
359
+ @pytest.mark.slow
360
+ @pytest.mark.parametrize("method, expected",
361
+ tests_against_itself_2samp.items())
362
+ def test_bootstrap_against_itself_2samp(method, expected):
363
+ # The expected values in this test were generated using bootstrap
364
+ # to check for unintended changes in behavior. The test also makes sure
365
+ # that bootstrap works with multi-sample statistics and that the
366
+ # `axis` argument works as expected / function is vectorized.
367
+ np.random.seed(0)
368
+
369
+ n1 = 100 # size of sample 1
370
+ n2 = 120 # size of sample 2
371
+ n_resamples = 999 # number of bootstrap resamples used to form each CI
372
+ confidence_level = 0.9
373
+
374
+ # The statistic we're interested in is the difference in means
375
+ def my_stat(data1, data2, axis=-1):
376
+ mean1 = np.mean(data1, axis=axis)
377
+ mean2 = np.mean(data2, axis=axis)
378
+ return mean1 - mean2
379
+
380
+ # The true difference in the means is -0.1
381
+ dist1 = stats.norm(loc=0, scale=1)
382
+ dist2 = stats.norm(loc=0.1, scale=1)
383
+ stat_true = dist1.mean() - dist2.mean()
384
+
385
+ # Do the same thing 1000 times. (The code is fully vectorized.)
386
+ n_replications = 1000
387
+ data1 = dist1.rvs(size=(n_replications, n1))
388
+ data2 = dist2.rvs(size=(n_replications, n2))
389
+ res = bootstrap((data1, data2),
390
+ statistic=my_stat,
391
+ confidence_level=confidence_level,
392
+ n_resamples=n_resamples,
393
+ batch=50,
394
+ method=method,
395
+ axis=-1)
396
+ ci = res.confidence_interval
397
+
398
+ # ci contains vectors of lower and upper confidence interval bounds
399
+ ci_contains_true = np.sum((ci[0] < stat_true) & (stat_true < ci[1]))
400
+ assert ci_contains_true == expected
401
+
402
+ # ci_contains_true is not inconsistent with confidence_level
403
+ pvalue = stats.binomtest(ci_contains_true, n_replications,
404
+ confidence_level).pvalue
405
+ assert pvalue > 0.1
406
+
407
+
408
+ @pytest.mark.parametrize("method", ["basic", "percentile"])
409
+ @pytest.mark.parametrize("axis", [0, 1])
410
+ def test_bootstrap_vectorized_3samp(method, axis):
411
+ def statistic(*data, axis=0):
412
+ # an arbitrary, vectorized statistic
413
+ return sum(sample.mean(axis) for sample in data)
414
+
415
+ def statistic_1d(*data):
416
+ # the same statistic, not vectorized
417
+ for sample in data:
418
+ assert sample.ndim == 1
419
+ return statistic(*data, axis=0)
420
+
421
+ np.random.seed(0)
422
+ x = np.random.rand(4, 5)
423
+ y = np.random.rand(4, 5)
424
+ z = np.random.rand(4, 5)
425
+ res1 = bootstrap((x, y, z), statistic, vectorized=True,
426
+ axis=axis, n_resamples=100, method=method, rng=0)
427
+ res2 = bootstrap((x, y, z), statistic_1d, vectorized=False,
428
+ axis=axis, n_resamples=100, method=method, rng=0)
429
+ assert_allclose(res1.confidence_interval, res2.confidence_interval)
430
+ assert_allclose(res1.standard_error, res2.standard_error)
431
+
432
+
433
+ @pytest.mark.xfail_on_32bit("Failure is not concerning; see gh-14107")
434
+ @pytest.mark.parametrize("method", ["basic", "percentile", "BCa"])
435
+ @pytest.mark.parametrize("axis", [0, 1])
436
+ def test_bootstrap_vectorized_1samp(method, axis):
437
+ def statistic(x, axis=0):
438
+ # an arbitrary, vectorized statistic
439
+ return x.mean(axis=axis)
440
+
441
+ def statistic_1d(x):
442
+ # the same statistic, not vectorized
443
+ assert x.ndim == 1
444
+ return statistic(x, axis=0)
445
+
446
+ np.random.seed(0)
447
+ x = np.random.rand(4, 5)
448
+ res1 = bootstrap((x,), statistic, vectorized=True, axis=axis,
449
+ n_resamples=100, batch=None, method=method,
450
+ rng=0)
451
+ res2 = bootstrap((x,), statistic_1d, vectorized=False, axis=axis,
452
+ n_resamples=100, batch=10, method=method,
453
+ rng=0)
454
+ assert_allclose(res1.confidence_interval, res2.confidence_interval)
455
+ assert_allclose(res1.standard_error, res2.standard_error)
456
+
457
+
458
+ @pytest.mark.parametrize("method", ["basic", "percentile", "BCa"])
459
+ def test_bootstrap_degenerate(method):
460
+ data = 35 * [10000.]
461
+ if method == "BCa":
462
+ with np.errstate(invalid='ignore'):
463
+ msg = "The BCa confidence interval cannot be calculated"
464
+ with pytest.warns(stats.DegenerateDataWarning, match=msg):
465
+ res = bootstrap([data, ], np.mean, method=method)
466
+ assert_equal(res.confidence_interval, (np.nan, np.nan))
467
+ else:
468
+ res = bootstrap([data, ], np.mean, method=method)
469
+ assert_equal(res.confidence_interval, (10000., 10000.))
470
+ assert_equal(res.standard_error, 0)
471
+
472
+
473
+ @pytest.mark.parametrize("method", ["basic", "percentile", "BCa"])
474
+ def test_bootstrap_gh15678(method):
475
+ # Check that gh-15678 is fixed: when statistic function returned a Python
476
+ # float, method="BCa" failed when trying to add a dimension to the float
477
+ rng = np.random.default_rng(354645618886684)
478
+ dist = stats.norm(loc=2, scale=4)
479
+ data = dist.rvs(size=100, random_state=rng)
480
+ data = (data,)
481
+ res = bootstrap(data, stats.skew, method=method, n_resamples=100,
482
+ rng=np.random.default_rng(9563))
483
+ # this always worked because np.apply_along_axis returns NumPy data type
484
+ ref = bootstrap(data, stats.skew, method=method, n_resamples=100,
485
+ rng=np.random.default_rng(9563), vectorized=False)
486
+ assert_allclose(res.confidence_interval, ref.confidence_interval)
487
+ assert_allclose(res.standard_error, ref.standard_error)
488
+ assert isinstance(res.standard_error, np.float64)
489
+
490
+
491
+ def test_bootstrap_min():
492
+ # Check that gh-15883 is fixed: percentileofscore should
493
+ # behave according to the 'mean' behavior and not trigger nan for BCa
494
+ rng = np.random.default_rng(1891289180021102)
495
+ dist = stats.norm(loc=2, scale=4)
496
+ data = dist.rvs(size=100, random_state=rng)
497
+ true_min = np.min(data)
498
+ data = (data,)
499
+ res = bootstrap(data, np.min, method="BCa", n_resamples=100,
500
+ rng=np.random.default_rng(3942))
501
+ assert true_min == res.confidence_interval.low
502
+ res2 = bootstrap(-np.array(data), np.max, method="BCa", n_resamples=100,
503
+ rng=np.random.default_rng(3942))
504
+ assert_allclose(-res.confidence_interval.low,
505
+ res2.confidence_interval.high)
506
+ assert_allclose(-res.confidence_interval.high,
507
+ res2.confidence_interval.low)
508
+
509
+
510
+ @pytest.mark.parametrize("additional_resamples", [0, 1000])
511
+ def test_re_bootstrap(additional_resamples):
512
+ # Test behavior of parameter `bootstrap_result`
513
+ rng = np.random.default_rng(8958153316228384)
514
+ x = rng.random(size=100)
515
+
516
+ n1 = 1000
517
+ n2 = additional_resamples
518
+ n3 = n1 + additional_resamples
519
+
520
+ rng = np.random.default_rng(296689032789913033)
521
+ res = stats.bootstrap((x,), np.mean, n_resamples=n1, rng=rng,
522
+ confidence_level=0.95, method='percentile')
523
+ res = stats.bootstrap((x,), np.mean, n_resamples=n2, rng=rng,
524
+ confidence_level=0.90, method='BCa',
525
+ bootstrap_result=res)
526
+
527
+ rng = np.random.default_rng(296689032789913033)
528
+ ref = stats.bootstrap((x,), np.mean, n_resamples=n3, rng=rng,
529
+ confidence_level=0.90, method='BCa')
530
+
531
+ assert_allclose(res.standard_error, ref.standard_error, rtol=1e-14)
532
+ assert_allclose(res.confidence_interval, ref.confidence_interval,
533
+ rtol=1e-14)
534
+
535
+
536
+ @pytest.mark.xfail_on_32bit("Sensible to machine precision")
537
+ @pytest.mark.parametrize("method", ['basic', 'percentile', 'BCa'])
538
+ def test_bootstrap_alternative(method):
539
+ rng = np.random.default_rng(5894822712842015040)
540
+ dist = stats.norm(loc=2, scale=4)
541
+ data = (dist.rvs(size=(100), random_state=rng),)
542
+
543
+ config = dict(data=data, statistic=np.std, rng=rng, axis=-1)
544
+ t = stats.bootstrap(**config, confidence_level=0.9)
545
+
546
+ config.update(dict(n_resamples=0, bootstrap_result=t))
547
+ l = stats.bootstrap(**config, confidence_level=0.95, alternative='less')
548
+ g = stats.bootstrap(**config, confidence_level=0.95, alternative='greater')
549
+
550
+ assert_allclose(l.confidence_interval.high, t.confidence_interval.high,
551
+ rtol=1e-14)
552
+ assert_allclose(g.confidence_interval.low, t.confidence_interval.low,
553
+ rtol=1e-14)
554
+ assert np.isneginf(l.confidence_interval.low)
555
+ assert np.isposinf(g.confidence_interval.high)
556
+
557
+ with pytest.raises(ValueError, match='`alternative` must be one of'):
558
+ stats.bootstrap(**config, alternative='ekki-ekki')
559
+
560
+
561
+ def test_jackknife_resample():
562
+ shape = 3, 4, 5, 6
563
+ np.random.seed(0)
564
+ x = np.random.rand(*shape)
565
+ y = next(_resampling._jackknife_resample(x))
566
+
567
+ for i in range(shape[-1]):
568
+ # each resample is indexed along second to last axis
569
+ # (last axis is the one the statistic will be taken over / consumed)
570
+ slc = y[..., i, :]
571
+ expected = np.delete(x, i, axis=-1)
572
+
573
+ assert np.array_equal(slc, expected)
574
+
575
+ y2 = np.concatenate(list(_resampling._jackknife_resample(x, batch=2)),
576
+ axis=-2)
577
+ assert np.array_equal(y2, y)
578
+
579
+
580
+ @pytest.mark.parametrize("rng_name", ["RandomState", "default_rng"])
581
+ def test_bootstrap_resample(rng_name):
582
+ rng = getattr(np.random, rng_name, None)
583
+ if rng is None:
584
+ pytest.skip(f"{rng_name} not available.")
585
+ rng1 = rng(0)
586
+ rng2 = rng(0)
587
+
588
+ n_resamples = 10
589
+ shape = 3, 4, 5, 6
590
+
591
+ np.random.seed(0)
592
+ x = np.random.rand(*shape)
593
+ y = _resampling._bootstrap_resample(x, n_resamples, rng=rng1)
594
+
595
+ for i in range(n_resamples):
596
+ # each resample is indexed along second to last axis
597
+ # (last axis is the one the statistic will be taken over / consumed)
598
+ slc = y[..., i, :]
599
+
600
+ js = rng_integers(rng2, 0, shape[-1], shape[-1])
601
+ expected = x[..., js]
602
+
603
+ assert np.array_equal(slc, expected)
604
+
605
+
606
+ @pytest.mark.parametrize("score", [0, 0.5, 1])
607
+ @pytest.mark.parametrize("axis", [0, 1, 2])
608
+ def test_percentile_of_score(score, axis):
609
+ shape = 10, 20, 30
610
+ np.random.seed(0)
611
+ x = np.random.rand(*shape)
612
+ p = _resampling._percentile_of_score(x, score, axis=-1)
613
+
614
+ def vectorized_pos(a, score, axis):
615
+ return np.apply_along_axis(stats.percentileofscore, axis, a, score)
616
+
617
+ p2 = vectorized_pos(x, score, axis=-1)/100
618
+
619
+ assert_allclose(p, p2, 1e-15)
620
+
621
+
622
+ def test_percentile_along_axis():
623
+ # the difference between _percentile_along_axis and np.percentile is that
624
+ # np.percentile gets _all_ the qs for each axis slice, whereas
625
+ # _percentile_along_axis gets the q corresponding with each axis slice
626
+
627
+ shape = 10, 20
628
+ np.random.seed(0)
629
+ x = np.random.rand(*shape)
630
+ q = np.random.rand(*shape[:-1]) * 100
631
+ y = _resampling._percentile_along_axis(x, q)
632
+
633
+ for i in range(shape[0]):
634
+ res = y[i]
635
+ expected = np.percentile(x[i], q[i], axis=-1)
636
+ assert_allclose(res, expected, 1e-15)
637
+
638
+
639
+ @pytest.mark.parametrize("axis", [0, 1, 2])
640
+ def test_vectorize_statistic(axis):
641
+ # test that _vectorize_statistic vectorizes a statistic along `axis`
642
+
643
+ def statistic(*data, axis):
644
+ # an arbitrary, vectorized statistic
645
+ return sum(sample.mean(axis) for sample in data)
646
+
647
+ def statistic_1d(*data):
648
+ # the same statistic, not vectorized
649
+ for sample in data:
650
+ assert sample.ndim == 1
651
+ return statistic(*data, axis=0)
652
+
653
+ # vectorize the non-vectorized statistic
654
+ statistic2 = _resampling._vectorize_statistic(statistic_1d)
655
+
656
+ np.random.seed(0)
657
+ x = np.random.rand(4, 5, 6)
658
+ y = np.random.rand(4, 1, 6)
659
+ z = np.random.rand(1, 5, 6)
660
+
661
+ res1 = statistic(x, y, z, axis=axis)
662
+ res2 = statistic2(x, y, z, axis=axis)
663
+ assert_allclose(res1, res2)
664
+
665
+
666
+ @pytest.mark.slow
667
+ @pytest.mark.parametrize("method", ["basic", "percentile", "BCa"])
668
+ def test_vector_valued_statistic(method):
669
+ # Generate 95% confidence interval around MLE of normal distribution
670
+ # parameters. Repeat 100 times, each time on sample of size 100.
671
+ # Check that confidence interval contains true parameters ~95 times.
672
+ # Confidence intervals are estimated and stochastic; a test failure
673
+ # does not necessarily indicate that something is wrong. More important
674
+ # than values of `counts` below is that the shapes of the outputs are
675
+ # correct.
676
+
677
+ rng = np.random.default_rng(2196847219)
678
+ params = 1, 0.5
679
+ sample = stats.norm.rvs(*params, size=(100, 100), random_state=rng)
680
+
681
+ def statistic(data, axis):
682
+ return np.asarray([np.mean(data, axis),
683
+ np.std(data, axis, ddof=1)])
684
+
685
+ res = bootstrap((sample,), statistic, method=method, axis=-1,
686
+ n_resamples=9999, batch=200)
687
+
688
+ counts = np.sum((res.confidence_interval.low.T < params)
689
+ & (res.confidence_interval.high.T > params),
690
+ axis=0)
691
+ assert np.all(counts >= 90)
692
+ assert np.all(counts <= 100)
693
+ assert res.confidence_interval.low.shape == (2, 100)
694
+ assert res.confidence_interval.high.shape == (2, 100)
695
+ assert res.standard_error.shape == (2, 100)
696
+ assert res.bootstrap_distribution.shape == (2, 100, 9999)
697
+
698
+
699
+ @pytest.mark.slow
700
+ @pytest.mark.filterwarnings('ignore::RuntimeWarning')
701
+ def test_vector_valued_statistic_gh17715():
702
+ # gh-17715 reported a mistake introduced in the extension of BCa to
703
+ # multi-sample statistics; a `len` should have been `.shape[-1]`. Check
704
+ # that this is resolved.
705
+
706
+ rng = np.random.default_rng(141921000979291141)
707
+
708
+ def concordance(x, y, axis):
709
+ xm = x.mean(axis)
710
+ ym = y.mean(axis)
711
+ cov = ((x - xm[..., None]) * (y - ym[..., None])).mean(axis)
712
+ return (2 * cov) / (x.var(axis) + y.var(axis) + (xm - ym) ** 2)
713
+
714
+ def statistic(tp, tn, fp, fn, axis):
715
+ actual = tp + fp
716
+ expected = tp + fn
717
+ return np.nan_to_num(concordance(actual, expected, axis))
718
+
719
+ def statistic_extradim(*args, axis):
720
+ return statistic(*args, axis)[np.newaxis, ...]
721
+
722
+ data = [[4, 0, 0, 2], # (tp, tn, fp, fn)
723
+ [2, 1, 2, 1],
724
+ [0, 6, 0, 0],
725
+ [0, 6, 3, 0],
726
+ [0, 8, 1, 0]]
727
+ data = np.array(data).T
728
+
729
+ res = bootstrap(data, statistic_extradim, rng=rng, paired=True)
730
+ ref = bootstrap(data, statistic, rng=rng, paired=True)
731
+ assert_allclose(res.confidence_interval.low[0],
732
+ ref.confidence_interval.low, atol=1e-15)
733
+ assert_allclose(res.confidence_interval.high[0],
734
+ ref.confidence_interval.high, atol=1e-15)
735
+
736
+
737
+ def test_gh_20850():
738
+ rng = np.random.default_rng(2085020850)
739
+ x = rng.random((10, 2))
740
+ y = rng.random((11, 2))
741
+ def statistic(x, y, axis):
742
+ return stats.ttest_ind(x, y, axis=axis).statistic
743
+
744
+ # The shapes do *not* need to be the same along axis
745
+ stats.bootstrap((x, y), statistic)
746
+ stats.bootstrap((x.T, y.T), statistic, axis=1)
747
+ # But even when the shapes *are* the same along axis, the lengths
748
+ # along other dimensions have to be the same (or `bootstrap` warns).
749
+ message = "Ignoring the dimension specified by `axis`..."
750
+ with pytest.warns(FutureWarning, match=message):
751
+ stats.bootstrap((x, y[:10, 0]), statistic) # this won't work after 1.16
752
+ with pytest.warns(FutureWarning, match=message):
753
+ stats.bootstrap((x, y[:10, 0:1]), statistic) # this will
754
+ with pytest.warns(FutureWarning, match=message):
755
+ stats.bootstrap((x.T, y.T[0:1, :10]), statistic, axis=1) # this will
756
+
757
+
758
+ # --- Test Monte Carlo Hypothesis Test --- #
759
+
760
+ class TestMonteCarloHypothesisTest:
761
+ atol = 2.5e-2 # for comparing p-value
762
+
763
+ def get_rvs(self, rvs_in, rs, dtype=None, xp=np):
764
+ return lambda *args, **kwds: xp.asarray(rvs_in(*args, random_state=rs, **kwds),
765
+ dtype=dtype)
766
+
767
+ def get_statistic(self, xp):
768
+ def statistic(x, axis):
769
+ m = xp.mean(x, axis=axis)
770
+ v = xp.var(x, axis=axis, correction=1)
771
+ n = x.shape[axis]
772
+ return m / (v/n)**0.5
773
+ # return stats.ttest_1samp(x, popmean=0., axis=axis).statistic)
774
+ return statistic
775
+
776
+ @array_api_compatible
777
+ def test_input_validation(self, xp):
778
+ # test that the appropriate error messages are raised for invalid input
779
+
780
+ data = xp.asarray([1., 2., 3.])
781
+ def stat(x, axis=None):
782
+ return xp.mean(x, axis=axis)
783
+
784
+ message = "Array shapes are incompatible for broadcasting."
785
+ temp = (xp.zeros((2, 5)), xp.zeros((3, 5)))
786
+ rvs = (stats.norm.rvs, stats.norm.rvs)
787
+ with pytest.raises(ValueError, match=message):
788
+ monte_carlo_test(temp, rvs, lambda x, y, axis: 1, axis=-1)
789
+
790
+ message = "`axis` must be an integer."
791
+ with pytest.raises(ValueError, match=message):
792
+ monte_carlo_test(data, stats.norm.rvs, stat, axis=1.5)
793
+
794
+ message = "`vectorized` must be `True`, `False`, or `None`."
795
+ with pytest.raises(ValueError, match=message):
796
+ monte_carlo_test(data, stats.norm.rvs, stat, vectorized=1.5)
797
+
798
+ message = "`rvs` must be callable or sequence of callables."
799
+ with pytest.raises(TypeError, match=message):
800
+ monte_carlo_test(data, None, stat)
801
+ with pytest.raises(TypeError, match=message):
802
+ temp = xp.asarray([[1., 2.], [3., 4.]])
803
+ monte_carlo_test(temp, [lambda x: x, None], stat)
804
+
805
+ message = "If `rvs` is a sequence..."
806
+ with pytest.raises(ValueError, match=message):
807
+ temp = xp.asarray([[1., 2., 3.]])
808
+ monte_carlo_test(temp, [lambda x: x, lambda x: x], stat)
809
+
810
+ message = "`statistic` must be callable."
811
+ with pytest.raises(TypeError, match=message):
812
+ monte_carlo_test(data, stats.norm.rvs, None)
813
+
814
+ message = "`n_resamples` must be a positive integer."
815
+ with pytest.raises(ValueError, match=message):
816
+ monte_carlo_test(data, stats.norm.rvs, stat, n_resamples=-1000)
817
+
818
+ message = "`n_resamples` must be a positive integer."
819
+ with pytest.raises(ValueError, match=message):
820
+ monte_carlo_test(data, stats.norm.rvs, stat, n_resamples=1000.5)
821
+
822
+ message = "`batch` must be a positive integer or None."
823
+ with pytest.raises(ValueError, match=message):
824
+ monte_carlo_test(data, stats.norm.rvs, stat, batch=-1000)
825
+
826
+ message = "`batch` must be a positive integer or None."
827
+ with pytest.raises(ValueError, match=message):
828
+ monte_carlo_test(data, stats.norm.rvs, stat, batch=1000.5)
829
+
830
+ message = "`alternative` must be in..."
831
+ with pytest.raises(ValueError, match=message):
832
+ monte_carlo_test(data, stats.norm.rvs, stat, alternative='ekki')
833
+
834
+ # *If* this raises a value error, make sure it has the intended message
835
+ message = "Signature inspection of statistic"
836
+ def rvs(size):
837
+ return xp.asarray(stats.norm.rvs(size=size))
838
+ try:
839
+ monte_carlo_test(data, rvs, xp.mean)
840
+ except ValueError as e:
841
+ assert str(e).startswith(message)
842
+
843
+ @array_api_compatible
844
+ def test_input_validation_xp(self, xp):
845
+ def non_vectorized_statistic(x):
846
+ return xp.mean(x)
847
+
848
+ message = "`statistic` must be vectorized..."
849
+ sample = xp.asarray([1., 2., 3.])
850
+ if is_numpy(xp):
851
+ monte_carlo_test(sample, stats.norm.rvs, non_vectorized_statistic)
852
+ return
853
+
854
+ with pytest.raises(ValueError, match=message):
855
+ monte_carlo_test(sample, stats.norm.rvs, non_vectorized_statistic)
856
+ with pytest.raises(ValueError, match=message):
857
+ monte_carlo_test(sample, stats.norm.rvs, xp.mean, vectorized=False)
858
+
859
+ @pytest.mark.xslow
860
+ @array_api_compatible
861
+ def test_batch(self, xp):
862
+ # make sure that the `batch` parameter is respected by checking the
863
+ # maximum batch size provided in calls to `statistic`
864
+ rng = np.random.default_rng(23492340193)
865
+ x = xp.asarray(rng.standard_normal(size=10))
866
+
867
+ xp_test = array_namespace(x) # numpy.std doesn't have `correction`
868
+ def statistic(x, axis):
869
+ batch_size = 1 if x.ndim == 1 else x.shape[0]
870
+ statistic.batch_size = max(batch_size, statistic.batch_size)
871
+ statistic.counter += 1
872
+ return self.get_statistic(xp_test)(x, axis=axis)
873
+ statistic.counter = 0
874
+ statistic.batch_size = 0
875
+
876
+ kwds = {'sample': x, 'statistic': statistic,
877
+ 'n_resamples': 1000, 'vectorized': True}
878
+
879
+ kwds['rvs'] = self.get_rvs(stats.norm.rvs, np.random.default_rng(328423), xp=xp)
880
+ res1 = monte_carlo_test(batch=1, **kwds)
881
+ assert_equal(statistic.counter, 1001)
882
+ assert_equal(statistic.batch_size, 1)
883
+
884
+ kwds['rvs'] = self.get_rvs(stats.norm.rvs, np.random.default_rng(328423), xp=xp)
885
+ statistic.counter = 0
886
+ res2 = monte_carlo_test(batch=50, **kwds)
887
+ assert_equal(statistic.counter, 21)
888
+ assert_equal(statistic.batch_size, 50)
889
+
890
+ kwds['rvs'] = self.get_rvs(stats.norm.rvs, np.random.default_rng(328423), xp=xp)
891
+ statistic.counter = 0
892
+ res3 = monte_carlo_test(**kwds)
893
+ assert_equal(statistic.counter, 2)
894
+ assert_equal(statistic.batch_size, 1000)
895
+
896
+ xp_assert_equal(res1.pvalue, res3.pvalue)
897
+ xp_assert_equal(res2.pvalue, res3.pvalue)
898
+
899
+ @array_api_compatible
900
+ @pytest.mark.parametrize('axis', range(-3, 3))
901
+ def test_axis_dtype(self, axis, xp):
902
+ # test that Nd-array samples are handled correctly for valid values
903
+ # of the `axis` parameter; also make sure non-default dtype is maintained
904
+ rng = np.random.default_rng(2389234)
905
+ size = [2, 3, 4]
906
+ size[axis] = 100
907
+
908
+ # Determine non-default dtype
909
+ dtype_default = xp.asarray(1.).dtype
910
+ dtype_str = 'float32'if ("64" in str(dtype_default)) else 'float64'
911
+ dtype_np = getattr(np, dtype_str)
912
+ dtype = getattr(xp, dtype_str)
913
+
914
+ # ttest_1samp is CPU array-API compatible, but it would be good to
915
+ # include CuPy in this test. We'll perform ttest_1samp with a
916
+ # NumPy array, but all the rest with be done with fully array-API
917
+ # compatible code.
918
+ x = rng.standard_normal(size=size, dtype=dtype_np)
919
+ expected = stats.ttest_1samp(x, popmean=0., axis=axis)
920
+
921
+ x = xp.asarray(x, dtype=dtype)
922
+ xp_test = array_namespace(x) # numpy.std doesn't have `correction`
923
+ statistic = self.get_statistic(xp_test)
924
+ rvs = self.get_rvs(stats.norm.rvs, rng, dtype=dtype, xp=xp)
925
+
926
+ res = monte_carlo_test(x, rvs, statistic, vectorized=True,
927
+ n_resamples=20000, axis=axis)
928
+
929
+ ref_statistic = xp.asarray(expected.statistic, dtype=dtype)
930
+ ref_pvalue = xp.asarray(expected.pvalue, dtype=dtype)
931
+ xp_assert_close(res.statistic, ref_statistic)
932
+ xp_assert_close(res.pvalue, ref_pvalue, atol=self.atol)
933
+
934
+ @array_api_compatible
935
+ @pytest.mark.parametrize('alternative', ("two-sided", "less", "greater"))
936
+ def test_alternative(self, alternative, xp):
937
+ # test that `alternative` is working as expected
938
+ rng = np.random.default_rng(65723433)
939
+
940
+ x = rng.standard_normal(size=30)
941
+ ref = stats.ttest_1samp(x, 0., alternative=alternative)
942
+
943
+ x = xp.asarray(x)
944
+ xp_test = array_namespace(x) # numpy.std doesn't have `correction`
945
+ statistic = self.get_statistic(xp_test)
946
+ rvs = self.get_rvs(stats.norm.rvs, rng, xp=xp)
947
+
948
+ res = monte_carlo_test(x, rvs, statistic, alternative=alternative)
949
+
950
+ xp_assert_close(res.statistic, xp.asarray(ref.statistic))
951
+ xp_assert_close(res.pvalue, xp.asarray(ref.pvalue), atol=self.atol)
952
+
953
+
954
+ # Tests below involve statistics that are not yet array-API compatible.
955
+ # They can be converted when the statistics are converted.
956
+ @pytest.mark.slow
957
+ @pytest.mark.parametrize('alternative', ("less", "greater"))
958
+ @pytest.mark.parametrize('a', np.linspace(-0.5, 0.5, 5)) # skewness
959
+ def test_against_ks_1samp(self, alternative, a):
960
+ # test that monte_carlo_test can reproduce pvalue of ks_1samp
961
+ rng = np.random.default_rng(65723433)
962
+
963
+ x = stats.skewnorm.rvs(a=a, size=30, random_state=rng)
964
+ expected = stats.ks_1samp(x, stats.norm.cdf, alternative=alternative)
965
+
966
+ def statistic1d(x):
967
+ return stats.ks_1samp(x, stats.norm.cdf, mode='asymp',
968
+ alternative=alternative).statistic
969
+
970
+ norm_rvs = self.get_rvs(stats.norm.rvs, rng)
971
+ res = monte_carlo_test(x, norm_rvs, statistic1d,
972
+ n_resamples=1000, vectorized=False,
973
+ alternative=alternative)
974
+
975
+ assert_allclose(res.statistic, expected.statistic)
976
+ if alternative == 'greater':
977
+ assert_allclose(res.pvalue, expected.pvalue, atol=self.atol)
978
+ elif alternative == 'less':
979
+ assert_allclose(1-res.pvalue, expected.pvalue, atol=self.atol)
980
+
981
+ @pytest.mark.parametrize('hypotest', (stats.skewtest, stats.kurtosistest))
982
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
983
+ @pytest.mark.parametrize('a', np.linspace(-2, 2, 5)) # skewness
984
+ def test_against_normality_tests(self, hypotest, alternative, a):
985
+ # test that monte_carlo_test can reproduce pvalue of normality tests
986
+ rng = np.random.default_rng(85723405)
987
+
988
+ x = stats.skewnorm.rvs(a=a, size=150, random_state=rng)
989
+ expected = hypotest(x, alternative=alternative)
990
+
991
+ def statistic(x, axis):
992
+ return hypotest(x, axis=axis).statistic
993
+
994
+ norm_rvs = self.get_rvs(stats.norm.rvs, rng)
995
+ res = monte_carlo_test(x, norm_rvs, statistic, vectorized=True,
996
+ alternative=alternative)
997
+
998
+ assert_allclose(res.statistic, expected.statistic)
999
+ assert_allclose(res.pvalue, expected.pvalue, atol=self.atol)
1000
+
1001
+ @pytest.mark.parametrize('a', np.arange(-2, 3)) # skewness parameter
1002
+ def test_against_normaltest(self, a):
1003
+ # test that monte_carlo_test can reproduce pvalue of normaltest
1004
+ rng = np.random.default_rng(12340513)
1005
+
1006
+ x = stats.skewnorm.rvs(a=a, size=150, random_state=rng)
1007
+ expected = stats.normaltest(x)
1008
+
1009
+ def statistic(x, axis):
1010
+ return stats.normaltest(x, axis=axis).statistic
1011
+
1012
+ norm_rvs = self.get_rvs(stats.norm.rvs, rng)
1013
+ res = monte_carlo_test(x, norm_rvs, statistic, vectorized=True,
1014
+ alternative='greater')
1015
+
1016
+ assert_allclose(res.statistic, expected.statistic)
1017
+ assert_allclose(res.pvalue, expected.pvalue, atol=self.atol)
1018
+
1019
+ @pytest.mark.xslow
1020
+ @pytest.mark.parametrize('a', np.linspace(-0.5, 0.5, 5)) # skewness
1021
+ def test_against_cramervonmises(self, a):
1022
+ # test that monte_carlo_test can reproduce pvalue of cramervonmises
1023
+ rng = np.random.default_rng(234874135)
1024
+
1025
+ x = stats.skewnorm.rvs(a=a, size=30, random_state=rng)
1026
+ expected = stats.cramervonmises(x, stats.norm.cdf)
1027
+
1028
+ def statistic1d(x):
1029
+ return stats.cramervonmises(x, stats.norm.cdf).statistic
1030
+
1031
+ norm_rvs = self.get_rvs(stats.norm.rvs, rng)
1032
+ res = monte_carlo_test(x, norm_rvs, statistic1d,
1033
+ n_resamples=1000, vectorized=False,
1034
+ alternative='greater')
1035
+
1036
+ assert_allclose(res.statistic, expected.statistic)
1037
+ assert_allclose(res.pvalue, expected.pvalue, atol=self.atol)
1038
+
1039
+ @pytest.mark.slow
1040
+ @pytest.mark.parametrize('dist_name', ('norm', 'logistic'))
1041
+ @pytest.mark.parametrize('i', range(5))
1042
+ def test_against_anderson(self, dist_name, i):
1043
+ # test that monte_carlo_test can reproduce results of `anderson`. Note:
1044
+ # `anderson` does not provide a p-value; it provides a list of
1045
+ # significance levels and the associated critical value of the test
1046
+ # statistic. `i` used to index this list.
1047
+
1048
+ # find the skewness for which the sample statistic matches one of the
1049
+ # critical values provided by `stats.anderson`
1050
+
1051
+ def fun(a):
1052
+ rng = np.random.default_rng(394295467)
1053
+ x = stats.tukeylambda.rvs(a, size=100, random_state=rng)
1054
+ expected = stats.anderson(x, dist_name)
1055
+ return expected.statistic - expected.critical_values[i]
1056
+ with suppress_warnings() as sup:
1057
+ sup.filter(RuntimeWarning)
1058
+ sol = root(fun, x0=0)
1059
+ assert sol.success
1060
+
1061
+ # get the significance level (p-value) associated with that critical
1062
+ # value
1063
+ a = sol.x[0]
1064
+ rng = np.random.default_rng(394295467)
1065
+ x = stats.tukeylambda.rvs(a, size=100, random_state=rng)
1066
+ expected = stats.anderson(x, dist_name)
1067
+ expected_stat = expected.statistic
1068
+ expected_p = expected.significance_level[i]/100
1069
+
1070
+ # perform equivalent Monte Carlo test and compare results
1071
+ def statistic1d(x):
1072
+ return stats.anderson(x, dist_name).statistic
1073
+
1074
+ dist_rvs = self.get_rvs(getattr(stats, dist_name).rvs, rng)
1075
+ with suppress_warnings() as sup:
1076
+ sup.filter(RuntimeWarning)
1077
+ res = monte_carlo_test(x, dist_rvs,
1078
+ statistic1d, n_resamples=1000,
1079
+ vectorized=False, alternative='greater')
1080
+
1081
+ assert_allclose(res.statistic, expected_stat)
1082
+ assert_allclose(res.pvalue, expected_p, atol=2*self.atol)
1083
+
1084
+ def test_p_never_zero(self):
1085
+ # Use biased estimate of p-value to ensure that p-value is never zero
1086
+ # per monte_carlo_test reference [1]
1087
+ rng = np.random.default_rng(2190176673029737545)
1088
+ x = np.zeros(100)
1089
+ res = monte_carlo_test(x, rng.random, np.mean,
1090
+ vectorized=True, alternative='less')
1091
+ assert res.pvalue == 0.0001
1092
+
1093
+ def test_against_ttest_ind(self):
1094
+ # test that `monte_carlo_test` can reproduce results of `ttest_ind`.
1095
+ rng = np.random.default_rng(219017667302737545)
1096
+ data = rng.random(size=(2, 5)), rng.random(size=7) # broadcastable
1097
+ rvs = rng.normal, rng.normal
1098
+ def statistic(x, y, axis):
1099
+ return stats.ttest_ind(x, y, axis=axis).statistic
1100
+
1101
+ res = stats.monte_carlo_test(data, rvs, statistic, axis=-1)
1102
+ ref = stats.ttest_ind(data[0], [data[1]], axis=-1)
1103
+ assert_allclose(res.statistic, ref.statistic)
1104
+ assert_allclose(res.pvalue, ref.pvalue, rtol=2e-2)
1105
+
1106
+ def test_against_f_oneway(self):
1107
+ # test that `monte_carlo_test` can reproduce results of `f_oneway`.
1108
+ rng = np.random.default_rng(219017667302737545)
1109
+ data = (rng.random(size=(2, 100)), rng.random(size=(2, 101)),
1110
+ rng.random(size=(2, 102)), rng.random(size=(2, 103)))
1111
+ rvs = rng.normal, rng.normal, rng.normal, rng.normal
1112
+
1113
+ def statistic(*args, axis):
1114
+ return stats.f_oneway(*args, axis=axis).statistic
1115
+
1116
+ res = stats.monte_carlo_test(data, rvs, statistic, axis=-1,
1117
+ alternative='greater')
1118
+ ref = stats.f_oneway(*data, axis=-1)
1119
+
1120
+ assert_allclose(res.statistic, ref.statistic)
1121
+ assert_allclose(res.pvalue, ref.pvalue, atol=1e-2)
1122
+
1123
+ @pytest.mark.fail_slow(2)
1124
+ @pytest.mark.xfail_on_32bit("Statistic may not depend on sample order on 32-bit")
1125
+ def test_finite_precision_statistic(self):
1126
+ # Some statistics return numerically distinct values when the values
1127
+ # should be equal in theory. Test that `monte_carlo_test` accounts
1128
+ # for this in some way.
1129
+ rng = np.random.default_rng(2549824598234528)
1130
+ n_resamples = 9999
1131
+ def rvs(size):
1132
+ return 1. * stats.bernoulli(p=0.333).rvs(size=size, random_state=rng)
1133
+
1134
+ x = rvs(100)
1135
+ res = stats.monte_carlo_test(x, rvs, np.var, alternative='less',
1136
+ n_resamples=n_resamples)
1137
+ # show that having a tolerance matters
1138
+ c0 = np.sum(res.null_distribution <= res.statistic)
1139
+ c1 = np.sum(res.null_distribution <= res.statistic*(1+1e-15))
1140
+ assert c0 != c1
1141
+ assert res.pvalue == (c1 + 1)/(n_resamples + 1)
1142
+
1143
+
1144
+ class TestPower:
1145
+ def test_input_validation(self):
1146
+ # test that the appropriate error messages are raised for invalid input
1147
+ rng = np.random.default_rng(8519895914314711673)
1148
+
1149
+ test = stats.ttest_ind
1150
+ rvs = (rng.normal, rng.normal)
1151
+ n_observations = (10, 12)
1152
+
1153
+ message = "`vectorized` must be `True`, `False`, or `None`."
1154
+ with pytest.raises(ValueError, match=message):
1155
+ power(test, rvs, n_observations, vectorized=1.5)
1156
+
1157
+ message = "`rvs` must be callable or sequence of callables."
1158
+ with pytest.raises(TypeError, match=message):
1159
+ power(test, None, n_observations)
1160
+ with pytest.raises(TypeError, match=message):
1161
+ power(test, (rng.normal, 'ekki'), n_observations)
1162
+
1163
+ message = "If `rvs` is a sequence..."
1164
+ with pytest.raises(ValueError, match=message):
1165
+ power(test, (rng.normal,), n_observations)
1166
+ with pytest.raises(ValueError, match=message):
1167
+ power(test, rvs, (10,))
1168
+
1169
+ message = "`significance` must contain floats between 0 and 1."
1170
+ with pytest.raises(ValueError, match=message):
1171
+ power(test, rvs, n_observations, significance=2)
1172
+ with pytest.raises(ValueError, match=message):
1173
+ power(test, rvs, n_observations, significance=np.linspace(-1, 1))
1174
+
1175
+ message = "`kwargs` must be a dictionary"
1176
+ with pytest.raises(TypeError, match=message):
1177
+ power(test, rvs, n_observations, kwargs=(1, 2, 3))
1178
+
1179
+ message = "shape mismatch: objects cannot be broadcast"
1180
+ with pytest.raises(ValueError, match=message):
1181
+ power(test, rvs, ([10, 11], [12, 13, 14]))
1182
+ with pytest.raises(ValueError, match=message):
1183
+ power(test, rvs, ([10, 11], [12, 13]), kwargs={'x': [1, 2, 3]})
1184
+
1185
+ message = "`test` must be callable"
1186
+ with pytest.raises(TypeError, match=message):
1187
+ power(None, rvs, n_observations)
1188
+
1189
+ message = "`n_resamples` must be a positive integer"
1190
+ with pytest.raises(ValueError, match=message):
1191
+ power(test, rvs, n_observations, n_resamples=-10)
1192
+ with pytest.raises(ValueError, match=message):
1193
+ power(test, rvs, n_observations, n_resamples=10.5)
1194
+
1195
+ message = "`batch` must be a positive integer"
1196
+ with pytest.raises(ValueError, match=message):
1197
+ power(test, rvs, n_observations, batch=-10)
1198
+ with pytest.raises(ValueError, match=message):
1199
+ power(test, rvs, n_observations, batch=10.5)
1200
+
1201
+ @pytest.mark.slow
1202
+ def test_batch(self):
1203
+ # make sure that the `batch` parameter is respected by checking the
1204
+ # maximum batch size provided in calls to `test`
1205
+ rng = np.random.default_rng(23492340193)
1206
+
1207
+ def test(x, axis):
1208
+ batch_size = 1 if x.ndim == 1 else len(x)
1209
+ test.batch_size = max(batch_size, test.batch_size)
1210
+ test.counter += 1
1211
+ return stats.ttest_1samp(x, 0, axis=axis).pvalue
1212
+ test.counter = 0
1213
+ test.batch_size = 0
1214
+
1215
+ kwds = dict(test=test, n_observations=10, n_resamples=1000)
1216
+
1217
+ rng = np.random.default_rng(23492340193)
1218
+ res1 = power(**kwds, rvs=rng.normal, batch=1)
1219
+ assert_equal(test.counter, 1000)
1220
+ assert_equal(test.batch_size, 1)
1221
+
1222
+ rng = np.random.default_rng(23492340193)
1223
+ test.counter = 0
1224
+ res2 = power(**kwds, rvs=rng.normal, batch=50)
1225
+ assert_equal(test.counter, 20)
1226
+ assert_equal(test.batch_size, 50)
1227
+
1228
+ rng = np.random.default_rng(23492340193)
1229
+ test.counter = 0
1230
+ res3 = power(**kwds, rvs=rng.normal, batch=1000)
1231
+ assert_equal(test.counter, 1)
1232
+ assert_equal(test.batch_size, 1000)
1233
+
1234
+ assert_equal(res1.power, res3.power)
1235
+ assert_equal(res2.power, res3.power)
1236
+
1237
+ @pytest.mark.slow
1238
+ def test_vectorization(self):
1239
+ # Test that `power` is vectorized as expected
1240
+ rng = np.random.default_rng(25495254834552)
1241
+
1242
+ # Single vectorized call
1243
+ popmeans = np.array([0, 0.2])
1244
+ def test(x, alternative, axis=-1):
1245
+ # ensure that popmeans axis is zeroth and orthogonal to the rest
1246
+ popmeans_expanded = np.expand_dims(popmeans, tuple(range(1, x.ndim + 1)))
1247
+ return stats.ttest_1samp(x, popmeans_expanded, alternative=alternative,
1248
+ axis=axis)
1249
+
1250
+ # nx and kwargs broadcast against one another
1251
+ nx = np.asarray([10, 15, 20, 50, 100])[:, np.newaxis]
1252
+ kwargs = {'alternative': ['less', 'greater', 'two-sided']}
1253
+
1254
+ # This dimension is added to the beginning
1255
+ significance = np.asarray([0.01, 0.025, 0.05, 0.1])
1256
+ res = stats.power(test, rng.normal, nx, significance=significance,
1257
+ kwargs=kwargs)
1258
+
1259
+ # Looping over all combinations
1260
+ ref = []
1261
+ for significance_i in significance:
1262
+ for nx_i in nx:
1263
+ for alternative_i in kwargs['alternative']:
1264
+ for popmean_i in popmeans:
1265
+ def test2(x, axis=-1):
1266
+ return stats.ttest_1samp(x, popmean_i, axis=axis,
1267
+ alternative=alternative_i)
1268
+
1269
+ tmp = stats.power(test2, rng.normal, nx_i,
1270
+ significance=significance_i)
1271
+ ref.append(tmp.power)
1272
+ ref = np.reshape(ref, res.power.shape)
1273
+
1274
+ # Show that results are similar
1275
+ assert_allclose(res.power, ref, rtol=2e-2, atol=1e-2)
1276
+
1277
+ def test_ttest_ind_null(self):
1278
+ # Check that the p-values of `ttest_ind` are uniformly distributed under
1279
+ # the null hypothesis
1280
+ rng = np.random.default_rng(254952548345528)
1281
+
1282
+ test = stats.ttest_ind
1283
+ n_observations = rng.integers(10, 100, size=(2, 10))
1284
+ rvs = rng.normal, rng.normal
1285
+ significance = np.asarray([0.01, 0.05, 0.1])
1286
+ res = stats.power(test, rvs, n_observations, significance=significance)
1287
+ significance = np.broadcast_to(significance[:, np.newaxis], res.power.shape)
1288
+ assert_allclose(res.power, significance, atol=1e-2)
1289
+
1290
+ def test_ttest_1samp_power(self):
1291
+ # Check simulated ttest_1samp power against reference
1292
+ rng = np.random.default_rng(254952548345528)
1293
+
1294
+ # Reference values computed with statmodels
1295
+ # import numpy as np
1296
+ # from statsmodels.stats.power import tt_solve_power
1297
+ # tt_solve_power = np.vectorize(tt_solve_power)
1298
+ # tt_solve_power([0.1, 0.5, 0.9], [[10], [20]], [[[0.01]], [[0.05]]])
1299
+ ref = [[[0.0126515 , 0.10269751, 0.40415802],
1300
+ [0.01657775, 0.29734608, 0.86228288]],
1301
+ [[0.0592903 , 0.29317561, 0.71718121],
1302
+ [0.07094116, 0.56450441, 0.96815163]]]
1303
+
1304
+ kwargs = {'popmean': [0.1, 0.5, 0.9]}
1305
+ n_observations = [[10], [20]]
1306
+ significance = [0.01, 0.05]
1307
+ res = stats.power(stats.ttest_1samp, rng.normal, n_observations,
1308
+ significance=significance, kwargs=kwargs)
1309
+ assert_allclose(res.power, ref, atol=1e-2)
1310
+
1311
+
1312
+ class TestPermutationTest:
1313
+
1314
+ rtol = 1e-14
1315
+
1316
+ def setup_method(self):
1317
+ self.rng = np.random.default_rng(7170559330470561044)
1318
+
1319
+ # -- Input validation -- #
1320
+
1321
+ def test_permutation_test_iv(self):
1322
+
1323
+ def stat(x, y, axis):
1324
+ return stats.ttest_ind((x, y), axis).statistic
1325
+
1326
+ message = "each sample in `data` must contain two or more ..."
1327
+ with pytest.raises(ValueError, match=message):
1328
+ permutation_test(([1, 2, 3], [1]), stat)
1329
+
1330
+ message = "`data` must be a tuple containing at least two samples"
1331
+ with pytest.raises(ValueError, match=message):
1332
+ permutation_test((1,), stat)
1333
+ with pytest.raises(TypeError, match=message):
1334
+ permutation_test(1, stat)
1335
+
1336
+ message = "`axis` must be an integer."
1337
+ with pytest.raises(ValueError, match=message):
1338
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, axis=1.5)
1339
+
1340
+ message = "`permutation_type` must be in..."
1341
+ with pytest.raises(ValueError, match=message):
1342
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat,
1343
+ permutation_type="ekki")
1344
+
1345
+ message = "`vectorized` must be `True`, `False`, or `None`."
1346
+ with pytest.raises(ValueError, match=message):
1347
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, vectorized=1.5)
1348
+
1349
+ message = "`n_resamples` must be a positive integer."
1350
+ with pytest.raises(ValueError, match=message):
1351
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, n_resamples=-1000)
1352
+
1353
+ message = "`n_resamples` must be a positive integer."
1354
+ with pytest.raises(ValueError, match=message):
1355
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, n_resamples=1000.5)
1356
+
1357
+ message = "`batch` must be a positive integer or None."
1358
+ with pytest.raises(ValueError, match=message):
1359
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, batch=-1000)
1360
+
1361
+ message = "`batch` must be a positive integer or None."
1362
+ with pytest.raises(ValueError, match=message):
1363
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, batch=1000.5)
1364
+
1365
+ message = "`alternative` must be in..."
1366
+ with pytest.raises(ValueError, match=message):
1367
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, alternative='ekki')
1368
+
1369
+ message = "SeedSequence expects int or sequence of ints"
1370
+ with pytest.raises(TypeError, match=message):
1371
+ permutation_test(([1, 2, 3], [1, 2, 3]), stat, rng='herring')
1372
+
1373
+ # -- Test Parameters -- #
1374
+ # SPEC-007 leave one call with seed to check it still works
1375
+ @pytest.mark.parametrize('random_state', [np.random.RandomState,
1376
+ np.random.default_rng])
1377
+ @pytest.mark.parametrize('permutation_type',
1378
+ ['pairings', 'samples', 'independent'])
1379
+ def test_batch(self, permutation_type, random_state):
1380
+ # make sure that the `batch` parameter is respected by checking the
1381
+ # maximum batch size provided in calls to `statistic`
1382
+ x = self.rng.random(10)
1383
+ y = self.rng.random(10)
1384
+
1385
+ def statistic(x, y, axis):
1386
+ batch_size = 1 if x.ndim == 1 else len(x)
1387
+ statistic.batch_size = max(batch_size, statistic.batch_size)
1388
+ statistic.counter += 1
1389
+ return np.mean(x, axis=axis) - np.mean(y, axis=axis)
1390
+ statistic.counter = 0
1391
+ statistic.batch_size = 0
1392
+
1393
+ kwds = {'n_resamples': 1000, 'permutation_type': permutation_type,
1394
+ 'vectorized': True}
1395
+ res1 = stats.permutation_test((x, y), statistic, batch=1,
1396
+ random_state=random_state(0), **kwds)
1397
+ assert_equal(statistic.counter, 1001)
1398
+ assert_equal(statistic.batch_size, 1)
1399
+
1400
+ statistic.counter = 0
1401
+ res2 = stats.permutation_test((x, y), statistic, batch=50,
1402
+ random_state=random_state(0), **kwds)
1403
+ assert_equal(statistic.counter, 21)
1404
+ assert_equal(statistic.batch_size, 50)
1405
+
1406
+ statistic.counter = 0
1407
+ res3 = stats.permutation_test((x, y), statistic, batch=1000,
1408
+ random_state=random_state(0), **kwds)
1409
+ assert_equal(statistic.counter, 2)
1410
+ assert_equal(statistic.batch_size, 1000)
1411
+
1412
+ assert_equal(res1.pvalue, res3.pvalue)
1413
+ assert_equal(res2.pvalue, res3.pvalue)
1414
+
1415
+ # SPEC-007 leave at least one call with seed to check it still works
1416
+ @pytest.mark.parametrize('random_state', [np.random.RandomState,
1417
+ np.random.default_rng])
1418
+ @pytest.mark.parametrize('permutation_type, exact_size',
1419
+ [('pairings', special.factorial(3)**2),
1420
+ ('samples', 2**3),
1421
+ ('independent', special.binom(6, 3))])
1422
+ def test_permutations(self, permutation_type, exact_size, random_state):
1423
+ # make sure that the `permutations` parameter is respected by checking
1424
+ # the size of the null distribution
1425
+ x = self.rng.random(3)
1426
+ y = self.rng.random(3)
1427
+
1428
+ def statistic(x, y, axis):
1429
+ return np.mean(x, axis=axis) - np.mean(y, axis=axis)
1430
+
1431
+ kwds = {'permutation_type': permutation_type,
1432
+ 'vectorized': True}
1433
+ res = stats.permutation_test((x, y), statistic, n_resamples=3,
1434
+ random_state=random_state(0), **kwds)
1435
+ assert_equal(res.null_distribution.size, 3)
1436
+
1437
+ res = stats.permutation_test((x, y), statistic, **kwds)
1438
+ assert_equal(res.null_distribution.size, exact_size)
1439
+
1440
+ # -- Randomized Permutation Tests -- #
1441
+
1442
+ # To get reasonable accuracy, these next three tests are somewhat slow.
1443
+ # Originally, I had them passing for all combinations of permutation type,
1444
+ # alternative, and RNG, but that takes too long for CI. Instead, split
1445
+ # into three tests, each testing a particular combination of the three
1446
+ # parameters.
1447
+
1448
+ def test_randomized_test_against_exact_both(self):
1449
+ # check that the randomized and exact tests agree to reasonable
1450
+ # precision for permutation_type='both
1451
+
1452
+ alternative, rng = 'less', 0
1453
+
1454
+ nx, ny, permutations = 8, 9, 24000
1455
+ assert special.binom(nx + ny, nx) > permutations
1456
+
1457
+ x = stats.norm.rvs(size=nx)
1458
+ y = stats.norm.rvs(size=ny)
1459
+ data = x, y
1460
+
1461
+ def statistic(x, y, axis):
1462
+ return np.mean(x, axis=axis) - np.mean(y, axis=axis)
1463
+
1464
+ kwds = {'vectorized': True, 'permutation_type': 'independent',
1465
+ 'batch': 100, 'alternative': alternative, 'rng': rng}
1466
+ res = permutation_test(data, statistic, n_resamples=permutations,
1467
+ **kwds)
1468
+ res2 = permutation_test(data, statistic, n_resamples=np.inf, **kwds)
1469
+
1470
+ assert res.statistic == res2.statistic
1471
+ assert_allclose(res.pvalue, res2.pvalue, atol=1e-2)
1472
+
1473
+ @pytest.mark.slow()
1474
+ def test_randomized_test_against_exact_samples(self):
1475
+ # check that the randomized and exact tests agree to reasonable
1476
+ # precision for permutation_type='samples'
1477
+
1478
+ alternative, rng = 'greater', None
1479
+
1480
+ nx, ny, permutations = 15, 15, 32000
1481
+ assert 2**nx > permutations
1482
+
1483
+ x = stats.norm.rvs(size=nx)
1484
+ y = stats.norm.rvs(size=ny)
1485
+ data = x, y
1486
+
1487
+ def statistic(x, y, axis):
1488
+ return np.mean(x - y, axis=axis)
1489
+
1490
+ kwds = {'vectorized': True, 'permutation_type': 'samples',
1491
+ 'batch': 100, 'alternative': alternative, 'rng': rng}
1492
+ res = permutation_test(data, statistic, n_resamples=permutations,
1493
+ **kwds)
1494
+ res2 = permutation_test(data, statistic, n_resamples=np.inf, **kwds)
1495
+
1496
+ assert res.statistic == res2.statistic
1497
+ assert_allclose(res.pvalue, res2.pvalue, atol=1e-2)
1498
+
1499
+ def test_randomized_test_against_exact_pairings(self):
1500
+ # check that the randomized and exact tests agree to reasonable
1501
+ # precision for permutation_type='pairings'
1502
+
1503
+ alternative, rng = 'two-sided', self.rng
1504
+
1505
+ nx, ny, permutations = 8, 8, 40000
1506
+ assert special.factorial(nx) > permutations
1507
+
1508
+ x = stats.norm.rvs(size=nx)
1509
+ y = stats.norm.rvs(size=ny)
1510
+ data = [x]
1511
+
1512
+ def statistic1d(x):
1513
+ return stats.pearsonr(x, y)[0]
1514
+
1515
+ statistic = _resampling._vectorize_statistic(statistic1d)
1516
+
1517
+ kwds = {'vectorized': True, 'permutation_type': 'samples',
1518
+ 'batch': 100, 'alternative': alternative, 'rng': rng}
1519
+ res = permutation_test(data, statistic, n_resamples=permutations,
1520
+ **kwds)
1521
+ res2 = permutation_test(data, statistic, n_resamples=np.inf, **kwds)
1522
+
1523
+ assert res.statistic == res2.statistic
1524
+ assert_allclose(res.pvalue, res2.pvalue, atol=1e-2)
1525
+
1526
+ # -- Independent (Unpaired) Sample Tests -- #
1527
+
1528
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
1529
+ def test_against_ks_2samp(self, alternative):
1530
+
1531
+ x = self.rng.normal(size=4, scale=1)
1532
+ y = self.rng.normal(size=5, loc=3, scale=3)
1533
+
1534
+ expected = stats.ks_2samp(x, y, alternative=alternative, mode='exact')
1535
+
1536
+ def statistic1d(x, y):
1537
+ return stats.ks_2samp(x, y, mode='asymp',
1538
+ alternative=alternative).statistic
1539
+
1540
+ # ks_2samp is always a one-tailed 'greater' test
1541
+ # it's the statistic that changes (D+ vs D- vs max(D+, D-))
1542
+ res = permutation_test((x, y), statistic1d, n_resamples=np.inf,
1543
+ alternative='greater', rng=self.rng)
1544
+
1545
+ assert_allclose(res.statistic, expected.statistic, rtol=self.rtol)
1546
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1547
+
1548
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
1549
+ def test_against_ansari(self, alternative):
1550
+
1551
+ x = self.rng.normal(size=4, scale=1)
1552
+ y = self.rng.normal(size=5, scale=3)
1553
+
1554
+ # ansari has a different convention for 'alternative'
1555
+ alternative_correspondence = {"less": "greater",
1556
+ "greater": "less",
1557
+ "two-sided": "two-sided"}
1558
+ alternative_scipy = alternative_correspondence[alternative]
1559
+ expected = stats.ansari(x, y, alternative=alternative_scipy)
1560
+
1561
+ def statistic1d(x, y):
1562
+ return stats.ansari(x, y).statistic
1563
+
1564
+ res = permutation_test((x, y), statistic1d, n_resamples=np.inf,
1565
+ alternative=alternative, rng=self.rng)
1566
+
1567
+ assert_allclose(res.statistic, expected.statistic, rtol=self.rtol)
1568
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1569
+
1570
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
1571
+ def test_against_mannwhitneyu(self, alternative):
1572
+
1573
+ x = stats.uniform.rvs(size=(3, 5, 2), loc=0, random_state=self.rng)
1574
+ y = stats.uniform.rvs(size=(3, 5, 2), loc=0.05, random_state=self.rng)
1575
+
1576
+ expected = stats.mannwhitneyu(x, y, axis=1, alternative=alternative)
1577
+
1578
+ def statistic(x, y, axis):
1579
+ return stats.mannwhitneyu(x, y, axis=axis).statistic
1580
+
1581
+ res = permutation_test((x, y), statistic, vectorized=True,
1582
+ n_resamples=np.inf, alternative=alternative,
1583
+ axis=1, rng=self.rng)
1584
+
1585
+ assert_allclose(res.statistic, expected.statistic, rtol=self.rtol)
1586
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1587
+
1588
+ def test_against_cvm(self):
1589
+
1590
+ x = stats.norm.rvs(size=4, scale=1, random_state=self.rng)
1591
+ y = stats.norm.rvs(size=5, loc=3, scale=3, random_state=self.rng)
1592
+
1593
+ expected = stats.cramervonmises_2samp(x, y, method='exact')
1594
+
1595
+ def statistic1d(x, y):
1596
+ return stats.cramervonmises_2samp(x, y,
1597
+ method='asymptotic').statistic
1598
+
1599
+ # cramervonmises_2samp has only one alternative, greater
1600
+ res = permutation_test((x, y), statistic1d, n_resamples=np.inf,
1601
+ alternative='greater', rng=self.rng)
1602
+
1603
+ assert_allclose(res.statistic, expected.statistic, rtol=self.rtol)
1604
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1605
+
1606
+ @pytest.mark.xslow()
1607
+ @pytest.mark.parametrize('axis', (-1, 2))
1608
+ def test_vectorized_nsamp_ptype_both(self, axis):
1609
+ # Test that permutation_test with permutation_type='independent' works
1610
+ # properly for a 3-sample statistic with nd array samples of different
1611
+ # (but compatible) shapes and ndims. Show that exact permutation test
1612
+ # and random permutation tests approximate SciPy's asymptotic pvalues
1613
+ # and that exact and random permutation test results are even closer
1614
+ # to one another (than they are to the asymptotic results).
1615
+
1616
+ # Three samples, different (but compatible) shapes with different ndims
1617
+ rng = np.random.default_rng(6709265303529651545)
1618
+ x = rng.random(size=(3))
1619
+ y = rng.random(size=(1, 3, 2))
1620
+ z = rng.random(size=(2, 1, 4))
1621
+ data = (x, y, z)
1622
+
1623
+ # Define the statistic (and pvalue for comparison)
1624
+ def statistic1d(*data):
1625
+ return stats.kruskal(*data).statistic
1626
+
1627
+ def pvalue1d(*data):
1628
+ return stats.kruskal(*data).pvalue
1629
+
1630
+ statistic = _resampling._vectorize_statistic(statistic1d)
1631
+ pvalue = _resampling._vectorize_statistic(pvalue1d)
1632
+
1633
+ # Calculate the expected results
1634
+ x2 = np.broadcast_to(x, (2, 3, 3)) # broadcast manually because
1635
+ y2 = np.broadcast_to(y, (2, 3, 2)) # _vectorize_statistic doesn't
1636
+ z2 = np.broadcast_to(z, (2, 3, 4))
1637
+ expected_statistic = statistic(x2, y2, z2, axis=axis)
1638
+ expected_pvalue = pvalue(x2, y2, z2, axis=axis)
1639
+
1640
+ # Calculate exact and randomized permutation results
1641
+ kwds = {'vectorized': False, 'axis': axis, 'alternative': 'greater',
1642
+ 'permutation_type': 'independent', 'rng': self.rng}
1643
+ res = permutation_test(data, statistic1d, n_resamples=np.inf, **kwds)
1644
+ res2 = permutation_test(data, statistic1d, n_resamples=1000, **kwds)
1645
+
1646
+ # Check results
1647
+ assert_allclose(res.statistic, expected_statistic, rtol=self.rtol)
1648
+ assert_allclose(res.statistic, res2.statistic, rtol=self.rtol)
1649
+ assert_allclose(res.pvalue, expected_pvalue, atol=6e-2)
1650
+ assert_allclose(res.pvalue, res2.pvalue, atol=3e-2)
1651
+
1652
+ # -- Paired-Sample Tests -- #
1653
+
1654
+ @pytest.mark.slow
1655
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
1656
+ def test_against_wilcoxon(self, alternative):
1657
+
1658
+ x = stats.uniform.rvs(size=(3, 6, 2), loc=0, random_state=self.rng)
1659
+ y = stats.uniform.rvs(size=(3, 6, 2), loc=0.05, random_state=self.rng)
1660
+
1661
+ # We'll check both 1- and 2-sample versions of the same test;
1662
+ # we expect identical results to wilcoxon in all cases.
1663
+ def statistic_1samp_1d(z):
1664
+ # 'less' ensures we get the same of two statistics every time
1665
+ return stats.wilcoxon(z, alternative='less').statistic
1666
+
1667
+ def statistic_2samp_1d(x, y):
1668
+ return stats.wilcoxon(x, y, alternative='less').statistic
1669
+
1670
+ def test_1d(x, y):
1671
+ return stats.wilcoxon(x, y, alternative=alternative)
1672
+
1673
+ test = _resampling._vectorize_statistic(test_1d)
1674
+
1675
+ expected = test(x, y, axis=1)
1676
+ expected_stat = expected[0]
1677
+ expected_p = expected[1]
1678
+
1679
+ kwds = {'vectorized': False, 'axis': 1, 'alternative': alternative,
1680
+ 'permutation_type': 'samples', 'rng': self.rng,
1681
+ 'n_resamples': np.inf}
1682
+ res1 = permutation_test((x-y,), statistic_1samp_1d, **kwds)
1683
+ res2 = permutation_test((x, y), statistic_2samp_1d, **kwds)
1684
+
1685
+ # `wilcoxon` returns a different statistic with 'two-sided'
1686
+ assert_allclose(res1.statistic, res2.statistic, rtol=self.rtol)
1687
+ if alternative != 'two-sided':
1688
+ assert_allclose(res2.statistic, expected_stat, rtol=self.rtol)
1689
+
1690
+ assert_allclose(res2.pvalue, expected_p, rtol=self.rtol)
1691
+ assert_allclose(res1.pvalue, res2.pvalue, rtol=self.rtol)
1692
+
1693
+ @pytest.mark.parametrize('alternative', ("less", "greater", "two-sided"))
1694
+ def test_against_binomtest(self, alternative):
1695
+
1696
+ x = self.rng.integers(0, 2, size=10)
1697
+ x[x == 0] = -1
1698
+ # More naturally, the test would flip elements between 0 and one.
1699
+ # However, permutation_test will flip the _signs_ of the elements.
1700
+ # So we have to work with +1/-1 instead of 1/0.
1701
+
1702
+ def statistic(x, axis=0):
1703
+ return np.sum(x > 0, axis=axis)
1704
+
1705
+ k, n, p = statistic(x), 10, 0.5
1706
+ expected = stats.binomtest(k, n, p, alternative=alternative)
1707
+
1708
+ res = stats.permutation_test((x,), statistic, vectorized=True,
1709
+ permutation_type='samples',
1710
+ n_resamples=np.inf, rng=self.rng,
1711
+ alternative=alternative)
1712
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1713
+
1714
+ # -- Exact Association Tests -- #
1715
+
1716
+ def test_against_kendalltau(self):
1717
+
1718
+ x = self.rng.normal(size=6)
1719
+ y = x + self.rng.normal(size=6)
1720
+
1721
+ expected = stats.kendalltau(x, y, method='exact')
1722
+
1723
+ def statistic1d(x):
1724
+ return stats.kendalltau(x, y, method='asymptotic').statistic
1725
+
1726
+ # kendalltau currently has only one alternative, two-sided
1727
+ res = permutation_test((x,), statistic1d, permutation_type='pairings',
1728
+ n_resamples=np.inf, rng=self.rng)
1729
+
1730
+ assert_allclose(res.statistic, expected.statistic, rtol=self.rtol)
1731
+ assert_allclose(res.pvalue, expected.pvalue, rtol=self.rtol)
1732
+
1733
+ @pytest.mark.parametrize('alternative', ('less', 'greater', 'two-sided'))
1734
+ def test_against_fisher_exact(self, alternative):
1735
+
1736
+ def statistic(x,):
1737
+ return np.sum((x == 1) & (y == 1))
1738
+
1739
+ # x and y are binary random variables with some dependence
1740
+ rng = np.random.default_rng(6235696159000529929)
1741
+ x = (rng.random(7) > 0.6).astype(float)
1742
+ y = (rng.random(7) + 0.25*x > 0.6).astype(float)
1743
+ tab = stats.contingency.crosstab(x, y)[1]
1744
+
1745
+ res = permutation_test((x,), statistic, permutation_type='pairings',
1746
+ n_resamples=np.inf, alternative=alternative,
1747
+ rng=rng)
1748
+ res2 = stats.fisher_exact(tab, alternative=alternative)
1749
+
1750
+ assert_allclose(res.pvalue, res2[1])
1751
+
1752
+ @pytest.mark.xslow()
1753
+ @pytest.mark.parametrize('axis', (-2, 1))
1754
+ def test_vectorized_nsamp_ptype_samples(self, axis):
1755
+ # Test that permutation_test with permutation_type='samples' works
1756
+ # properly for a 3-sample statistic with nd array samples of different
1757
+ # (but compatible) shapes and ndims. Show that exact permutation test
1758
+ # reproduces SciPy's exact pvalue and that random permutation test
1759
+ # approximates it.
1760
+
1761
+ x = self.rng.random(size=(2, 4, 3))
1762
+ y = self.rng.random(size=(1, 4, 3))
1763
+ z = self.rng.random(size=(2, 4, 1))
1764
+ x = stats.rankdata(x, axis=axis)
1765
+ y = stats.rankdata(y, axis=axis)
1766
+ z = stats.rankdata(z, axis=axis)
1767
+ y = y[0] # to check broadcast with different ndim
1768
+ data = (x, y, z)
1769
+
1770
+ def statistic1d(*data):
1771
+ return stats.page_trend_test(data, ranked=True,
1772
+ method='asymptotic').statistic
1773
+
1774
+ def pvalue1d(*data):
1775
+ return stats.page_trend_test(data, ranked=True,
1776
+ method='exact').pvalue
1777
+
1778
+ statistic = _resampling._vectorize_statistic(statistic1d)
1779
+ pvalue = _resampling._vectorize_statistic(pvalue1d)
1780
+
1781
+ expected_statistic = statistic(*np.broadcast_arrays(*data), axis=axis)
1782
+ expected_pvalue = pvalue(*np.broadcast_arrays(*data), axis=axis)
1783
+
1784
+ # Let's forgive this use of an integer seed, please.
1785
+ kwds = {'vectorized': False, 'axis': axis, 'alternative': 'greater',
1786
+ 'permutation_type': 'pairings', 'rng': 0}
1787
+ res = permutation_test(data, statistic1d, n_resamples=np.inf, **kwds)
1788
+ res2 = permutation_test(data, statistic1d, n_resamples=5000, **kwds)
1789
+
1790
+ assert_allclose(res.statistic, expected_statistic, rtol=self.rtol)
1791
+ assert_allclose(res.statistic, res2.statistic, rtol=self.rtol)
1792
+ assert_allclose(res.pvalue, expected_pvalue, rtol=self.rtol)
1793
+ assert_allclose(res.pvalue, res2.pvalue, atol=3e-2)
1794
+
1795
+ # -- Test Against External References -- #
1796
+
1797
+ tie_case_1 = {'x': [1, 2, 3, 4], 'y': [1.5, 2, 2.5],
1798
+ 'expected_less': 0.2000000000,
1799
+ 'expected_2sided': 0.4, # 2*expected_less
1800
+ 'expected_Pr_gte_S_mean': 0.3428571429, # see note below
1801
+ 'expected_statistic': 7.5,
1802
+ 'expected_avg': 9.142857, 'expected_std': 1.40698}
1803
+ tie_case_2 = {'x': [111, 107, 100, 99, 102, 106, 109, 108],
1804
+ 'y': [107, 108, 106, 98, 105, 103, 110, 105, 104],
1805
+ 'expected_less': 0.1555738379,
1806
+ 'expected_2sided': 0.3111476758,
1807
+ 'expected_Pr_gte_S_mean': 0.2969971205, # see note below
1808
+ 'expected_statistic': 32.5,
1809
+ 'expected_avg': 38.117647, 'expected_std': 5.172124}
1810
+
1811
+ @pytest.mark.xslow() # only the second case is slow, really
1812
+ @pytest.mark.parametrize('case', (tie_case_1, tie_case_2))
1813
+ def test_with_ties(self, case):
1814
+ """
1815
+ Results above from SAS PROC NPAR1WAY, e.g.
1816
+
1817
+ DATA myData;
1818
+ INPUT X Y;
1819
+ CARDS;
1820
+ 1 1
1821
+ 1 2
1822
+ 1 3
1823
+ 1 4
1824
+ 2 1.5
1825
+ 2 2
1826
+ 2 2.5
1827
+ ods graphics on;
1828
+ proc npar1way AB data=myData;
1829
+ class X;
1830
+ EXACT;
1831
+ run;
1832
+ ods graphics off;
1833
+
1834
+ Note: SAS provides Pr >= |S-Mean|, which is different from our
1835
+ definition of a two-sided p-value.
1836
+
1837
+ """
1838
+
1839
+ x = case['x']
1840
+ y = case['y']
1841
+
1842
+ expected_statistic = case['expected_statistic']
1843
+ expected_less = case['expected_less']
1844
+ expected_2sided = case['expected_2sided']
1845
+ expected_Pr_gte_S_mean = case['expected_Pr_gte_S_mean']
1846
+ expected_avg = case['expected_avg']
1847
+ expected_std = case['expected_std']
1848
+
1849
+ def statistic1d(x, y):
1850
+ return stats.ansari(x, y).statistic
1851
+
1852
+ with np.testing.suppress_warnings() as sup:
1853
+ sup.filter(UserWarning, "Ties preclude use of exact statistic")
1854
+ res = permutation_test((x, y), statistic1d, n_resamples=np.inf,
1855
+ alternative='less')
1856
+ res2 = permutation_test((x, y), statistic1d, n_resamples=np.inf,
1857
+ alternative='two-sided')
1858
+
1859
+ assert_allclose(res.statistic, expected_statistic, rtol=self.rtol)
1860
+ assert_allclose(res.pvalue, expected_less, atol=1e-10)
1861
+ assert_allclose(res2.pvalue, expected_2sided, atol=1e-10)
1862
+ assert_allclose(res2.null_distribution.mean(), expected_avg, rtol=1e-6)
1863
+ assert_allclose(res2.null_distribution.std(), expected_std, rtol=1e-6)
1864
+
1865
+ # SAS provides Pr >= |S-Mean|; might as well check against that, too
1866
+ S = res.statistic
1867
+ mean = res.null_distribution.mean()
1868
+ n = len(res.null_distribution)
1869
+ Pr_gte_S_mean = np.sum(np.abs(res.null_distribution-mean)
1870
+ >= np.abs(S-mean))/n
1871
+ assert_allclose(expected_Pr_gte_S_mean, Pr_gte_S_mean)
1872
+
1873
+ @pytest.mark.slow
1874
+ @pytest.mark.parametrize('alternative, expected_pvalue',
1875
+ (('less', 0.9708333333333),
1876
+ ('greater', 0.05138888888889),
1877
+ ('two-sided', 0.1027777777778)))
1878
+ def test_against_spearmanr_in_R(self, alternative, expected_pvalue):
1879
+ """
1880
+ Results above from R cor.test, e.g.
1881
+
1882
+ options(digits=16)
1883
+ x <- c(1.76405235, 0.40015721, 0.97873798,
1884
+ 2.2408932, 1.86755799, -0.97727788)
1885
+ y <- c(2.71414076, 0.2488, 0.87551913,
1886
+ 2.6514917, 2.01160156, 0.47699563)
1887
+ cor.test(x, y, method = "spearm", alternative = "t")
1888
+ """
1889
+ # data comes from
1890
+ # np.random.seed(0)
1891
+ # x = stats.norm.rvs(size=6)
1892
+ # y = x + stats.norm.rvs(size=6)
1893
+ x = [1.76405235, 0.40015721, 0.97873798,
1894
+ 2.2408932, 1.86755799, -0.97727788]
1895
+ y = [2.71414076, 0.2488, 0.87551913,
1896
+ 2.6514917, 2.01160156, 0.47699563]
1897
+ expected_statistic = 0.7714285714285715
1898
+
1899
+ def statistic1d(x):
1900
+ return stats.spearmanr(x, y).statistic
1901
+
1902
+ res = permutation_test((x,), statistic1d, permutation_type='pairings',
1903
+ n_resamples=np.inf, alternative=alternative)
1904
+
1905
+ assert_allclose(res.statistic, expected_statistic, rtol=self.rtol)
1906
+ assert_allclose(res.pvalue, expected_pvalue, atol=1e-13)
1907
+
1908
+ @pytest.mark.parametrize("batch", (-1, 0))
1909
+ def test_batch_generator_iv(self, batch):
1910
+ with pytest.raises(ValueError, match="`batch` must be positive."):
1911
+ list(_resampling._batch_generator([1, 2, 3], batch))
1912
+
1913
+ batch_generator_cases = [(range(0), 3, []),
1914
+ (range(6), 3, [[0, 1, 2], [3, 4, 5]]),
1915
+ (range(8), 3, [[0, 1, 2], [3, 4, 5], [6, 7]])]
1916
+
1917
+ @pytest.mark.parametrize("iterable, batch, expected",
1918
+ batch_generator_cases)
1919
+ def test_batch_generator(self, iterable, batch, expected):
1920
+ got = list(_resampling._batch_generator(iterable, batch))
1921
+ assert got == expected
1922
+
1923
+ @pytest.mark.fail_slow(2)
1924
+ def test_finite_precision_statistic(self):
1925
+ # Some statistics return numerically distinct values when the values
1926
+ # should be equal in theory. Test that `permutation_test` accounts
1927
+ # for this in some way.
1928
+ x = [1, 2, 4, 3]
1929
+ y = [2, 4, 6, 8]
1930
+
1931
+ def statistic(x, y):
1932
+ return stats.pearsonr(x, y)[0]
1933
+
1934
+ res = stats.permutation_test((x, y), statistic, vectorized=False,
1935
+ permutation_type='pairings')
1936
+ r, pvalue, null = res.statistic, res.pvalue, res.null_distribution
1937
+
1938
+ correct_p = 2 * np.sum(null >= r - 1e-14) / len(null)
1939
+ assert pvalue == correct_p == 1/3
1940
+ # Compare against other exact correlation tests using R corr.test
1941
+ # options(digits=16)
1942
+ # x = c(1, 2, 4, 3)
1943
+ # y = c(2, 4, 6, 8)
1944
+ # cor.test(x, y, alternative = "t", method = "spearman") # 0.333333333
1945
+ # cor.test(x, y, alternative = "t", method = "kendall") # 0.333333333
1946
+
1947
+
1948
+ def test_all_partitions_concatenated():
1949
+ # make sure that _all_paritions_concatenated produces the correct number
1950
+ # of partitions of the data into samples of the given sizes and that
1951
+ # all are unique
1952
+ n = np.array([3, 2, 4], dtype=int)
1953
+ nc = np.cumsum(n)
1954
+
1955
+ all_partitions = set()
1956
+ counter = 0
1957
+ for partition_concatenated in _resampling._all_partitions_concatenated(n):
1958
+ counter += 1
1959
+ partitioning = np.split(partition_concatenated, nc[:-1])
1960
+ all_partitions.add(tuple([frozenset(i) for i in partitioning]))
1961
+
1962
+ expected = np.prod([special.binom(sum(n[i:]), sum(n[i+1:]))
1963
+ for i in range(len(n)-1)])
1964
+
1965
+ assert_equal(counter, expected)
1966
+ assert_equal(len(all_partitions), expected)
1967
+
1968
+
1969
+ @pytest.mark.parametrize('fun_name',
1970
+ ['bootstrap', 'permutation_test', 'monte_carlo_test'])
1971
+ def test_parameter_vectorized(fun_name):
1972
+ # Check that parameter `vectorized` is working as desired for all
1973
+ # resampling functions. Results don't matter; just don't fail asserts.
1974
+ rng = np.random.default_rng(75245098234592)
1975
+ sample = rng.random(size=10)
1976
+
1977
+ def rvs(size): # needed by `monte_carlo_test`
1978
+ return stats.norm.rvs(size=size, random_state=rng)
1979
+
1980
+ fun_options = {'bootstrap': {'data': (sample,), 'rng': rng,
1981
+ 'method': 'percentile'},
1982
+ 'permutation_test': {'data': (sample,), 'rng': rng,
1983
+ 'permutation_type': 'samples'},
1984
+ 'monte_carlo_test': {'sample': sample, 'rvs': rvs}}
1985
+ common_options = {'n_resamples': 100}
1986
+
1987
+ fun = getattr(stats, fun_name)
1988
+ options = fun_options[fun_name]
1989
+ options.update(common_options)
1990
+
1991
+ def statistic(x, axis):
1992
+ assert x.ndim > 1 or np.array_equal(x, sample)
1993
+ return np.mean(x, axis=axis)
1994
+ fun(statistic=statistic, vectorized=None, **options)
1995
+ fun(statistic=statistic, vectorized=True, **options)
1996
+
1997
+ def statistic(x):
1998
+ assert x.ndim == 1
1999
+ return np.mean(x)
2000
+ fun(statistic=statistic, vectorized=None, **options)
2001
+ fun(statistic=statistic, vectorized=False, **options)
2002
+
2003
+
2004
+ class TestMonteCarloMethod:
2005
+ def test_rvs_and_random_state(self):
2006
+ message = "Use of `rvs` and `rng` are mutually exclusive."
2007
+ rng = np.random.default_rng(34982345)
2008
+ with pytest.raises(ValueError, match=message):
2009
+ stats.MonteCarloMethod(rvs=rng.random, rng=rng)
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_sampling.py ADDED
@@ -0,0 +1,1445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import threading
2
+ import pickle
3
+ import pytest
4
+ from copy import deepcopy
5
+ import platform
6
+ import sys
7
+ import math
8
+ import numpy as np
9
+ from numpy.testing import assert_allclose, assert_equal, suppress_warnings
10
+ from scipy.stats.sampling import (
11
+ TransformedDensityRejection,
12
+ DiscreteAliasUrn,
13
+ DiscreteGuideTable,
14
+ NumericalInversePolynomial,
15
+ NumericalInverseHermite,
16
+ RatioUniforms,
17
+ SimpleRatioUniforms,
18
+ UNURANError
19
+ )
20
+ from pytest import raises as assert_raises
21
+ from scipy import stats
22
+ from scipy import special
23
+ from scipy.stats import chisquare, cramervonmises
24
+ from scipy.stats._distr_params import distdiscrete, distcont
25
+ from scipy._lib._util import check_random_state
26
+
27
+
28
+ # common test data: this data can be shared between all the tests.
29
+
30
+
31
+ # Normal distribution shared between all the continuous methods
32
+ class StandardNormal:
33
+ def pdf(self, x):
34
+ # normalization constant needed for NumericalInverseHermite
35
+ return 1./np.sqrt(2.*np.pi) * np.exp(-0.5 * x*x)
36
+
37
+ def dpdf(self, x):
38
+ return 1./np.sqrt(2.*np.pi) * -x * np.exp(-0.5 * x*x)
39
+
40
+ def cdf(self, x):
41
+ return special.ndtr(x)
42
+
43
+
44
+ all_methods = [
45
+ ("TransformedDensityRejection", {"dist": StandardNormal()}),
46
+ ("DiscreteAliasUrn", {"dist": [0.02, 0.18, 0.8]}),
47
+ ("DiscreteGuideTable", {"dist": [0.02, 0.18, 0.8]}),
48
+ ("NumericalInversePolynomial", {"dist": StandardNormal()}),
49
+ ("NumericalInverseHermite", {"dist": StandardNormal()}),
50
+ ("SimpleRatioUniforms", {"dist": StandardNormal(), "mode": 0})
51
+ ]
52
+
53
+ if (sys.implementation.name == 'pypy'
54
+ and sys.implementation.version < (7, 3, 10)):
55
+ # changed in PyPy for v7.3.10
56
+ floaterr = r"unsupported operand type for float\(\): 'list'"
57
+ else:
58
+ floaterr = r"must be real number, not list"
59
+ # Make sure an internal error occurs in UNU.RAN when invalid callbacks are
60
+ # passed. Moreover, different generators throw different error messages.
61
+ # So, in case of an `UNURANError`, we do not validate the error message.
62
+ bad_pdfs_common = [
63
+ # Negative PDF
64
+ (lambda x: -x, UNURANError, r"..."),
65
+ # Returning wrong type
66
+ (lambda x: [], TypeError, floaterr),
67
+ # Undefined name inside the function
68
+ (lambda x: foo, NameError, r"name 'foo' is not defined"), # type: ignore[name-defined] # noqa: F821, E501
69
+ # Infinite value returned => Overflow error.
70
+ (lambda x: np.inf, UNURANError, r"..."),
71
+ # NaN value => internal error in UNU.RAN
72
+ (lambda x: np.nan, UNURANError, r"..."),
73
+ # signature of PDF wrong
74
+ (lambda: 1.0, TypeError, r"takes 0 positional arguments but 1 was given")
75
+ ]
76
+
77
+
78
+ # same approach for dpdf
79
+ bad_dpdf_common = [
80
+ # Infinite value returned.
81
+ (lambda x: np.inf, UNURANError, r"..."),
82
+ # NaN value => internal error in UNU.RAN
83
+ (lambda x: np.nan, UNURANError, r"..."),
84
+ # Returning wrong type
85
+ (lambda x: [], TypeError, floaterr),
86
+ # Undefined name inside the function
87
+ (lambda x: foo, NameError, r"name 'foo' is not defined"), # type: ignore[name-defined] # noqa: F821, E501
88
+ # signature of dPDF wrong
89
+ (lambda: 1.0, TypeError, r"takes 0 positional arguments but 1 was given")
90
+ ]
91
+
92
+
93
+ # same approach for logpdf
94
+ bad_logpdfs_common = [
95
+ # Returning wrong type
96
+ (lambda x: [], TypeError, floaterr),
97
+ # Undefined name inside the function
98
+ (lambda x: foo, NameError, r"name 'foo' is not defined"), # type: ignore[name-defined] # noqa: F821, E501
99
+ # Infinite value returned => Overflow error.
100
+ (lambda x: np.inf, UNURANError, r"..."),
101
+ # NaN value => internal error in UNU.RAN
102
+ (lambda x: np.nan, UNURANError, r"..."),
103
+ # signature of logpdf wrong
104
+ (lambda: 1.0, TypeError, r"takes 0 positional arguments but 1 was given")
105
+ ]
106
+
107
+
108
+ bad_pv_common = [
109
+ ([], r"must contain at least one element"),
110
+ ([[1.0, 0.0]], r"wrong number of dimensions \(expected 1, got 2\)"),
111
+ ([0.2, 0.4, np.nan, 0.8], r"must contain only finite / non-nan values"),
112
+ ([0.2, 0.4, np.inf, 0.8], r"must contain only finite / non-nan values"),
113
+ ([0.0, 0.0], r"must contain at least one non-zero value"),
114
+ ]
115
+
116
+
117
+ # size of the domains is incorrect
118
+ bad_sized_domains = [
119
+ # > 2 elements in the domain
120
+ ((1, 2, 3), ValueError, r"must be a length 2 tuple"),
121
+ # empty domain
122
+ ((), ValueError, r"must be a length 2 tuple")
123
+ ]
124
+
125
+ # domain values are incorrect
126
+ bad_domains = [
127
+ ((2, 1), UNURANError, r"left >= right"),
128
+ ((1, 1), UNURANError, r"left >= right"),
129
+ ]
130
+
131
+ # infinite and nan values present in domain.
132
+ inf_nan_domains = [
133
+ # left >= right
134
+ ((10, 10), UNURANError, r"left >= right"),
135
+ ((np.inf, np.inf), UNURANError, r"left >= right"),
136
+ ((-np.inf, -np.inf), UNURANError, r"left >= right"),
137
+ ((np.inf, -np.inf), UNURANError, r"left >= right"),
138
+ # Also include nans in some of the domains.
139
+ ((-np.inf, np.nan), ValueError, r"only non-nan values"),
140
+ ((np.nan, np.inf), ValueError, r"only non-nan values")
141
+ ]
142
+
143
+ # `nan` values present in domain. Some distributions don't support
144
+ # infinite tails, so don't mix the nan values with infinities.
145
+ nan_domains = [
146
+ ((0, np.nan), ValueError, r"only non-nan values"),
147
+ ((np.nan, np.nan), ValueError, r"only non-nan values")
148
+ ]
149
+
150
+
151
+ # all the methods should throw errors for nan, bad sized, and bad valued
152
+ # domains.
153
+ @pytest.mark.parametrize("domain, err, msg",
154
+ bad_domains + bad_sized_domains +
155
+ nan_domains) # type: ignore[operator]
156
+ @pytest.mark.parametrize("method, kwargs", all_methods)
157
+ def test_bad_domain(domain, err, msg, method, kwargs):
158
+ Method = getattr(stats.sampling, method)
159
+ with pytest.raises(err, match=msg):
160
+ Method(**kwargs, domain=domain)
161
+
162
+
163
+ @pytest.mark.parametrize("method, kwargs", all_methods)
164
+ def test_random_state(method, kwargs):
165
+ Method = getattr(stats.sampling, method)
166
+
167
+ # simple seed that works for any version of NumPy
168
+ seed = 123
169
+ rng1 = Method(**kwargs, random_state=seed)
170
+ rng2 = Method(**kwargs, random_state=seed)
171
+ assert_equal(rng1.rvs(100), rng2.rvs(100))
172
+
173
+ # global seed
174
+ np.random.seed(123)
175
+ rng1 = Method(**kwargs)
176
+ rvs1 = rng1.rvs(100)
177
+ np.random.seed(None)
178
+ rng2 = Method(**kwargs, random_state=123)
179
+ rvs2 = rng2.rvs(100)
180
+ assert_equal(rvs1, rvs2)
181
+
182
+ # Generator seed for new NumPy
183
+ # when a RandomState is given, it should take the bitgen_t
184
+ # member of the class and create a Generator instance.
185
+ seed1 = np.random.RandomState(np.random.MT19937(123))
186
+ seed2 = np.random.Generator(np.random.MT19937(123))
187
+ rng1 = Method(**kwargs, random_state=seed1)
188
+ rng2 = Method(**kwargs, random_state=seed2)
189
+ assert_equal(rng1.rvs(100), rng2.rvs(100))
190
+
191
+
192
+ def test_set_random_state():
193
+ rng1 = TransformedDensityRejection(StandardNormal(), random_state=123)
194
+ rng2 = TransformedDensityRejection(StandardNormal())
195
+ rng2.set_random_state(123)
196
+ assert_equal(rng1.rvs(100), rng2.rvs(100))
197
+ rng = TransformedDensityRejection(StandardNormal(), random_state=123)
198
+ rvs1 = rng.rvs(100)
199
+ rng.set_random_state(123)
200
+ rvs2 = rng.rvs(100)
201
+ assert_equal(rvs1, rvs2)
202
+
203
+
204
+ def test_threading_behaviour():
205
+ # Test if the API is thread-safe.
206
+ # This verifies if the lock mechanism and the use of `PyErr_Occurred`
207
+ # is correct.
208
+ errors = {"err1": None, "err2": None}
209
+
210
+ class Distribution:
211
+ def __init__(self, pdf_msg):
212
+ self.pdf_msg = pdf_msg
213
+
214
+ def pdf(self, x):
215
+ if 49.9 < x < 50.0:
216
+ raise ValueError(self.pdf_msg)
217
+ return x
218
+
219
+ def dpdf(self, x):
220
+ return 1
221
+
222
+ def func1():
223
+ dist = Distribution('foo')
224
+ rng = TransformedDensityRejection(dist, domain=(10, 100),
225
+ random_state=12)
226
+ try:
227
+ rng.rvs(100000)
228
+ except ValueError as e:
229
+ errors['err1'] = e.args[0]
230
+
231
+ def func2():
232
+ dist = Distribution('bar')
233
+ rng = TransformedDensityRejection(dist, domain=(10, 100),
234
+ random_state=2)
235
+ try:
236
+ rng.rvs(100000)
237
+ except ValueError as e:
238
+ errors['err2'] = e.args[0]
239
+
240
+ t1 = threading.Thread(target=func1)
241
+ t2 = threading.Thread(target=func2)
242
+
243
+ t1.start()
244
+ t2.start()
245
+
246
+ t1.join()
247
+ t2.join()
248
+
249
+ assert errors['err1'] == 'foo'
250
+ assert errors['err2'] == 'bar'
251
+
252
+
253
+ @pytest.mark.parametrize("method, kwargs", all_methods)
254
+ def test_pickle(method, kwargs):
255
+ Method = getattr(stats.sampling, method)
256
+ rng1 = Method(**kwargs, random_state=123)
257
+ obj = pickle.dumps(rng1)
258
+ rng2 = pickle.loads(obj)
259
+ assert_equal(rng1.rvs(100), rng2.rvs(100))
260
+
261
+
262
+ @pytest.mark.parametrize("size", [None, 0, (0, ), 1, (10, 3), (2, 3, 4, 5),
263
+ (0, 0), (0, 1)])
264
+ def test_rvs_size(size):
265
+ # As the `rvs` method is present in the base class and shared between
266
+ # all the classes, we can just test with one of the methods.
267
+ rng = TransformedDensityRejection(StandardNormal())
268
+ if size is None:
269
+ assert np.isscalar(rng.rvs(size))
270
+ else:
271
+ if np.isscalar(size):
272
+ size = (size, )
273
+ assert rng.rvs(size).shape == size
274
+
275
+
276
+ def test_with_scipy_distribution():
277
+ # test if the setup works with SciPy's rv_frozen distributions
278
+ dist = stats.norm()
279
+ urng = np.random.default_rng(0)
280
+ rng = NumericalInverseHermite(dist, random_state=urng)
281
+ u = np.linspace(0, 1, num=100)
282
+ check_cont_samples(rng, dist, dist.stats())
283
+ assert_allclose(dist.ppf(u), rng.ppf(u))
284
+ # test if it works with `loc` and `scale`
285
+ dist = stats.norm(loc=10., scale=5.)
286
+ rng = NumericalInverseHermite(dist, random_state=urng)
287
+ check_cont_samples(rng, dist, dist.stats())
288
+ assert_allclose(dist.ppf(u), rng.ppf(u))
289
+ # check for discrete distributions
290
+ dist = stats.binom(10, 0.2)
291
+ rng = DiscreteAliasUrn(dist, random_state=urng)
292
+ domain = dist.support()
293
+ pv = dist.pmf(np.arange(domain[0], domain[1]+1))
294
+ check_discr_samples(rng, pv, dist.stats())
295
+
296
+
297
+ def check_cont_samples(rng, dist, mv_ex, rtol=1e-7, atol=1e-1):
298
+ rvs = rng.rvs(100000)
299
+ mv = rvs.mean(), rvs.var()
300
+ # test the moments only if the variance is finite
301
+ if np.isfinite(mv_ex[1]):
302
+ assert_allclose(mv, mv_ex, rtol=rtol, atol=atol)
303
+ # Cramer Von Mises test for goodness-of-fit
304
+ rvs = rng.rvs(500)
305
+ dist.cdf = np.vectorize(dist.cdf)
306
+ pval = cramervonmises(rvs, dist.cdf).pvalue
307
+ assert pval > 0.1
308
+
309
+
310
+ def check_discr_samples(rng, pv, mv_ex, rtol=1e-3, atol=1e-1):
311
+ rvs = rng.rvs(100000)
312
+ # test if the first few moments match
313
+ mv = rvs.mean(), rvs.var()
314
+ assert_allclose(mv, mv_ex, rtol=rtol, atol=atol)
315
+ # normalize
316
+ pv = pv / pv.sum()
317
+ # chi-squared test for goodness-of-fit
318
+ obs_freqs = np.zeros_like(pv)
319
+ _, freqs = np.unique(rvs, return_counts=True)
320
+ freqs = freqs / freqs.sum()
321
+ obs_freqs[:freqs.size] = freqs
322
+ pval = chisquare(obs_freqs, pv).pvalue
323
+ assert pval > 0.1
324
+
325
+
326
+ def test_warning_center_not_in_domain():
327
+ # UNURAN will warn if the center provided or the one computed w/o the
328
+ # domain is outside of the domain
329
+ msg = "102 : center moved into domain of distribution"
330
+ with pytest.warns(RuntimeWarning, match=msg):
331
+ NumericalInversePolynomial(StandardNormal(), center=0, domain=(3, 5))
332
+ with pytest.warns(RuntimeWarning, match=msg):
333
+ NumericalInversePolynomial(StandardNormal(), domain=(3, 5))
334
+
335
+
336
+ @pytest.mark.parametrize('method', ["SimpleRatioUniforms",
337
+ "NumericalInversePolynomial",
338
+ "TransformedDensityRejection"])
339
+ def test_error_mode_not_in_domain(method):
340
+ # UNURAN raises an error if the mode is not in the domain
341
+ # the behavior is different compared to the case that center is not in the
342
+ # domain. mode is supposed to be the exact value, center can be an
343
+ # approximate value
344
+ Method = getattr(stats.sampling, method)
345
+ msg = "17 : mode not in domain"
346
+ with pytest.raises(UNURANError, match=msg):
347
+ Method(StandardNormal(), mode=0, domain=(3, 5))
348
+
349
+
350
+ @pytest.mark.parametrize('method', ["NumericalInverseHermite",
351
+ "NumericalInversePolynomial"])
352
+ class TestQRVS:
353
+ def test_input_validation(self, method):
354
+ match = "`qmc_engine` must be an instance of..."
355
+ with pytest.raises(ValueError, match=match):
356
+ Method = getattr(stats.sampling, method)
357
+ gen = Method(StandardNormal())
358
+ gen.qrvs(qmc_engine=0)
359
+
360
+ # issues with QMCEngines and old NumPy
361
+ Method = getattr(stats.sampling, method)
362
+ gen = Method(StandardNormal())
363
+
364
+ match = "`d` must be consistent with dimension of `qmc_engine`."
365
+ with pytest.raises(ValueError, match=match):
366
+ gen.qrvs(d=3, qmc_engine=stats.qmc.Halton(2))
367
+
368
+ qrngs = [None, stats.qmc.Sobol(1, seed=0), stats.qmc.Halton(3, seed=0)]
369
+ # `size=None` should not add anything to the shape, `size=1` should
370
+ sizes = [(None, tuple()), (1, (1,)), (4, (4,)),
371
+ ((4,), (4,)), ((2, 4), (2, 4))] # type: ignore
372
+ # Neither `d=None` nor `d=1` should add anything to the shape
373
+ ds = [(None, tuple()), (1, tuple()), (3, (3,))]
374
+
375
+ @pytest.mark.parametrize('qrng', qrngs)
376
+ @pytest.mark.parametrize('size_in, size_out', sizes)
377
+ @pytest.mark.parametrize('d_in, d_out', ds)
378
+ def test_QRVS_shape_consistency(self, qrng, size_in, size_out,
379
+ d_in, d_out, method):
380
+ w32 = sys.platform == "win32" and platform.architecture()[0] == "32bit"
381
+ if w32 and method == "NumericalInversePolynomial":
382
+ pytest.xfail("NumericalInversePolynomial.qrvs fails for Win "
383
+ "32-bit")
384
+
385
+ dist = StandardNormal()
386
+ Method = getattr(stats.sampling, method)
387
+ gen = Method(dist)
388
+
389
+ # If d and qrng.d are inconsistent, an error is raised
390
+ if d_in is not None and qrng is not None and qrng.d != d_in:
391
+ match = "`d` must be consistent with dimension of `qmc_engine`."
392
+ with pytest.raises(ValueError, match=match):
393
+ gen.qrvs(size_in, d=d_in, qmc_engine=qrng)
394
+ return
395
+
396
+ # Sometimes d is really determined by qrng
397
+ if d_in is None and qrng is not None and qrng.d != 1:
398
+ d_out = (qrng.d,)
399
+
400
+ shape_expected = size_out + d_out
401
+
402
+ qrng2 = deepcopy(qrng)
403
+ qrvs = gen.qrvs(size=size_in, d=d_in, qmc_engine=qrng)
404
+ if size_in is not None:
405
+ assert qrvs.shape == shape_expected
406
+
407
+ if qrng2 is not None:
408
+ uniform = qrng2.random(np.prod(size_in) or 1)
409
+ qrvs2 = stats.norm.ppf(uniform).reshape(shape_expected)
410
+ assert_allclose(qrvs, qrvs2, atol=1e-12)
411
+
412
+ def test_QRVS_size_tuple(self, method):
413
+ # QMCEngine samples are always of shape (n, d). When `size` is a tuple,
414
+ # we set `n = prod(size)` in the call to qmc_engine.random, transform
415
+ # the sample, and reshape it to the final dimensions. When we reshape,
416
+ # we need to be careful, because the _columns_ of the sample returned
417
+ # by a QMCEngine are "independent"-ish, but the elements within the
418
+ # columns are not. We need to make sure that this doesn't get mixed up
419
+ # by reshaping: qrvs[..., i] should remain "independent"-ish of
420
+ # qrvs[..., i+1], but the elements within qrvs[..., i] should be
421
+ # transformed from the same low-discrepancy sequence.
422
+
423
+ dist = StandardNormal()
424
+ Method = getattr(stats.sampling, method)
425
+ gen = Method(dist)
426
+
427
+ size = (3, 4)
428
+ d = 5
429
+ qrng = stats.qmc.Halton(d, seed=0)
430
+ qrng2 = stats.qmc.Halton(d, seed=0)
431
+
432
+ uniform = qrng2.random(np.prod(size))
433
+
434
+ qrvs = gen.qrvs(size=size, d=d, qmc_engine=qrng)
435
+ qrvs2 = stats.norm.ppf(uniform)
436
+
437
+ for i in range(d):
438
+ sample = qrvs[..., i]
439
+ sample2 = qrvs2[:, i].reshape(size)
440
+ assert_allclose(sample, sample2, atol=1e-12)
441
+
442
+
443
+ class TestTransformedDensityRejection:
444
+ # Simple Custom Distribution
445
+ class dist0:
446
+ def pdf(self, x):
447
+ return 3/4 * (1-x*x)
448
+
449
+ def dpdf(self, x):
450
+ return 3/4 * (-2*x)
451
+
452
+ def cdf(self, x):
453
+ return 3/4 * (x - x**3/3 + 2/3)
454
+
455
+ def support(self):
456
+ return -1, 1
457
+
458
+ # Standard Normal Distribution
459
+ class dist1:
460
+ def pdf(self, x):
461
+ return stats.norm._pdf(x / 0.1)
462
+
463
+ def dpdf(self, x):
464
+ return -x / 0.01 * stats.norm._pdf(x / 0.1)
465
+
466
+ def cdf(self, x):
467
+ return stats.norm._cdf(x / 0.1)
468
+
469
+ # pdf with piecewise linear function as transformed density
470
+ # with T = -1/sqrt with shift. Taken from UNU.RAN test suite
471
+ # (from file t_tdr_ps.c)
472
+ class dist2:
473
+ def __init__(self, shift):
474
+ self.shift = shift
475
+
476
+ def pdf(self, x):
477
+ x -= self.shift
478
+ y = 1. / (abs(x) + 1.)
479
+ return 0.5 * y * y
480
+
481
+ def dpdf(self, x):
482
+ x -= self.shift
483
+ y = 1. / (abs(x) + 1.)
484
+ y = y * y * y
485
+ return y if (x < 0.) else -y
486
+
487
+ def cdf(self, x):
488
+ x -= self.shift
489
+ if x <= 0.:
490
+ return 0.5 / (1. - x)
491
+ else:
492
+ return 1. - 0.5 / (1. + x)
493
+
494
+ dists = [dist0(), dist1(), dist2(0.), dist2(10000.)]
495
+
496
+ # exact mean and variance of the distributions in the list dists
497
+ mv0 = [0., 4./15.]
498
+ mv1 = [0., 0.01]
499
+ mv2 = [0., np.inf]
500
+ mv3 = [10000., np.inf]
501
+ mvs = [mv0, mv1, mv2, mv3]
502
+
503
+ @pytest.mark.parametrize("dist, mv_ex",
504
+ zip(dists, mvs))
505
+ def test_basic(self, dist, mv_ex):
506
+ with suppress_warnings() as sup:
507
+ # filter the warnings thrown by UNU.RAN
508
+ sup.filter(RuntimeWarning)
509
+ rng = TransformedDensityRejection(dist, random_state=42)
510
+ check_cont_samples(rng, dist, mv_ex)
511
+
512
+ # PDF 0 everywhere => bad construction points
513
+ bad_pdfs = [(lambda x: 0, UNURANError, r"50 : bad construction points.")]
514
+ bad_pdfs += bad_pdfs_common # type: ignore[arg-type]
515
+
516
+ @pytest.mark.parametrize("pdf, err, msg", bad_pdfs)
517
+ def test_bad_pdf(self, pdf, err, msg):
518
+ class dist:
519
+ pass
520
+ dist.pdf = pdf
521
+ dist.dpdf = lambda x: 1 # an arbitrary dPDF
522
+ with pytest.raises(err, match=msg):
523
+ TransformedDensityRejection(dist)
524
+
525
+ @pytest.mark.parametrize("dpdf, err, msg", bad_dpdf_common)
526
+ def test_bad_dpdf(self, dpdf, err, msg):
527
+ class dist:
528
+ pass
529
+ dist.pdf = lambda x: x
530
+ dist.dpdf = dpdf
531
+ with pytest.raises(err, match=msg):
532
+ TransformedDensityRejection(dist, domain=(1, 10))
533
+
534
+ # test domains with inf + nan in them. need to write a custom test for
535
+ # this because not all methods support infinite tails.
536
+ @pytest.mark.parametrize("domain, err, msg", inf_nan_domains)
537
+ def test_inf_nan_domains(self, domain, err, msg):
538
+ with pytest.raises(err, match=msg):
539
+ TransformedDensityRejection(StandardNormal(), domain=domain)
540
+
541
+ @pytest.mark.parametrize("construction_points", [-1, 0, 0.1])
542
+ def test_bad_construction_points_scalar(self, construction_points):
543
+ with pytest.raises(ValueError, match=r"`construction_points` must be "
544
+ r"a positive integer."):
545
+ TransformedDensityRejection(
546
+ StandardNormal(), construction_points=construction_points
547
+ )
548
+
549
+ def test_bad_construction_points_array(self):
550
+ # empty array
551
+ construction_points = []
552
+ with pytest.raises(ValueError, match=r"`construction_points` must "
553
+ r"either be a "
554
+ r"scalar or a non-empty array."):
555
+ TransformedDensityRejection(
556
+ StandardNormal(), construction_points=construction_points
557
+ )
558
+
559
+ # construction_points not monotonically increasing
560
+ construction_points = [1, 1, 1, 1, 1, 1]
561
+ with pytest.warns(RuntimeWarning, match=r"33 : starting points not "
562
+ r"strictly monotonically "
563
+ r"increasing"):
564
+ TransformedDensityRejection(
565
+ StandardNormal(), construction_points=construction_points
566
+ )
567
+
568
+ # construction_points containing nans
569
+ construction_points = [np.nan, np.nan, np.nan]
570
+ with pytest.raises(UNURANError, match=r"50 : bad construction "
571
+ r"points."):
572
+ TransformedDensityRejection(
573
+ StandardNormal(), construction_points=construction_points
574
+ )
575
+
576
+ # construction_points out of domain
577
+ construction_points = [-10, 10]
578
+ with pytest.warns(RuntimeWarning, match=r"50 : starting point out of "
579
+ r"domain"):
580
+ TransformedDensityRejection(
581
+ StandardNormal(), domain=(-3, 3),
582
+ construction_points=construction_points
583
+ )
584
+
585
+ @pytest.mark.parametrize("c", [-1., np.nan, np.inf, 0.1, 1.])
586
+ def test_bad_c(self, c):
587
+ msg = r"`c` must either be -0.5 or 0."
588
+ with pytest.raises(ValueError, match=msg):
589
+ TransformedDensityRejection(StandardNormal(), c=-1.)
590
+
591
+ u = [np.linspace(0, 1, num=1000), [], [[]], [np.nan],
592
+ [-np.inf, np.nan, np.inf], 0,
593
+ [[np.nan, 0.5, 0.1], [0.2, 0.4, np.inf], [-2, 3, 4]]]
594
+
595
+ @pytest.mark.parametrize("u", u)
596
+ def test_ppf_hat(self, u):
597
+ # Increase the `max_squeeze_hat_ratio` so the ppf_hat is more
598
+ # accurate.
599
+ rng = TransformedDensityRejection(StandardNormal(),
600
+ max_squeeze_hat_ratio=0.9999)
601
+ # Older versions of NumPy throw RuntimeWarnings for comparisons
602
+ # with nan.
603
+ with suppress_warnings() as sup:
604
+ sup.filter(RuntimeWarning, "invalid value encountered in greater")
605
+ sup.filter(RuntimeWarning, "invalid value encountered in "
606
+ "greater_equal")
607
+ sup.filter(RuntimeWarning, "invalid value encountered in less")
608
+ sup.filter(RuntimeWarning, "invalid value encountered in "
609
+ "less_equal")
610
+ res = rng.ppf_hat(u)
611
+ expected = stats.norm.ppf(u)
612
+ assert_allclose(res, expected, rtol=1e-3, atol=1e-5)
613
+ assert res.shape == expected.shape
614
+
615
+ def test_bad_dist(self):
616
+ # Empty distribution
617
+ class dist:
618
+ ...
619
+
620
+ msg = r"`pdf` required but not found."
621
+ with pytest.raises(ValueError, match=msg):
622
+ TransformedDensityRejection(dist)
623
+
624
+ # dPDF not present in dist
625
+ class dist:
626
+ pdf = lambda x: 1-x*x # noqa: E731
627
+
628
+ msg = r"`dpdf` required but not found."
629
+ with pytest.raises(ValueError, match=msg):
630
+ TransformedDensityRejection(dist)
631
+
632
+
633
+ class TestDiscreteAliasUrn:
634
+ # DAU fails on these probably because of large domains and small
635
+ # computation errors in PMF. Mean/SD match but chi-squared test fails.
636
+ basic_fail_dists = {
637
+ 'nchypergeom_fisher', # numerical errors on tails
638
+ 'nchypergeom_wallenius', # numerical errors on tails
639
+ 'randint' # fails on 32-bit ubuntu
640
+ }
641
+
642
+ @pytest.mark.parametrize("distname, params", distdiscrete)
643
+ def test_basic(self, distname, params):
644
+ if distname in self.basic_fail_dists:
645
+ msg = ("DAU fails on these probably because of large domains "
646
+ "and small computation errors in PMF.")
647
+ pytest.skip(msg)
648
+ if not isinstance(distname, str):
649
+ dist = distname
650
+ else:
651
+ dist = getattr(stats, distname)
652
+ dist = dist(*params)
653
+ domain = dist.support()
654
+ if not np.isfinite(domain[1] - domain[0]):
655
+ # DAU only works with finite domain. So, skip the distributions
656
+ # with infinite tails.
657
+ pytest.skip("DAU only works with a finite domain.")
658
+ k = np.arange(domain[0], domain[1]+1)
659
+ pv = dist.pmf(k)
660
+ mv_ex = dist.stats('mv')
661
+ rng = DiscreteAliasUrn(dist, random_state=42)
662
+ check_discr_samples(rng, pv, mv_ex)
663
+
664
+ # Can't use bad_pmf_common here as we evaluate PMF early on to avoid
665
+ # unhelpful errors from UNU.RAN.
666
+ bad_pmf = [
667
+ # inf returned
668
+ (lambda x: np.inf, ValueError,
669
+ r"must contain only finite / non-nan values"),
670
+ # nan returned
671
+ (lambda x: np.nan, ValueError,
672
+ r"must contain only finite / non-nan values"),
673
+ # all zeros
674
+ (lambda x: 0.0, ValueError,
675
+ r"must contain at least one non-zero value"),
676
+ # Undefined name inside the function
677
+ (lambda x: foo, NameError, # type: ignore[name-defined] # noqa: F821
678
+ r"name 'foo' is not defined"),
679
+ # Returning wrong type.
680
+ (lambda x: [], ValueError,
681
+ r"setting an array element with a sequence."),
682
+ # probabilities < 0
683
+ (lambda x: -x, UNURANError,
684
+ r"50 : probability < 0"),
685
+ # signature of PMF wrong
686
+ (lambda: 1.0, TypeError,
687
+ r"takes 0 positional arguments but 1 was given")
688
+ ]
689
+
690
+ @pytest.mark.parametrize("pmf, err, msg", bad_pmf)
691
+ def test_bad_pmf(self, pmf, err, msg):
692
+ class dist:
693
+ pass
694
+ dist.pmf = pmf
695
+ with pytest.raises(err, match=msg):
696
+ DiscreteAliasUrn(dist, domain=(1, 10))
697
+
698
+ @pytest.mark.parametrize("pv", [[0.18, 0.02, 0.8],
699
+ [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]])
700
+ def test_sampling_with_pv(self, pv):
701
+ pv = np.asarray(pv, dtype=np.float64)
702
+ rng = DiscreteAliasUrn(pv, random_state=123)
703
+ rng.rvs(100_000)
704
+ pv = pv / pv.sum()
705
+ variates = np.arange(0, len(pv))
706
+ # test if the first few moments match
707
+ m_expected = np.average(variates, weights=pv)
708
+ v_expected = np.average((variates - m_expected) ** 2, weights=pv)
709
+ mv_expected = m_expected, v_expected
710
+ check_discr_samples(rng, pv, mv_expected)
711
+
712
+ @pytest.mark.parametrize("pv, msg", bad_pv_common)
713
+ def test_bad_pv(self, pv, msg):
714
+ with pytest.raises(ValueError, match=msg):
715
+ DiscreteAliasUrn(pv)
716
+
717
+ # DAU doesn't support infinite tails. So, it should throw an error when
718
+ # inf is present in the domain.
719
+ inf_domain = [(-np.inf, np.inf), (np.inf, np.inf), (-np.inf, -np.inf),
720
+ (0, np.inf), (-np.inf, 0)]
721
+
722
+ @pytest.mark.parametrize("domain", inf_domain)
723
+ def test_inf_domain(self, domain):
724
+ with pytest.raises(ValueError, match=r"must be finite"):
725
+ DiscreteAliasUrn(stats.binom(10, 0.2), domain=domain)
726
+
727
+ def test_bad_urn_factor(self):
728
+ with pytest.warns(RuntimeWarning, match=r"relative urn size < 1."):
729
+ DiscreteAliasUrn([0.5, 0.5], urn_factor=-1)
730
+
731
+ def test_bad_args(self):
732
+ msg = (r"`domain` must be provided when the "
733
+ r"probability vector is not available.")
734
+
735
+ class dist:
736
+ def pmf(self, x):
737
+ return x
738
+
739
+ with pytest.raises(ValueError, match=msg):
740
+ DiscreteAliasUrn(dist)
741
+
742
+ def test_gh19359(self):
743
+ pv = special.softmax(np.ones((1533,)))
744
+ rng = DiscreteAliasUrn(pv, random_state=42)
745
+ # check the correctness
746
+ check_discr_samples(rng, pv, (1532 / 2, (1532**2 - 1) / 12),
747
+ rtol=5e-3)
748
+
749
+
750
+ class TestNumericalInversePolynomial:
751
+ # Simple Custom Distribution
752
+ class dist0:
753
+ def pdf(self, x):
754
+ return 3/4 * (1-x*x)
755
+
756
+ def cdf(self, x):
757
+ return 3/4 * (x - x**3/3 + 2/3)
758
+
759
+ def support(self):
760
+ return -1, 1
761
+
762
+ # Standard Normal Distribution
763
+ class dist1:
764
+ def pdf(self, x):
765
+ return stats.norm._pdf(x / 0.1)
766
+
767
+ def cdf(self, x):
768
+ return stats.norm._cdf(x / 0.1)
769
+
770
+ # Sin 2 distribution
771
+ # / 0.05 + 0.45*(1 +sin(2 Pi x)) if |x| <= 1
772
+ # f(x) = <
773
+ # \ 0 otherwise
774
+ # Taken from UNU.RAN test suite (from file t_pinv.c)
775
+ class dist2:
776
+ def pdf(self, x):
777
+ return 0.05 + 0.45 * (1 + np.sin(2*np.pi*x))
778
+
779
+ def cdf(self, x):
780
+ return (0.05*(x + 1) +
781
+ 0.9*(1. + 2.*np.pi*(1 + x) - np.cos(2.*np.pi*x)) /
782
+ (4.*np.pi))
783
+
784
+ def support(self):
785
+ return -1, 1
786
+
787
+ # Sin 10 distribution
788
+ # / 0.05 + 0.45*(1 +sin(2 Pi x)) if |x| <= 5
789
+ # f(x) = <
790
+ # \ 0 otherwise
791
+ # Taken from UNU.RAN test suite (from file t_pinv.c)
792
+ class dist3:
793
+ def pdf(self, x):
794
+ return 0.2 * (0.05 + 0.45 * (1 + np.sin(2*np.pi*x)))
795
+
796
+ def cdf(self, x):
797
+ return x/10. + 0.5 + 0.09/(2*np.pi) * (np.cos(10*np.pi) -
798
+ np.cos(2*np.pi*x))
799
+
800
+ def support(self):
801
+ return -5, 5
802
+
803
+ dists = [dist0(), dist1(), dist2(), dist3()]
804
+
805
+ # exact mean and variance of the distributions in the list dists
806
+ mv0 = [0., 4./15.]
807
+ mv1 = [0., 0.01]
808
+ mv2 = [-0.45/np.pi, 2/3*0.5 - 0.45**2/np.pi**2]
809
+ mv3 = [-0.45/np.pi, 0.2 * 250/3 * 0.5 - 0.45**2/np.pi**2]
810
+ mvs = [mv0, mv1, mv2, mv3]
811
+
812
+ @pytest.mark.parametrize("dist, mv_ex",
813
+ zip(dists, mvs))
814
+ def test_basic(self, dist, mv_ex):
815
+ rng = NumericalInversePolynomial(dist, random_state=42)
816
+ check_cont_samples(rng, dist, mv_ex)
817
+
818
+ @pytest.mark.xslow
819
+ @pytest.mark.parametrize("distname, params", distcont)
820
+ def test_basic_all_scipy_dists(self, distname, params):
821
+
822
+ very_slow_dists = ['anglit', 'gausshyper', 'kappa4',
823
+ 'ksone', 'kstwo', 'levy_l',
824
+ 'levy_stable', 'studentized_range',
825
+ 'trapezoid', 'triang', 'vonmises']
826
+ # for these distributions, some assertions fail due to minor
827
+ # numerical differences. They can be avoided either by changing
828
+ # the seed or by increasing the u_resolution.
829
+ fail_dists = ['chi2', 'fatiguelife', 'gibrat',
830
+ 'halfgennorm', 'lognorm', 'ncf',
831
+ 'ncx2', 'pareto', 't']
832
+ # for these distributions, skip the check for agreement between sample
833
+ # moments and true moments. We cannot expect them to pass due to the
834
+ # high variance of sample moments.
835
+ skip_sample_moment_check = ['rel_breitwigner']
836
+
837
+ if distname in very_slow_dists:
838
+ pytest.skip(f"PINV too slow for {distname}")
839
+ if distname in fail_dists:
840
+ pytest.skip(f"PINV fails for {distname}")
841
+ dist = (getattr(stats, distname)
842
+ if isinstance(distname, str)
843
+ else distname)
844
+ dist = dist(*params)
845
+ with suppress_warnings() as sup:
846
+ sup.filter(RuntimeWarning)
847
+ rng = NumericalInversePolynomial(dist, random_state=42)
848
+ if distname in skip_sample_moment_check:
849
+ return
850
+ check_cont_samples(rng, dist, [dist.mean(), dist.var()])
851
+
852
+ @pytest.mark.parametrize("pdf, err, msg", bad_pdfs_common)
853
+ def test_bad_pdf(self, pdf, err, msg):
854
+ class dist:
855
+ pass
856
+ dist.pdf = pdf
857
+ with pytest.raises(err, match=msg):
858
+ NumericalInversePolynomial(dist, domain=[0, 5])
859
+
860
+ @pytest.mark.parametrize("logpdf, err, msg", bad_logpdfs_common)
861
+ def test_bad_logpdf(self, logpdf, err, msg):
862
+ class dist:
863
+ pass
864
+ dist.logpdf = logpdf
865
+ with pytest.raises(err, match=msg):
866
+ NumericalInversePolynomial(dist, domain=[0, 5])
867
+
868
+ # test domains with inf + nan in them. need to write a custom test for
869
+ # this because not all methods support infinite tails.
870
+ @pytest.mark.parametrize("domain, err, msg", inf_nan_domains)
871
+ def test_inf_nan_domains(self, domain, err, msg):
872
+ with pytest.raises(err, match=msg):
873
+ NumericalInversePolynomial(StandardNormal(), domain=domain)
874
+
875
+ u = [
876
+ # test if quantile 0 and 1 return -inf and inf respectively and check
877
+ # the correctness of the PPF for equidistant points between 0 and 1.
878
+ np.linspace(0, 1, num=10000),
879
+ # test the PPF method for empty arrays
880
+ [], [[]],
881
+ # test if nans and infs return nan result.
882
+ [np.nan], [-np.inf, np.nan, np.inf],
883
+ # test if a scalar is returned for a scalar input.
884
+ 0,
885
+ # test for arrays with nans, values greater than 1 and less than 0,
886
+ # and some valid values.
887
+ [[np.nan, 0.5, 0.1], [0.2, 0.4, np.inf], [-2, 3, 4]]
888
+ ]
889
+
890
+ @pytest.mark.parametrize("u", u)
891
+ def test_ppf(self, u):
892
+ dist = StandardNormal()
893
+ rng = NumericalInversePolynomial(dist, u_resolution=1e-14)
894
+ # Older versions of NumPy throw RuntimeWarnings for comparisons
895
+ # with nan.
896
+ with suppress_warnings() as sup:
897
+ sup.filter(RuntimeWarning, "invalid value encountered in greater")
898
+ sup.filter(RuntimeWarning, "invalid value encountered in "
899
+ "greater_equal")
900
+ sup.filter(RuntimeWarning, "invalid value encountered in less")
901
+ sup.filter(RuntimeWarning, "invalid value encountered in "
902
+ "less_equal")
903
+ res = rng.ppf(u)
904
+ expected = stats.norm.ppf(u)
905
+ assert_allclose(res, expected, rtol=1e-11, atol=1e-11)
906
+ assert res.shape == expected.shape
907
+
908
+ x = [np.linspace(-10, 10, num=10000), [], [[]], [np.nan],
909
+ [-np.inf, np.nan, np.inf], 0,
910
+ [[np.nan, 0.5, 0.1], [0.2, 0.4, np.inf], [-np.inf, 3, 4]]]
911
+
912
+ @pytest.mark.parametrize("x", x)
913
+ def test_cdf(self, x):
914
+ dist = StandardNormal()
915
+ rng = NumericalInversePolynomial(dist, u_resolution=1e-14)
916
+ # Older versions of NumPy throw RuntimeWarnings for comparisons
917
+ # with nan.
918
+ with suppress_warnings() as sup:
919
+ sup.filter(RuntimeWarning, "invalid value encountered in greater")
920
+ sup.filter(RuntimeWarning, "invalid value encountered in "
921
+ "greater_equal")
922
+ sup.filter(RuntimeWarning, "invalid value encountered in less")
923
+ sup.filter(RuntimeWarning, "invalid value encountered in "
924
+ "less_equal")
925
+ res = rng.cdf(x)
926
+ expected = stats.norm.cdf(x)
927
+ assert_allclose(res, expected, rtol=1e-11, atol=1e-11)
928
+ assert res.shape == expected.shape
929
+
930
+ @pytest.mark.slow
931
+ def test_u_error(self):
932
+ dist = StandardNormal()
933
+ rng = NumericalInversePolynomial(dist, u_resolution=1e-10)
934
+ max_error, mae = rng.u_error()
935
+ assert max_error < 1e-10
936
+ assert mae <= max_error
937
+ rng = NumericalInversePolynomial(dist, u_resolution=1e-14)
938
+ max_error, mae = rng.u_error()
939
+ assert max_error < 1e-14
940
+ assert mae <= max_error
941
+
942
+ bad_orders = [1, 4.5, 20, np.inf, np.nan]
943
+ bad_u_resolution = [1e-20, 1e-1, np.inf, np.nan]
944
+
945
+ @pytest.mark.parametrize("order", bad_orders)
946
+ def test_bad_orders(self, order):
947
+ dist = StandardNormal()
948
+
949
+ msg = r"`order` must be an integer in the range \[3, 17\]."
950
+ with pytest.raises(ValueError, match=msg):
951
+ NumericalInversePolynomial(dist, order=order)
952
+
953
+ @pytest.mark.parametrize("u_resolution", bad_u_resolution)
954
+ def test_bad_u_resolution(self, u_resolution):
955
+ msg = r"`u_resolution` must be between 1e-15 and 1e-5."
956
+ with pytest.raises(ValueError, match=msg):
957
+ NumericalInversePolynomial(StandardNormal(),
958
+ u_resolution=u_resolution)
959
+
960
+ def test_bad_args(self):
961
+
962
+ class BadDist:
963
+ def cdf(self, x):
964
+ return stats.norm._cdf(x)
965
+
966
+ dist = BadDist()
967
+ msg = r"Either of the methods `pdf` or `logpdf` must be specified"
968
+ with pytest.raises(ValueError, match=msg):
969
+ rng = NumericalInversePolynomial(dist)
970
+
971
+ dist = StandardNormal()
972
+ rng = NumericalInversePolynomial(dist)
973
+ msg = r"`sample_size` must be greater than or equal to 1000."
974
+ with pytest.raises(ValueError, match=msg):
975
+ rng.u_error(10)
976
+
977
+ class Distribution:
978
+ def pdf(self, x):
979
+ return np.exp(-0.5 * x*x)
980
+
981
+ dist = Distribution()
982
+ rng = NumericalInversePolynomial(dist)
983
+ msg = r"Exact CDF required but not found."
984
+ with pytest.raises(ValueError, match=msg):
985
+ rng.u_error()
986
+
987
+ def test_logpdf_pdf_consistency(self):
988
+ # 1. check that PINV works with pdf and logpdf only
989
+ # 2. check that generated ppf is the same (up to a small tolerance)
990
+
991
+ class MyDist:
992
+ pass
993
+
994
+ # create generator from dist with only pdf
995
+ dist_pdf = MyDist()
996
+ dist_pdf.pdf = lambda x: math.exp(-x*x/2)
997
+ rng1 = NumericalInversePolynomial(dist_pdf)
998
+
999
+ # create dist with only logpdf
1000
+ dist_logpdf = MyDist()
1001
+ dist_logpdf.logpdf = lambda x: -x*x/2
1002
+ rng2 = NumericalInversePolynomial(dist_logpdf)
1003
+
1004
+ q = np.linspace(1e-5, 1-1e-5, num=100)
1005
+ assert_allclose(rng1.ppf(q), rng2.ppf(q))
1006
+
1007
+
1008
+ class TestNumericalInverseHermite:
1009
+ # / (1 +sin(2 Pi x))/2 if |x| <= 1
1010
+ # f(x) = <
1011
+ # \ 0 otherwise
1012
+ # Taken from UNU.RAN test suite (from file t_hinv.c)
1013
+ class dist0:
1014
+ def pdf(self, x):
1015
+ return 0.5*(1. + np.sin(2.*np.pi*x))
1016
+
1017
+ def dpdf(self, x):
1018
+ return np.pi*np.cos(2.*np.pi*x)
1019
+
1020
+ def cdf(self, x):
1021
+ return (1. + 2.*np.pi*(1 + x) - np.cos(2.*np.pi*x)) / (4.*np.pi)
1022
+
1023
+ def support(self):
1024
+ return -1, 1
1025
+
1026
+ # / Max(sin(2 Pi x)),0)Pi/2 if -1 < x <0.5
1027
+ # f(x) = <
1028
+ # \ 0 otherwise
1029
+ # Taken from UNU.RAN test suite (from file t_hinv.c)
1030
+ class dist1:
1031
+ def pdf(self, x):
1032
+ if (x <= -0.5):
1033
+ return np.sin((2. * np.pi) * x) * 0.5 * np.pi
1034
+ if (x < 0.):
1035
+ return 0.
1036
+ if (x <= 0.5):
1037
+ return np.sin((2. * np.pi) * x) * 0.5 * np.pi
1038
+
1039
+ def dpdf(self, x):
1040
+ if (x <= -0.5):
1041
+ return np.cos((2. * np.pi) * x) * np.pi * np.pi
1042
+ if (x < 0.):
1043
+ return 0.
1044
+ if (x <= 0.5):
1045
+ return np.cos((2. * np.pi) * x) * np.pi * np.pi
1046
+
1047
+ def cdf(self, x):
1048
+ if (x <= -0.5):
1049
+ return 0.25 * (1 - np.cos((2. * np.pi) * x))
1050
+ if (x < 0.):
1051
+ return 0.5
1052
+ if (x <= 0.5):
1053
+ return 0.75 - 0.25 * np.cos((2. * np.pi) * x)
1054
+
1055
+ def support(self):
1056
+ return -1, 0.5
1057
+
1058
+ dists = [dist0(), dist1()]
1059
+
1060
+ # exact mean and variance of the distributions in the list dists
1061
+ mv0 = [-1/(2*np.pi), 1/3 - 1/(4*np.pi*np.pi)]
1062
+ mv1 = [-1/4, 3/8-1/(2*np.pi*np.pi) - 1/16]
1063
+ mvs = [mv0, mv1]
1064
+
1065
+ @pytest.mark.parametrize("dist, mv_ex",
1066
+ zip(dists, mvs))
1067
+ @pytest.mark.parametrize("order", [3, 5])
1068
+ def test_basic(self, dist, mv_ex, order):
1069
+ rng = NumericalInverseHermite(dist, order=order, random_state=42)
1070
+ check_cont_samples(rng, dist, mv_ex)
1071
+
1072
+ # test domains with inf + nan in them. need to write a custom test for
1073
+ # this because not all methods support infinite tails.
1074
+ @pytest.mark.parametrize("domain, err, msg", inf_nan_domains)
1075
+ def test_inf_nan_domains(self, domain, err, msg):
1076
+ with pytest.raises(err, match=msg):
1077
+ NumericalInverseHermite(StandardNormal(), domain=domain)
1078
+
1079
+ def basic_test_all_scipy_dists(self, distname, shapes):
1080
+ slow_dists = {'ksone', 'kstwo', 'levy_stable', 'skewnorm'}
1081
+ fail_dists = {'beta', 'gausshyper', 'geninvgauss', 'ncf', 'nct',
1082
+ 'norminvgauss', 'genhyperbolic', 'studentized_range',
1083
+ 'vonmises', 'kappa4', 'invgauss', 'wald'}
1084
+
1085
+ if distname in slow_dists:
1086
+ pytest.skip("Distribution is too slow")
1087
+ if distname in fail_dists:
1088
+ # specific reasons documented in gh-13319
1089
+ # https://github.com/scipy/scipy/pull/13319#discussion_r626188955
1090
+ pytest.xfail("Fails - usually due to inaccurate CDF/PDF")
1091
+
1092
+ np.random.seed(0)
1093
+
1094
+ dist = getattr(stats, distname)(*shapes)
1095
+ fni = NumericalInverseHermite(dist)
1096
+
1097
+ x = np.random.rand(10)
1098
+ p_tol = np.max(np.abs(dist.ppf(x)-fni.ppf(x))/np.abs(dist.ppf(x)))
1099
+ u_tol = np.max(np.abs(dist.cdf(fni.ppf(x)) - x))
1100
+
1101
+ assert p_tol < 1e-8
1102
+ assert u_tol < 1e-12
1103
+
1104
+ @pytest.mark.filterwarnings('ignore::RuntimeWarning')
1105
+ @pytest.mark.xslow
1106
+ @pytest.mark.parametrize(("distname", "shapes"), distcont)
1107
+ def test_basic_all_scipy_dists(self, distname, shapes):
1108
+ # if distname == "truncnorm":
1109
+ # pytest.skip("Tested separately")
1110
+ self.basic_test_all_scipy_dists(distname, shapes)
1111
+
1112
+ @pytest.mark.fail_slow(5)
1113
+ @pytest.mark.filterwarnings('ignore::RuntimeWarning')
1114
+ def test_basic_truncnorm_gh17155(self):
1115
+ self.basic_test_all_scipy_dists("truncnorm", (0.1, 2))
1116
+
1117
+ def test_input_validation(self):
1118
+ match = r"`order` must be either 1, 3, or 5."
1119
+ with pytest.raises(ValueError, match=match):
1120
+ NumericalInverseHermite(StandardNormal(), order=2)
1121
+
1122
+ match = "`cdf` required but not found"
1123
+ with pytest.raises(ValueError, match=match):
1124
+ NumericalInverseHermite("norm")
1125
+
1126
+ match = "could not convert string to float"
1127
+ with pytest.raises(ValueError, match=match):
1128
+ NumericalInverseHermite(StandardNormal(),
1129
+ u_resolution='ekki')
1130
+
1131
+ rngs = [None, 0, np.random.RandomState(0)]
1132
+ rngs.append(np.random.default_rng(0)) # type: ignore
1133
+ sizes = [(None, tuple()), (8, (8,)), ((4, 5, 6), (4, 5, 6))]
1134
+
1135
+ @pytest.mark.parametrize('rng', rngs)
1136
+ @pytest.mark.parametrize('size_in, size_out', sizes)
1137
+ def test_RVS(self, rng, size_in, size_out):
1138
+ dist = StandardNormal()
1139
+ fni = NumericalInverseHermite(dist)
1140
+
1141
+ rng2 = deepcopy(rng)
1142
+ rvs = fni.rvs(size=size_in, random_state=rng)
1143
+ if size_in is not None:
1144
+ assert rvs.shape == size_out
1145
+
1146
+ if rng2 is not None:
1147
+ rng2 = check_random_state(rng2)
1148
+ uniform = rng2.uniform(size=size_in)
1149
+ rvs2 = stats.norm.ppf(uniform)
1150
+ assert_allclose(rvs, rvs2)
1151
+
1152
+ def test_inaccurate_CDF(self):
1153
+ # CDF function with inaccurate tail cannot be inverted; see gh-13319
1154
+ # https://github.com/scipy/scipy/pull/13319#discussion_r626188955
1155
+ shapes = (2.3098496451481823, 0.6268795430096368)
1156
+ match = ("98 : one or more intervals very short; possibly due to "
1157
+ "numerical problems with a pole or very flat tail")
1158
+
1159
+ # fails with default tol
1160
+ with pytest.warns(RuntimeWarning, match=match):
1161
+ NumericalInverseHermite(stats.beta(*shapes))
1162
+
1163
+ # no error with coarser tol
1164
+ NumericalInverseHermite(stats.beta(*shapes), u_resolution=1e-8)
1165
+
1166
+ def test_custom_distribution(self):
1167
+ dist1 = StandardNormal()
1168
+ fni1 = NumericalInverseHermite(dist1)
1169
+
1170
+ dist2 = stats.norm()
1171
+ fni2 = NumericalInverseHermite(dist2)
1172
+
1173
+ assert_allclose(fni1.rvs(random_state=0), fni2.rvs(random_state=0))
1174
+
1175
+ u = [
1176
+ # check the correctness of the PPF for equidistant points between
1177
+ # 0.02 and 0.98.
1178
+ np.linspace(0., 1., num=10000),
1179
+ # test the PPF method for empty arrays
1180
+ [], [[]],
1181
+ # test if nans and infs return nan result.
1182
+ [np.nan], [-np.inf, np.nan, np.inf],
1183
+ # test if a scalar is returned for a scalar input.
1184
+ 0,
1185
+ # test for arrays with nans, values greater than 1 and less than 0,
1186
+ # and some valid values.
1187
+ [[np.nan, 0.5, 0.1], [0.2, 0.4, np.inf], [-2, 3, 4]]
1188
+ ]
1189
+
1190
+ @pytest.mark.parametrize("u", u)
1191
+ def test_ppf(self, u):
1192
+ dist = StandardNormal()
1193
+ rng = NumericalInverseHermite(dist, u_resolution=1e-12)
1194
+ # Older versions of NumPy throw RuntimeWarnings for comparisons
1195
+ # with nan.
1196
+ with suppress_warnings() as sup:
1197
+ sup.filter(RuntimeWarning, "invalid value encountered in greater")
1198
+ sup.filter(RuntimeWarning, "invalid value encountered in "
1199
+ "greater_equal")
1200
+ sup.filter(RuntimeWarning, "invalid value encountered in less")
1201
+ sup.filter(RuntimeWarning, "invalid value encountered in "
1202
+ "less_equal")
1203
+ res = rng.ppf(u)
1204
+ expected = stats.norm.ppf(u)
1205
+ assert_allclose(res, expected, rtol=1e-9, atol=3e-10)
1206
+ assert res.shape == expected.shape
1207
+
1208
+ @pytest.mark.slow
1209
+ def test_u_error(self):
1210
+ dist = StandardNormal()
1211
+ rng = NumericalInverseHermite(dist, u_resolution=1e-10)
1212
+ max_error, mae = rng.u_error()
1213
+ assert max_error < 1e-10
1214
+ assert mae <= max_error
1215
+ with suppress_warnings() as sup:
1216
+ # ignore warning about u-resolution being too small.
1217
+ sup.filter(RuntimeWarning)
1218
+ rng = NumericalInverseHermite(dist, u_resolution=1e-14)
1219
+ max_error, mae = rng.u_error()
1220
+ assert max_error < 1e-14
1221
+ assert mae <= max_error
1222
+
1223
+
1224
+ class TestDiscreteGuideTable:
1225
+ basic_fail_dists = {
1226
+ 'nchypergeom_fisher', # numerical errors on tails
1227
+ 'nchypergeom_wallenius', # numerical errors on tails
1228
+ 'randint' # fails on 32-bit ubuntu
1229
+ }
1230
+
1231
+ def test_guide_factor_gt3_raises_warning(self):
1232
+ pv = [0.1, 0.3, 0.6]
1233
+ urng = np.random.default_rng()
1234
+ with pytest.warns(RuntimeWarning):
1235
+ DiscreteGuideTable(pv, random_state=urng, guide_factor=7)
1236
+
1237
+ def test_guide_factor_zero_raises_warning(self):
1238
+ pv = [0.1, 0.3, 0.6]
1239
+ urng = np.random.default_rng()
1240
+ with pytest.warns(RuntimeWarning):
1241
+ DiscreteGuideTable(pv, random_state=urng, guide_factor=0)
1242
+
1243
+ def test_negative_guide_factor_raises_warning(self):
1244
+ # This occurs from the UNU.RAN wrapper automatically.
1245
+ # however it already gives a useful warning
1246
+ # Here we just test that a warning is raised.
1247
+ pv = [0.1, 0.3, 0.6]
1248
+ urng = np.random.default_rng()
1249
+ with pytest.warns(RuntimeWarning):
1250
+ DiscreteGuideTable(pv, random_state=urng, guide_factor=-1)
1251
+
1252
+ @pytest.mark.parametrize("distname, params", distdiscrete)
1253
+ def test_basic(self, distname, params):
1254
+ if distname in self.basic_fail_dists:
1255
+ msg = ("DGT fails on these probably because of large domains "
1256
+ "and small computation errors in PMF.")
1257
+ pytest.skip(msg)
1258
+
1259
+ if not isinstance(distname, str):
1260
+ dist = distname
1261
+ else:
1262
+ dist = getattr(stats, distname)
1263
+
1264
+ dist = dist(*params)
1265
+ domain = dist.support()
1266
+
1267
+ if not np.isfinite(domain[1] - domain[0]):
1268
+ # DGT only works with finite domain. So, skip the distributions
1269
+ # with infinite tails.
1270
+ pytest.skip("DGT only works with a finite domain.")
1271
+
1272
+ k = np.arange(domain[0], domain[1]+1)
1273
+ pv = dist.pmf(k)
1274
+ mv_ex = dist.stats('mv')
1275
+ rng = DiscreteGuideTable(dist, random_state=42)
1276
+ check_discr_samples(rng, pv, mv_ex)
1277
+
1278
+ u = [
1279
+ # the correctness of the PPF for equidistant points between 0 and 1.
1280
+ np.linspace(0, 1, num=10000),
1281
+ # test the PPF method for empty arrays
1282
+ [], [[]],
1283
+ # test if nans and infs return nan result.
1284
+ [np.nan], [-np.inf, np.nan, np.inf],
1285
+ # test if a scalar is returned for a scalar input.
1286
+ 0,
1287
+ # test for arrays with nans, values greater than 1 and less than 0,
1288
+ # and some valid values.
1289
+ [[np.nan, 0.5, 0.1], [0.2, 0.4, np.inf], [-2, 3, 4]]
1290
+ ]
1291
+
1292
+ @pytest.mark.parametrize('u', u)
1293
+ def test_ppf(self, u):
1294
+ n, p = 4, 0.1
1295
+ dist = stats.binom(n, p)
1296
+ rng = DiscreteGuideTable(dist, random_state=42)
1297
+
1298
+ # Older versions of NumPy throw RuntimeWarnings for comparisons
1299
+ # with nan.
1300
+ with suppress_warnings() as sup:
1301
+ sup.filter(RuntimeWarning, "invalid value encountered in greater")
1302
+ sup.filter(RuntimeWarning, "invalid value encountered in "
1303
+ "greater_equal")
1304
+ sup.filter(RuntimeWarning, "invalid value encountered in less")
1305
+ sup.filter(RuntimeWarning, "invalid value encountered in "
1306
+ "less_equal")
1307
+
1308
+ res = rng.ppf(u)
1309
+ expected = stats.binom.ppf(u, n, p)
1310
+ assert_equal(res.shape, expected.shape)
1311
+ assert_equal(res, expected)
1312
+
1313
+ @pytest.mark.parametrize("pv, msg", bad_pv_common)
1314
+ def test_bad_pv(self, pv, msg):
1315
+ with pytest.raises(ValueError, match=msg):
1316
+ DiscreteGuideTable(pv)
1317
+
1318
+ # DGT doesn't support infinite tails. So, it should throw an error when
1319
+ # inf is present in the domain.
1320
+ inf_domain = [(-np.inf, np.inf), (np.inf, np.inf), (-np.inf, -np.inf),
1321
+ (0, np.inf), (-np.inf, 0)]
1322
+
1323
+ @pytest.mark.parametrize("domain", inf_domain)
1324
+ def test_inf_domain(self, domain):
1325
+ with pytest.raises(ValueError, match=r"must be finite"):
1326
+ DiscreteGuideTable(stats.binom(10, 0.2), domain=domain)
1327
+
1328
+
1329
+ class TestSimpleRatioUniforms:
1330
+ # pdf with piecewise linear function as transformed density
1331
+ # with T = -1/sqrt with shift. Taken from UNU.RAN test suite
1332
+ # (from file t_srou.c)
1333
+ class dist:
1334
+ def __init__(self, shift):
1335
+ self.shift = shift
1336
+ self.mode = shift
1337
+
1338
+ def pdf(self, x):
1339
+ x -= self.shift
1340
+ y = 1. / (abs(x) + 1.)
1341
+ return 0.5 * y * y
1342
+
1343
+ def cdf(self, x):
1344
+ x -= self.shift
1345
+ if x <= 0.:
1346
+ return 0.5 / (1. - x)
1347
+ else:
1348
+ return 1. - 0.5 / (1. + x)
1349
+
1350
+ dists = [dist(0.), dist(10000.)]
1351
+
1352
+ # exact mean and variance of the distributions in the list dists
1353
+ mv1 = [0., np.inf]
1354
+ mv2 = [10000., np.inf]
1355
+ mvs = [mv1, mv2]
1356
+
1357
+ @pytest.mark.parametrize("dist, mv_ex",
1358
+ zip(dists, mvs))
1359
+ def test_basic(self, dist, mv_ex):
1360
+ rng = SimpleRatioUniforms(dist, mode=dist.mode, random_state=42)
1361
+ check_cont_samples(rng, dist, mv_ex)
1362
+ rng = SimpleRatioUniforms(dist, mode=dist.mode,
1363
+ cdf_at_mode=dist.cdf(dist.mode),
1364
+ random_state=42)
1365
+ check_cont_samples(rng, dist, mv_ex)
1366
+
1367
+ # test domains with inf + nan in them. need to write a custom test for
1368
+ # this because not all methods support infinite tails.
1369
+ @pytest.mark.parametrize("domain, err, msg", inf_nan_domains)
1370
+ def test_inf_nan_domains(self, domain, err, msg):
1371
+ with pytest.raises(err, match=msg):
1372
+ SimpleRatioUniforms(StandardNormal(), domain=domain)
1373
+
1374
+ def test_bad_args(self):
1375
+ # pdf_area < 0
1376
+ with pytest.raises(ValueError, match=r"`pdf_area` must be > 0"):
1377
+ SimpleRatioUniforms(StandardNormal(), mode=0, pdf_area=-1)
1378
+
1379
+
1380
+ class TestRatioUniforms:
1381
+ def test_rv_generation(self):
1382
+ # use KS test to check distribution of rvs
1383
+ # normal distribution
1384
+ f = stats.norm.pdf
1385
+ v = np.sqrt(f(np.sqrt(2))) * np.sqrt(2)
1386
+ u = np.sqrt(f(0))
1387
+ gen = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=12345)
1388
+ assert_equal(stats.kstest(gen.rvs(2500), 'norm')[1] > 0.25, True)
1389
+
1390
+ # exponential distribution
1391
+ gen = RatioUniforms(lambda x: np.exp(-x), umax=1,
1392
+ vmin=0, vmax=2*np.exp(-1), random_state=12345)
1393
+ assert_equal(stats.kstest(gen.rvs(1000), 'expon')[1] > 0.25, True)
1394
+
1395
+ def test_shape(self):
1396
+ # test shape of return value depending on size parameter
1397
+ f = stats.norm.pdf
1398
+ v = np.sqrt(f(np.sqrt(2))) * np.sqrt(2)
1399
+ u = np.sqrt(f(0))
1400
+
1401
+ gen1 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1402
+ gen2 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1403
+ gen3 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1404
+ r1, r2, r3 = gen1.rvs(3), gen2.rvs((3,)), gen3.rvs((3, 1))
1405
+ assert_equal(r1, r2)
1406
+ assert_equal(r2, r3.flatten())
1407
+ assert_equal(r1.shape, (3,))
1408
+ assert_equal(r3.shape, (3, 1))
1409
+
1410
+ gen4 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=12)
1411
+ gen5 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=12)
1412
+ r4, r5 = gen4.rvs(size=(3, 3, 3)), gen5.rvs(size=27)
1413
+ assert_equal(r4.flatten(), r5)
1414
+ assert_equal(r4.shape, (3, 3, 3))
1415
+
1416
+ gen6 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1417
+ gen7 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1418
+ gen8 = RatioUniforms(f, umax=u, vmin=-v, vmax=v, random_state=1234)
1419
+ r6, r7, r8 = gen6.rvs(), gen7.rvs(1), gen8.rvs((1,))
1420
+ assert_equal(r6, r7)
1421
+ assert_equal(r7, r8)
1422
+
1423
+ def test_random_state(self):
1424
+ f = stats.norm.pdf
1425
+ v = np.sqrt(f(np.sqrt(2))) * np.sqrt(2)
1426
+ umax = np.sqrt(f(0))
1427
+ gen1 = RatioUniforms(f, umax=umax, vmin=-v, vmax=v, random_state=1234)
1428
+ r1 = gen1.rvs(10)
1429
+ np.random.seed(1234)
1430
+ gen2 = RatioUniforms(f, umax=umax, vmin=-v, vmax=v)
1431
+ r2 = gen2.rvs(10)
1432
+ assert_equal(r1, r2)
1433
+
1434
+ def test_exceptions(self):
1435
+ f = stats.norm.pdf
1436
+ # need vmin < vmax
1437
+ with assert_raises(ValueError, match="vmin must be smaller than vmax"):
1438
+ RatioUniforms(pdf=f, umax=1, vmin=3, vmax=1)
1439
+ with assert_raises(ValueError, match="vmin must be smaller than vmax"):
1440
+ RatioUniforms(pdf=f, umax=1, vmin=1, vmax=1)
1441
+ # need umax > 0
1442
+ with assert_raises(ValueError, match="umax must be positive"):
1443
+ RatioUniforms(pdf=f, umax=-1, vmin=1, vmax=3)
1444
+ with assert_raises(ValueError, match="umax must be positive"):
1445
+ RatioUniforms(pdf=f, umax=0, vmin=1, vmax=3)
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_sensitivity_analysis.py ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from numpy.testing import assert_allclose, assert_array_less
3
+ import pytest
4
+
5
+ from scipy import stats
6
+ from scipy.stats import sobol_indices
7
+ from scipy.stats._resampling import BootstrapResult
8
+ from scipy.stats._sensitivity_analysis import (
9
+ BootstrapSobolResult, f_ishigami, sample_AB, sample_A_B
10
+ )
11
+
12
+
13
+ @pytest.fixture(scope='session')
14
+ def ishigami_ref_indices():
15
+ """Reference values for Ishigami from Saltelli2007.
16
+
17
+ Chapter 4, exercise 5 pages 179-182.
18
+ """
19
+ a = 7.
20
+ b = 0.1
21
+
22
+ var = 0.5 + a**2/8 + b*np.pi**4/5 + b**2*np.pi**8/18
23
+ v1 = 0.5 + b*np.pi**4/5 + b**2*np.pi**8/50
24
+ v2 = a**2/8
25
+ v3 = 0
26
+ v12 = 0
27
+ # v13: mistake in the book, see other derivations e.g. in 10.1002/nme.4856
28
+ v13 = b**2*np.pi**8*8/225
29
+ v23 = 0
30
+
31
+ s_first = np.array([v1, v2, v3])/var
32
+ s_second = np.array([
33
+ [0., 0., v13],
34
+ [v12, 0., v23],
35
+ [v13, v23, 0.]
36
+ ])/var
37
+ s_total = s_first + s_second.sum(axis=1)
38
+
39
+ return s_first, s_total
40
+
41
+
42
+ def f_ishigami_vec(x):
43
+ """Output of shape (2, n)."""
44
+ res = f_ishigami(x)
45
+ return res, res
46
+
47
+
48
+ class TestSobolIndices:
49
+
50
+ dists = [
51
+ stats.uniform(loc=-np.pi, scale=2*np.pi) # type: ignore[attr-defined]
52
+ ] * 3
53
+
54
+ def test_sample_AB(self):
55
+ # (d, n)
56
+ A = np.array(
57
+ [[1, 4, 7, 10],
58
+ [2, 5, 8, 11],
59
+ [3, 6, 9, 12]]
60
+ )
61
+ B = A + 100
62
+ # (d, d, n)
63
+ ref = np.array(
64
+ [[[101, 104, 107, 110],
65
+ [2, 5, 8, 11],
66
+ [3, 6, 9, 12]],
67
+ [[1, 4, 7, 10],
68
+ [102, 105, 108, 111],
69
+ [3, 6, 9, 12]],
70
+ [[1, 4, 7, 10],
71
+ [2, 5, 8, 11],
72
+ [103, 106, 109, 112]]]
73
+ )
74
+ AB = sample_AB(A=A, B=B)
75
+ assert_allclose(AB, ref)
76
+
77
+ @pytest.mark.xslow
78
+ @pytest.mark.xfail_on_32bit("Can't create large array for test")
79
+ @pytest.mark.parametrize(
80
+ 'func',
81
+ [f_ishigami, pytest.param(f_ishigami_vec, marks=pytest.mark.slow)],
82
+ ids=['scalar', 'vector']
83
+ )
84
+ def test_ishigami(self, ishigami_ref_indices, func):
85
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
86
+ res = sobol_indices(
87
+ func=func, n=4096,
88
+ dists=self.dists,
89
+ rng=rng
90
+ )
91
+
92
+ if func.__name__ == 'f_ishigami_vec':
93
+ ishigami_ref_indices = [
94
+ [ishigami_ref_indices[0], ishigami_ref_indices[0]],
95
+ [ishigami_ref_indices[1], ishigami_ref_indices[1]]
96
+ ]
97
+
98
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-2)
99
+ assert_allclose(res.total_order, ishigami_ref_indices[1], atol=1e-2)
100
+
101
+ assert res._bootstrap_result is None
102
+ bootstrap_res = res.bootstrap(n_resamples=99)
103
+ assert isinstance(bootstrap_res, BootstrapSobolResult)
104
+ assert isinstance(res._bootstrap_result, BootstrapResult)
105
+
106
+ assert res._bootstrap_result.confidence_interval.low.shape[0] == 2
107
+ assert res._bootstrap_result.confidence_interval.low[1].shape \
108
+ == res.first_order.shape
109
+
110
+ assert bootstrap_res.first_order.confidence_interval.low.shape \
111
+ == res.first_order.shape
112
+ assert bootstrap_res.total_order.confidence_interval.low.shape \
113
+ == res.total_order.shape
114
+
115
+ assert_array_less(
116
+ bootstrap_res.first_order.confidence_interval.low, res.first_order
117
+ )
118
+ assert_array_less(
119
+ res.first_order, bootstrap_res.first_order.confidence_interval.high
120
+ )
121
+ assert_array_less(
122
+ bootstrap_res.total_order.confidence_interval.low, res.total_order
123
+ )
124
+ assert_array_less(
125
+ res.total_order, bootstrap_res.total_order.confidence_interval.high
126
+ )
127
+
128
+ # call again to use previous results and change a param
129
+ assert isinstance(
130
+ res.bootstrap(confidence_level=0.9, n_resamples=99),
131
+ BootstrapSobolResult
132
+ )
133
+ assert isinstance(res._bootstrap_result, BootstrapResult)
134
+
135
+ def test_func_dict(self, ishigami_ref_indices):
136
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
137
+ n = 4096
138
+ dists = [
139
+ stats.uniform(loc=-np.pi, scale=2*np.pi),
140
+ stats.uniform(loc=-np.pi, scale=2*np.pi),
141
+ stats.uniform(loc=-np.pi, scale=2*np.pi)
142
+ ]
143
+
144
+ A, B = sample_A_B(n=n, dists=dists, rng=rng)
145
+ AB = sample_AB(A=A, B=B)
146
+
147
+ func = {
148
+ 'f_A': f_ishigami(A).reshape(1, -1),
149
+ 'f_B': f_ishigami(B).reshape(1, -1),
150
+ 'f_AB': f_ishigami(AB).reshape((3, 1, -1))
151
+ }
152
+
153
+ # preserve use of old random_state during SPEC 7 transition
154
+ res = sobol_indices(
155
+ func=func, n=n,
156
+ dists=dists,
157
+ rng=rng
158
+ )
159
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-2)
160
+
161
+ res = sobol_indices(
162
+ func=func, n=n,
163
+ rng=rng
164
+ )
165
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-2)
166
+ # Ideally should be exactly equal but since f_ishigami
167
+ # uses floating point operations, so exact equality
168
+ # might not be possible (due to flakiness in computation).
169
+ # So, assert_allclose is used with default parameters
170
+ # Regression test for https://github.com/scipy/scipy/issues/21383
171
+ assert_allclose(f_ishigami(A).reshape(1, -1), func['f_A'])
172
+ assert_allclose(f_ishigami(B).reshape(1, -1), func['f_B'])
173
+ assert_allclose(f_ishigami(AB).reshape((3, 1, -1)), func['f_AB'])
174
+
175
+ def test_method(self, ishigami_ref_indices):
176
+ def jansen_sobol(f_A, f_B, f_AB):
177
+ """Jansen for S and Sobol' for St.
178
+
179
+ From Saltelli2010, table 2 formulations (c) and (e)."""
180
+ var = np.var([f_A, f_B], axis=(0, -1))
181
+
182
+ s = (var - 0.5*np.mean((f_B - f_AB)**2, axis=-1)) / var
183
+ st = np.mean(f_A*(f_A - f_AB), axis=-1) / var
184
+
185
+ return s.T, st.T
186
+
187
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
188
+ res = sobol_indices(
189
+ func=f_ishigami, n=4096,
190
+ dists=self.dists,
191
+ method=jansen_sobol,
192
+ rng=rng
193
+ )
194
+
195
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-2)
196
+ assert_allclose(res.total_order, ishigami_ref_indices[1], atol=1e-2)
197
+
198
+ def jansen_sobol_typed(
199
+ f_A: np.ndarray, f_B: np.ndarray, f_AB: np.ndarray
200
+ ) -> tuple[np.ndarray, np.ndarray]:
201
+ return jansen_sobol(f_A, f_B, f_AB)
202
+
203
+ _ = sobol_indices(
204
+ func=f_ishigami, n=8,
205
+ dists=self.dists,
206
+ method=jansen_sobol_typed,
207
+ rng=rng
208
+ )
209
+
210
+ def test_normalization(self, ishigami_ref_indices):
211
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
212
+ res = sobol_indices(
213
+ func=lambda x: f_ishigami(x) + 1000, n=4096,
214
+ dists=self.dists,
215
+ rng=rng
216
+ )
217
+
218
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-2)
219
+ assert_allclose(res.total_order, ishigami_ref_indices[1], atol=1e-2)
220
+
221
+ def test_constant_function(self, ishigami_ref_indices):
222
+
223
+ def f_ishigami_vec_const(x):
224
+ """Output of shape (3, n)."""
225
+ res = f_ishigami(x)
226
+ return res, res * 0 + 10, res
227
+
228
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
229
+ res = sobol_indices(
230
+ func=f_ishigami_vec_const, n=4096,
231
+ dists=self.dists,
232
+ rng=rng
233
+ )
234
+
235
+ ishigami_vec_indices = [
236
+ [ishigami_ref_indices[0], [0, 0, 0], ishigami_ref_indices[0]],
237
+ [ishigami_ref_indices[1], [0, 0, 0], ishigami_ref_indices[1]]
238
+ ]
239
+
240
+ assert_allclose(res.first_order, ishigami_vec_indices[0], atol=1e-2)
241
+ assert_allclose(res.total_order, ishigami_vec_indices[1], atol=1e-2)
242
+
243
+ @pytest.mark.xfail_on_32bit("Can't create large array for test")
244
+ def test_more_converged(self, ishigami_ref_indices):
245
+ rng = np.random.default_rng(28631265345463262246170309650372465332)
246
+ res = sobol_indices(
247
+ func=f_ishigami, n=2**19, # 524288
248
+ dists=self.dists,
249
+ rng=rng
250
+ )
251
+
252
+ assert_allclose(res.first_order, ishigami_ref_indices[0], atol=1e-4)
253
+ assert_allclose(res.total_order, ishigami_ref_indices[1], atol=1e-4)
254
+
255
+ def test_raises(self):
256
+
257
+ message = r"Each distribution in `dists` must have method `ppf`"
258
+ with pytest.raises(ValueError, match=message):
259
+ sobol_indices(n=0, func=f_ishigami, dists="uniform")
260
+
261
+ with pytest.raises(ValueError, match=message):
262
+ sobol_indices(n=0, func=f_ishigami, dists=[lambda x: x])
263
+
264
+ message = r"The balance properties of Sobol'"
265
+ with pytest.raises(ValueError, match=message):
266
+ sobol_indices(n=7, func=f_ishigami, dists=[stats.uniform()])
267
+
268
+ with pytest.raises(ValueError, match=message):
269
+ sobol_indices(n=4.1, func=f_ishigami, dists=[stats.uniform()])
270
+
271
+ message = r"'toto' is not a valid 'method'"
272
+ with pytest.raises(ValueError, match=message):
273
+ sobol_indices(n=0, func=f_ishigami, method='toto')
274
+
275
+ message = r"must have the following signature"
276
+ with pytest.raises(ValueError, match=message):
277
+ sobol_indices(n=0, func=f_ishigami, method=lambda x: x)
278
+
279
+ message = r"'dists' must be defined when 'func' is a callable"
280
+ with pytest.raises(ValueError, match=message):
281
+ sobol_indices(n=0, func=f_ishigami)
282
+
283
+ def func_wrong_shape_output(x):
284
+ return x.reshape(-1, 1)
285
+
286
+ message = r"'func' output should have a shape"
287
+ with pytest.raises(ValueError, match=message):
288
+ sobol_indices(
289
+ n=2, func=func_wrong_shape_output, dists=[stats.uniform()]
290
+ )
291
+
292
+ message = r"When 'func' is a dictionary"
293
+ with pytest.raises(ValueError, match=message):
294
+ sobol_indices(
295
+ n=2, func={'f_A': [], 'f_AB': []}, dists=[stats.uniform()]
296
+ )
297
+
298
+ with pytest.raises(ValueError, match=message):
299
+ # f_B malformed
300
+ sobol_indices(
301
+ n=2,
302
+ func={'f_A': [1, 2], 'f_B': [3], 'f_AB': [5, 6, 7, 8]},
303
+ )
304
+
305
+ with pytest.raises(ValueError, match=message):
306
+ # f_AB malformed
307
+ sobol_indices(
308
+ n=2,
309
+ func={'f_A': [1, 2], 'f_B': [3, 4], 'f_AB': [5, 6, 7]},
310
+ )
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_stats.py ADDED
The diff for this file is too large to render. See raw diff
 
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_survival.py ADDED
@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+
7
+
8
+ def _kaplan_meier_reference(times, censored):
9
+ # This is a very straightforward implementation of the Kaplan-Meier
10
+ # estimator that does almost everything differently from the implementation
11
+ # in stats.ecdf.
12
+
13
+ # Begin by sorting the raw data. Note that the order of death and loss
14
+ # at a given time matters: death happens first. See [2] page 461:
15
+ # "These conventions may be paraphrased by saying that deaths recorded as
16
+ # of an age t are treated as if they occurred slightly before t, and losses
17
+ # recorded as of an age t are treated as occurring slightly after t."
18
+ # We implement this by sorting the data first by time, then by `censored`,
19
+ # (which is 0 when there is a death and 1 when there is only a loss).
20
+ dtype = [('time', float), ('censored', int)]
21
+ data = np.array([(t, d) for t, d in zip(times, censored)], dtype=dtype)
22
+ data = np.sort(data, order=('time', 'censored'))
23
+ times = data['time']
24
+ died = np.logical_not(data['censored'])
25
+
26
+ m = times.size
27
+ n = np.arange(m, 0, -1) # number at risk
28
+ sf = np.cumprod((n - died) / n)
29
+
30
+ # Find the indices of the *last* occurrence of unique times. The
31
+ # corresponding entries of `times` and `sf` are what we want.
32
+ _, indices = np.unique(times[::-1], return_index=True)
33
+ ref_times = times[-indices - 1]
34
+ ref_sf = sf[-indices - 1]
35
+ return ref_times, ref_sf
36
+
37
+
38
+ class TestSurvival:
39
+
40
+ @staticmethod
41
+ def get_random_sample(rng, n_unique):
42
+ # generate random sample
43
+ unique_times = rng.random(n_unique)
44
+ # convert to `np.int32` to resolve `np.repeat` failure in 32-bit CI
45
+ repeats = rng.integers(1, 4, n_unique).astype(np.int32)
46
+ times = rng.permuted(np.repeat(unique_times, repeats))
47
+ censored = rng.random(size=times.size) > rng.random()
48
+ sample = stats.CensoredData.right_censored(times, censored)
49
+ return sample, times, censored
50
+
51
+ def test_input_validation(self):
52
+ message = '`sample` must be a one-dimensional sequence.'
53
+ with pytest.raises(ValueError, match=message):
54
+ stats.ecdf([[1]])
55
+ with pytest.raises(ValueError, match=message):
56
+ stats.ecdf(1)
57
+
58
+ message = '`sample` must not contain nan'
59
+ with pytest.raises(ValueError, match=message):
60
+ stats.ecdf([np.nan])
61
+
62
+ message = 'Currently, only uncensored and right-censored data...'
63
+ with pytest.raises(NotImplementedError, match=message):
64
+ stats.ecdf(stats.CensoredData.left_censored([1], censored=[True]))
65
+
66
+ message = 'method` must be one of...'
67
+ res = stats.ecdf([1, 2, 3])
68
+ with pytest.raises(ValueError, match=message):
69
+ res.cdf.confidence_interval(method='ekki-ekki')
70
+ with pytest.raises(ValueError, match=message):
71
+ res.sf.confidence_interval(method='shrubbery')
72
+
73
+ message = 'confidence_level` must be a scalar between 0 and 1'
74
+ with pytest.raises(ValueError, match=message):
75
+ res.cdf.confidence_interval(-1)
76
+ with pytest.raises(ValueError, match=message):
77
+ res.sf.confidence_interval([0.5, 0.6])
78
+
79
+ message = 'The confidence interval is undefined at some observations.'
80
+ with pytest.warns(RuntimeWarning, match=message):
81
+ ci = res.cdf.confidence_interval()
82
+
83
+ message = 'Confidence interval bounds do not implement...'
84
+ with pytest.raises(NotImplementedError, match=message):
85
+ ci.low.confidence_interval()
86
+ with pytest.raises(NotImplementedError, match=message):
87
+ ci.high.confidence_interval()
88
+
89
+ def test_edge_cases(self):
90
+ res = stats.ecdf([])
91
+ assert_equal(res.cdf.quantiles, [])
92
+ assert_equal(res.cdf.probabilities, [])
93
+
94
+ res = stats.ecdf([1])
95
+ assert_equal(res.cdf.quantiles, [1])
96
+ assert_equal(res.cdf.probabilities, [1])
97
+
98
+ def test_unique(self):
99
+ # Example with unique observations; `stats.ecdf` ref. [1] page 80
100
+ sample = [6.23, 5.58, 7.06, 6.42, 5.20]
101
+ res = stats.ecdf(sample)
102
+ ref_x = np.sort(np.unique(sample))
103
+ ref_cdf = np.arange(1, 6) / 5
104
+ ref_sf = 1 - ref_cdf
105
+ assert_equal(res.cdf.quantiles, ref_x)
106
+ assert_equal(res.cdf.probabilities, ref_cdf)
107
+ assert_equal(res.sf.quantiles, ref_x)
108
+ assert_equal(res.sf.probabilities, ref_sf)
109
+
110
+ def test_nonunique(self):
111
+ # Example with non-unique observations; `stats.ecdf` ref. [1] page 82
112
+ sample = [0, 2, 1, 2, 3, 4]
113
+ res = stats.ecdf(sample)
114
+ ref_x = np.sort(np.unique(sample))
115
+ ref_cdf = np.array([1/6, 2/6, 4/6, 5/6, 1])
116
+ ref_sf = 1 - ref_cdf
117
+ assert_equal(res.cdf.quantiles, ref_x)
118
+ assert_equal(res.cdf.probabilities, ref_cdf)
119
+ assert_equal(res.sf.quantiles, ref_x)
120
+ assert_equal(res.sf.probabilities, ref_sf)
121
+
122
+ def test_evaluate_methods(self):
123
+ # Test CDF and SF `evaluate` methods
124
+ rng = np.random.default_rng(1162729143302572461)
125
+ sample, _, _ = self.get_random_sample(rng, 15)
126
+ res = stats.ecdf(sample)
127
+ x = res.cdf.quantiles
128
+ xr = x + np.diff(x, append=x[-1]+1)/2 # right shifted points
129
+
130
+ assert_equal(res.cdf.evaluate(x), res.cdf.probabilities)
131
+ assert_equal(res.cdf.evaluate(xr), res.cdf.probabilities)
132
+ assert_equal(res.cdf.evaluate(x[0]-1), 0) # CDF starts at 0
133
+ assert_equal(res.cdf.evaluate([-np.inf, np.inf]), [0, 1])
134
+
135
+ assert_equal(res.sf.evaluate(x), res.sf.probabilities)
136
+ assert_equal(res.sf.evaluate(xr), res.sf.probabilities)
137
+ assert_equal(res.sf.evaluate(x[0]-1), 1) # SF starts at 1
138
+ assert_equal(res.sf.evaluate([-np.inf, np.inf]), [1, 0])
139
+
140
+ # ref. [1] page 91
141
+ t1 = [37, 43, 47, 56, 60, 62, 71, 77, 80, 81] # times
142
+ d1 = [0, 0, 1, 1, 0, 0, 0, 1, 1, 1] # 1 means deaths (not censored)
143
+ r1 = [1, 1, 0.875, 0.75, 0.75, 0.75, 0.75, 0.5, 0.25, 0] # reference SF
144
+
145
+ # https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_survival/BS704_Survival5.html
146
+ t2 = [8, 12, 26, 14, 21, 27, 8, 32, 20, 40]
147
+ d2 = [1, 1, 1, 1, 1, 1, 0, 0, 0, 0]
148
+ r2 = [0.9, 0.788, 0.675, 0.675, 0.54, 0.405, 0.27, 0.27, 0.27]
149
+ t3 = [33, 28, 41, 48, 48, 25, 37, 48, 25, 43]
150
+ d3 = [1, 1, 1, 0, 0, 0, 0, 0, 0, 0]
151
+ r3 = [1, 0.875, 0.75, 0.75, 0.6, 0.6, 0.6]
152
+
153
+ # https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_survival/bs704_survival4.html
154
+ t4 = [24, 3, 11, 19, 24, 13, 14, 2, 18, 17,
155
+ 24, 21, 12, 1, 10, 23, 6, 5, 9, 17]
156
+ d4 = [0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1]
157
+ r4 = [0.95, 0.95, 0.897, 0.844, 0.844, 0.844, 0.844, 0.844, 0.844,
158
+ 0.844, 0.76, 0.676, 0.676, 0.676, 0.676, 0.507, 0.507]
159
+
160
+ # https://www.real-statistics.com/survival-analysis/kaplan-meier-procedure/confidence-interval-for-the-survival-function/
161
+ t5 = [3, 5, 8, 10, 5, 5, 8, 12, 15, 14, 2, 11, 10, 9, 12, 5, 8, 11]
162
+ d5 = [1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1]
163
+ r5 = [0.944, 0.889, 0.722, 0.542, 0.542, 0.542, 0.361, 0.181, 0.181, 0.181]
164
+
165
+ @pytest.mark.parametrize("case", [(t1, d1, r1), (t2, d2, r2), (t3, d3, r3),
166
+ (t4, d4, r4), (t5, d5, r5)])
167
+ def test_right_censored_against_examples(self, case):
168
+ # test `ecdf` against other implementations on example problems
169
+ times, died, ref = case
170
+ sample = stats.CensoredData.right_censored(times, np.logical_not(died))
171
+ res = stats.ecdf(sample)
172
+ assert_allclose(res.sf.probabilities, ref, atol=1e-3)
173
+ assert_equal(res.sf.quantiles, np.sort(np.unique(times)))
174
+
175
+ # test reference implementation against other implementations
176
+ res = _kaplan_meier_reference(times, np.logical_not(died))
177
+ assert_equal(res[0], np.sort(np.unique(times)))
178
+ assert_allclose(res[1], ref, atol=1e-3)
179
+
180
+ @pytest.mark.parametrize('seed', [182746786639392128, 737379171436494115,
181
+ 576033618403180168, 308115465002673650])
182
+ def test_right_censored_against_reference_implementation(self, seed):
183
+ # test `ecdf` against reference implementation on random problems
184
+ rng = np.random.default_rng(seed)
185
+ n_unique = rng.integers(10, 100)
186
+ sample, times, censored = self.get_random_sample(rng, n_unique)
187
+ res = stats.ecdf(sample)
188
+ ref = _kaplan_meier_reference(times, censored)
189
+ assert_allclose(res.sf.quantiles, ref[0])
190
+ assert_allclose(res.sf.probabilities, ref[1])
191
+
192
+ # If all observations are uncensored, the KM estimate should match
193
+ # the usual estimate for uncensored data
194
+ sample = stats.CensoredData(uncensored=times)
195
+ res = _survival._ecdf_right_censored(sample) # force Kaplan-Meier
196
+ ref = stats.ecdf(times)
197
+ assert_equal(res[0], ref.sf.quantiles)
198
+ assert_allclose(res[1], ref.cdf.probabilities, rtol=1e-14)
199
+ assert_allclose(res[2], ref.sf.probabilities, rtol=1e-14)
200
+
201
+ def test_right_censored_ci(self):
202
+ # test "greenwood" confidence interval against example 4 (URL above).
203
+ times, died = self.t4, self.d4
204
+ sample = stats.CensoredData.right_censored(times, np.logical_not(died))
205
+ res = stats.ecdf(sample)
206
+ ref_allowance = [0.096, 0.096, 0.135, 0.162, 0.162, 0.162, 0.162,
207
+ 0.162, 0.162, 0.162, 0.214, 0.246, 0.246, 0.246,
208
+ 0.246, 0.341, 0.341]
209
+
210
+ sf_ci = res.sf.confidence_interval()
211
+ cdf_ci = res.cdf.confidence_interval()
212
+ allowance = res.sf.probabilities - sf_ci.low.probabilities
213
+
214
+ assert_allclose(allowance, ref_allowance, atol=1e-3)
215
+ assert_allclose(sf_ci.low.probabilities,
216
+ np.clip(res.sf.probabilities - allowance, 0, 1))
217
+ assert_allclose(sf_ci.high.probabilities,
218
+ np.clip(res.sf.probabilities + allowance, 0, 1))
219
+ assert_allclose(cdf_ci.low.probabilities,
220
+ np.clip(res.cdf.probabilities - allowance, 0, 1))
221
+ assert_allclose(cdf_ci.high.probabilities,
222
+ np.clip(res.cdf.probabilities + allowance, 0, 1))
223
+
224
+ # test "log-log" confidence interval against Mathematica
225
+ # e = {24, 3, 11, 19, 24, 13, 14, 2, 18, 17, 24, 21, 12, 1, 10, 23, 6, 5,
226
+ # 9, 17}
227
+ # ci = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0}
228
+ # R = EventData[e, ci]
229
+ # S = SurvivalModelFit[R]
230
+ # S["PointwiseIntervals", ConfidenceLevel->0.95,
231
+ # ConfidenceTransform->"LogLog"]
232
+
233
+ ref_low = [0.694743, 0.694743, 0.647529, 0.591142, 0.591142, 0.591142,
234
+ 0.591142, 0.591142, 0.591142, 0.591142, 0.464605, 0.370359,
235
+ 0.370359, 0.370359, 0.370359, 0.160489, 0.160489]
236
+ ref_high = [0.992802, 0.992802, 0.973299, 0.947073, 0.947073, 0.947073,
237
+ 0.947073, 0.947073, 0.947073, 0.947073, 0.906422, 0.856521,
238
+ 0.856521, 0.856521, 0.856521, 0.776724, 0.776724]
239
+ sf_ci = res.sf.confidence_interval(method='log-log')
240
+ assert_allclose(sf_ci.low.probabilities, ref_low, atol=1e-6)
241
+ assert_allclose(sf_ci.high.probabilities, ref_high, atol=1e-6)
242
+
243
+ def test_right_censored_ci_example_5(self):
244
+ # test "exponential greenwood" confidence interval against example 5
245
+ times, died = self.t5, self.d5
246
+ sample = stats.CensoredData.right_censored(times, np.logical_not(died))
247
+ res = stats.ecdf(sample)
248
+ lower = np.array([0.66639, 0.624174, 0.456179, 0.287822, 0.287822,
249
+ 0.287822, 0.128489, 0.030957, 0.030957, 0.030957])
250
+ upper = np.array([0.991983, 0.970995, 0.87378, 0.739467, 0.739467,
251
+ 0.739467, 0.603133, 0.430365, 0.430365, 0.430365])
252
+
253
+ sf_ci = res.sf.confidence_interval(method='log-log')
254
+ cdf_ci = res.cdf.confidence_interval(method='log-log')
255
+
256
+ assert_allclose(sf_ci.low.probabilities, lower, atol=1e-5)
257
+ assert_allclose(sf_ci.high.probabilities, upper, atol=1e-5)
258
+ assert_allclose(cdf_ci.low.probabilities, 1-upper, atol=1e-5)
259
+ assert_allclose(cdf_ci.high.probabilities, 1-lower, atol=1e-5)
260
+
261
+ # Test against R's `survival` library `survfit` function, 90%CI
262
+ # library(survival)
263
+ # options(digits=16)
264
+ # time = c(3, 5, 8, 10, 5, 5, 8, 12, 15, 14, 2, 11, 10, 9, 12, 5, 8, 11)
265
+ # status = c(1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1)
266
+ # res = survfit(Surv(time, status)
267
+ # ~1, conf.type = "log-log", conf.int = 0.90)
268
+ # res$time; res$lower; res$upper
269
+ low = [0.74366748406861172, 0.68582332289196246, 0.50596835651480121,
270
+ 0.32913131413336727, 0.32913131413336727, 0.32913131413336727,
271
+ 0.15986912028781664, 0.04499539918147757, 0.04499539918147757,
272
+ 0.04499539918147757]
273
+ high = [0.9890291867238429, 0.9638835422144144, 0.8560366823086629,
274
+ 0.7130167643978450, 0.7130167643978450, 0.7130167643978450,
275
+ 0.5678602982997164, 0.3887616766886558, 0.3887616766886558,
276
+ 0.3887616766886558]
277
+ sf_ci = res.sf.confidence_interval(method='log-log',
278
+ confidence_level=0.9)
279
+ assert_allclose(sf_ci.low.probabilities, low)
280
+ assert_allclose(sf_ci.high.probabilities, high)
281
+
282
+ # And with conf.type = "plain"
283
+ low = [0.8556383113628162, 0.7670478794850761, 0.5485720663578469,
284
+ 0.3441515412527123, 0.3441515412527123, 0.3441515412527123,
285
+ 0.1449184105424544, 0., 0., 0.]
286
+ high = [1., 1., 0.8958723780865975, 0.7391817920806210,
287
+ 0.7391817920806210, 0.7391817920806210, 0.5773038116797676,
288
+ 0.3642270254596720, 0.3642270254596720, 0.3642270254596720]
289
+ sf_ci = res.sf.confidence_interval(confidence_level=0.9)
290
+ assert_allclose(sf_ci.low.probabilities, low)
291
+ assert_allclose(sf_ci.high.probabilities, high)
292
+
293
+ def test_right_censored_ci_nans(self):
294
+ # test `ecdf` confidence interval on a problem that results in NaNs
295
+ times, died = self.t1, self.d1
296
+ sample = stats.CensoredData.right_censored(times, np.logical_not(died))
297
+ res = stats.ecdf(sample)
298
+
299
+ # Reference values generated with Matlab
300
+ # format long
301
+ # t = [37 43 47 56 60 62 71 77 80 81];
302
+ # d = [0 0 1 1 0 0 0 1 1 1];
303
+ # censored = ~d1;
304
+ # [f, x, flo, fup] = ecdf(t, 'Censoring', censored, 'Alpha', 0.05);
305
+ x = [37, 47, 56, 77, 80, 81]
306
+ flo = [np.nan, 0, 0, 0.052701464070711, 0.337611126231790, np.nan]
307
+ fup = [np.nan, 0.35417230377, 0.5500569798, 0.9472985359, 1.0, np.nan]
308
+ i = np.searchsorted(res.cdf.quantiles, x)
309
+
310
+ message = "The confidence interval is undefined at some observations"
311
+ with pytest.warns(RuntimeWarning, match=message):
312
+ ci = res.cdf.confidence_interval()
313
+
314
+ # Matlab gives NaN as the first element of the CIs. Mathematica agrees,
315
+ # but R's survfit does not. It makes some sense, but it's not what the
316
+ # formula gives, so skip that element.
317
+ assert_allclose(ci.low.probabilities[i][1:], flo[1:])
318
+ assert_allclose(ci.high.probabilities[i][1:], fup[1:])
319
+
320
+ # [f, x, flo, fup] = ecdf(t, 'Censoring', censored, 'Function',
321
+ # 'survivor', 'Alpha', 0.05);
322
+ flo = [np.nan, 0.64582769623, 0.449943020228, 0.05270146407, 0, np.nan]
323
+ fup = [np.nan, 1.0, 1.0, 0.947298535929289, 0.662388873768210, np.nan]
324
+ i = np.searchsorted(res.cdf.quantiles, x)
325
+
326
+ with pytest.warns(RuntimeWarning, match=message):
327
+ ci = res.sf.confidence_interval()
328
+
329
+ assert_allclose(ci.low.probabilities[i][1:], flo[1:])
330
+ assert_allclose(ci.high.probabilities[i][1:], fup[1:])
331
+
332
+ # With the same data, R's `survival` library `survfit` function
333
+ # doesn't produce the leading NaN
334
+ # library(survival)
335
+ # options(digits=16)
336
+ # time = c(37, 43, 47, 56, 60, 62, 71, 77, 80, 81)
337
+ # status = c(0, 0, 1, 1, 0, 0, 0, 1, 1, 1)
338
+ # res = survfit(Surv(time, status)
339
+ # ~1, conf.type = "plain", conf.int = 0.95)
340
+ # res$time
341
+ # res$lower
342
+ # res$upper
343
+ low = [1., 1., 0.64582769623233816, 0.44994302022779326,
344
+ 0.44994302022779326, 0.44994302022779326, 0.44994302022779326,
345
+ 0.05270146407071086, 0., np.nan]
346
+ high = [1., 1., 1., 1., 1., 1., 1., 0.9472985359292891,
347
+ 0.6623888737682101, np.nan]
348
+ assert_allclose(ci.low.probabilities, low)
349
+ assert_allclose(ci.high.probabilities, high)
350
+
351
+ # It does with conf.type="log-log", as do we
352
+ with pytest.warns(RuntimeWarning, match=message):
353
+ ci = res.sf.confidence_interval(method='log-log')
354
+ low = [np.nan, np.nan, 0.38700001403202522, 0.31480711370551911,
355
+ 0.31480711370551911, 0.31480711370551911, 0.31480711370551911,
356
+ 0.08048821148507734, 0.01049958986680601, np.nan]
357
+ high = [np.nan, np.nan, 0.9813929658789660, 0.9308983170906275,
358
+ 0.9308983170906275, 0.9308983170906275, 0.9308983170906275,
359
+ 0.8263946341076415, 0.6558775085110887, np.nan]
360
+ assert_allclose(ci.low.probabilities, low)
361
+ assert_allclose(ci.high.probabilities, high)
362
+
363
+ def test_right_censored_against_uncensored(self):
364
+ rng = np.random.default_rng(7463952748044886637)
365
+ sample = rng.integers(10, 100, size=1000)
366
+ censored = np.zeros_like(sample)
367
+ censored[np.argmax(sample)] = True
368
+ res = stats.ecdf(sample)
369
+ ref = stats.ecdf(stats.CensoredData.right_censored(sample, censored))
370
+ assert_equal(res.sf.quantiles, ref.sf.quantiles)
371
+ assert_equal(res.sf._n, ref.sf._n)
372
+ assert_equal(res.sf._d[:-1], ref.sf._d[:-1]) # difference @ [-1]
373
+ assert_allclose(res.sf._sf[:-1], ref.sf._sf[:-1], rtol=1e-14)
374
+
375
+ def test_plot_iv(self):
376
+ rng = np.random.default_rng(1769658657308472721)
377
+ n_unique = rng.integers(10, 100)
378
+ sample, _, _ = self.get_random_sample(rng, n_unique)
379
+ res = stats.ecdf(sample)
380
+
381
+ try:
382
+ import matplotlib.pyplot as plt # noqa: F401
383
+ res.sf.plot() # no other errors occur
384
+ except (ModuleNotFoundError, ImportError):
385
+ message = r"matplotlib must be installed to use method `plot`."
386
+ with pytest.raises(ModuleNotFoundError, match=message):
387
+ res.sf.plot()
388
+
389
+
390
+ class TestLogRank:
391
+
392
+ @pytest.mark.parametrize(
393
+ "x, y, statistic, pvalue",
394
+ # Results validate with R
395
+ # library(survival)
396
+ # options(digits=16)
397
+ #
398
+ # futime_1 <- c(8, 12, 26, 14, 21, 27, 8, 32, 20, 40)
399
+ # fustat_1 <- c(1, 1, 1, 1, 1, 1, 0, 0, 0, 0)
400
+ # rx_1 <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
401
+ #
402
+ # futime_2 <- c(33, 28, 41, 48, 48, 25, 37, 48, 25, 43)
403
+ # fustat_2 <- c(1, 1, 1, 0, 0, 0, 0, 0, 0, 0)
404
+ # rx_2 <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
405
+ #
406
+ # futime <- c(futime_1, futime_2)
407
+ # fustat <- c(fustat_1, fustat_2)
408
+ # rx <- c(rx_1, rx_2)
409
+ #
410
+ # survdiff(formula = Surv(futime, fustat) ~ rx)
411
+ #
412
+ # Also check against another library which handle alternatives
413
+ # library(nph)
414
+ # logrank.test(futime, fustat, rx, alternative = "two.sided")
415
+ # res["test"]
416
+ [(
417
+ # https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_survival/BS704_Survival5.html
418
+ # uncensored, censored
419
+ [[8, 12, 26, 14, 21, 27], [8, 32, 20, 40]],
420
+ [[33, 28, 41], [48, 48, 25, 37, 48, 25, 43]],
421
+ # chi2, ["two-sided", "less", "greater"]
422
+ 6.91598157449,
423
+ [0.008542873404, 0.9957285632979385, 0.004271436702061537]
424
+ ),
425
+ (
426
+ # https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_survival/BS704_Survival5.html
427
+ [[19, 6, 5, 4], [20, 19, 17, 14]],
428
+ [[16, 21, 7], [21, 15, 18, 18, 5]],
429
+ 0.835004855038,
430
+ [0.3608293039, 0.8195853480676912, 0.1804146519323088]
431
+ ),
432
+ (
433
+ # Bland, Altman, "The logrank test", BMJ, 2004
434
+ # https://www.bmj.com/content/328/7447/1073.short
435
+ [[6, 13, 21, 30, 37, 38, 49, 50, 63, 79, 86, 98, 202, 219],
436
+ [31, 47, 80, 82, 82, 149]],
437
+ [[10, 10, 12, 13, 14, 15, 16, 17, 18, 20, 24, 24, 25, 28, 30,
438
+ 33, 35, 37, 40, 40, 46, 48, 76, 81, 82, 91, 112, 181],
439
+ [34, 40, 70]],
440
+ 7.49659416854,
441
+ [0.006181578637, 0.003090789318730882, 0.9969092106812691]
442
+ )]
443
+ )
444
+ def test_log_rank(self, x, y, statistic, pvalue):
445
+ x = stats.CensoredData(uncensored=x[0], right=x[1])
446
+ y = stats.CensoredData(uncensored=y[0], right=y[1])
447
+
448
+ for i, alternative in enumerate(["two-sided", "less", "greater"]):
449
+ res = stats.logrank(x=x, y=y, alternative=alternative)
450
+
451
+ # we return z and use the normal distribution while other framework
452
+ # return z**2. The p-value are directly comparable, but we have to
453
+ # square the statistic
454
+ assert_allclose(res.statistic**2, statistic, atol=1e-10)
455
+ assert_allclose(res.pvalue, pvalue[i], atol=1e-10)
456
+
457
+ def test_raises(self):
458
+ sample = stats.CensoredData([1, 2])
459
+
460
+ msg = r"`y` must be"
461
+ with pytest.raises(ValueError, match=msg):
462
+ stats.logrank(x=sample, y=[[1, 2]])
463
+
464
+ msg = r"`x` must be"
465
+ with pytest.raises(ValueError, match=msg):
466
+ stats.logrank(x=[[1, 2]], y=sample)
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_tukeylambda_stats.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from numpy.testing import assert_allclose, assert_equal
3
+
4
+ from scipy.stats._tukeylambda_stats import (tukeylambda_variance,
5
+ tukeylambda_kurtosis)
6
+
7
+
8
+ def test_tukeylambda_stats_known_exact():
9
+ """Compare results with some known exact formulas."""
10
+ # Some exact values of the Tukey Lambda variance and kurtosis:
11
+ # lambda var kurtosis
12
+ # 0 pi**2/3 6/5 (logistic distribution)
13
+ # 0.5 4 - pi (5/3 - pi/2)/(pi/4 - 1)**2 - 3
14
+ # 1 1/3 -6/5 (uniform distribution on (-1,1))
15
+ # 2 1/12 -6/5 (uniform distribution on (-1/2, 1/2))
16
+
17
+ # lambda = 0
18
+ var = tukeylambda_variance(0)
19
+ assert_allclose(var, np.pi**2 / 3, atol=1e-12)
20
+ kurt = tukeylambda_kurtosis(0)
21
+ assert_allclose(kurt, 1.2, atol=1e-10)
22
+
23
+ # lambda = 0.5
24
+ var = tukeylambda_variance(0.5)
25
+ assert_allclose(var, 4 - np.pi, atol=1e-12)
26
+ kurt = tukeylambda_kurtosis(0.5)
27
+ desired = (5./3 - np.pi/2) / (np.pi/4 - 1)**2 - 3
28
+ assert_allclose(kurt, desired, atol=1e-10)
29
+
30
+ # lambda = 1
31
+ var = tukeylambda_variance(1)
32
+ assert_allclose(var, 1.0 / 3, atol=1e-12)
33
+ kurt = tukeylambda_kurtosis(1)
34
+ assert_allclose(kurt, -1.2, atol=1e-10)
35
+
36
+ # lambda = 2
37
+ var = tukeylambda_variance(2)
38
+ assert_allclose(var, 1.0 / 12, atol=1e-12)
39
+ kurt = tukeylambda_kurtosis(2)
40
+ assert_allclose(kurt, -1.2, atol=1e-10)
41
+
42
+
43
+ def test_tukeylambda_stats_mpmath():
44
+ """Compare results with some values that were computed using mpmath."""
45
+ a10 = dict(atol=1e-10, rtol=0)
46
+ a12 = dict(atol=1e-12, rtol=0)
47
+ data = [
48
+ # lambda variance kurtosis
49
+ [-0.1, 4.78050217874253547, 3.78559520346454510],
50
+ [-0.0649, 4.16428023599895777, 2.52019675947435718],
51
+ [-0.05, 3.93672267890775277, 2.13129793057777277],
52
+ [-0.001, 3.30128380390964882, 1.21452460083542988],
53
+ [0.001, 3.27850775649572176, 1.18560634779287585],
54
+ [0.03125, 2.95927803254615800, 0.804487555161819980],
55
+ [0.05, 2.78281053405464501, 0.611604043886644327],
56
+ [0.0649, 2.65282386754100551, 0.476834119532774540],
57
+ [1.2, 0.242153920578588346, -1.23428047169049726],
58
+ [10.0, 0.00095237579757703597, 2.37810697355144933],
59
+ [20.0, 0.00012195121951131043, 7.37654321002709531],
60
+ ]
61
+
62
+ for lam, var_expected, kurt_expected in data:
63
+ var = tukeylambda_variance(lam)
64
+ assert_allclose(var, var_expected, **a12)
65
+ kurt = tukeylambda_kurtosis(lam)
66
+ assert_allclose(kurt, kurt_expected, **a10)
67
+
68
+ # Test with vector arguments (most of the other tests are for single
69
+ # values).
70
+ lam, var_expected, kurt_expected = zip(*data)
71
+ var = tukeylambda_variance(lam)
72
+ assert_allclose(var, var_expected, **a12)
73
+ kurt = tukeylambda_kurtosis(lam)
74
+ assert_allclose(kurt, kurt_expected, **a10)
75
+
76
+
77
+ def test_tukeylambda_stats_invalid():
78
+ """Test values of lambda outside the domains of the functions."""
79
+ lam = [-1.0, -0.5]
80
+ var = tukeylambda_variance(lam)
81
+ assert_equal(var, np.array([np.nan, np.inf]))
82
+
83
+ lam = [-1.0, -0.25]
84
+ kurt = tukeylambda_kurtosis(lam)
85
+ assert_equal(kurt, np.array([np.nan, np.inf]))
miniconda3/envs/ladir/lib/python3.10/site-packages/scipy/stats/tests/test_variation.py ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+
3
+ import numpy as np
4
+ import pytest
5
+ from numpy.testing import suppress_warnings
6
+
7
+ from scipy.stats import variation
8
+ from scipy._lib._util import AxisError
9
+ from scipy.conftest import array_api_compatible
10
+ from scipy._lib._array_api import is_numpy
11
+ from scipy._lib._array_api_no_0d import xp_assert_equal, xp_assert_close
12
+ from scipy.stats._axis_nan_policy import (too_small_nd_omit, too_small_nd_not_omit,
13
+ SmallSampleWarning)
14
+
15
+ pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends")]
16
+ skip_xp_backends = pytest.mark.skip_xp_backends
17
+
18
+
19
+ class TestVariation:
20
+ """
21
+ Test class for scipy.stats.variation
22
+ """
23
+
24
+ def test_ddof(self, xp):
25
+ x = xp.arange(9.0)
26
+ xp_assert_close(variation(x, ddof=1), xp.asarray(math.sqrt(60/8)/4))
27
+
28
+ @pytest.mark.parametrize('sgn', [1, -1])
29
+ def test_sign(self, sgn, xp):
30
+ x = xp.asarray([1., 2., 3., 4., 5.])
31
+ v = variation(sgn*x)
32
+ expected = xp.asarray(sgn*math.sqrt(2)/3)
33
+ xp_assert_close(v, expected, rtol=1e-10)
34
+
35
+ def test_scalar(self, xp):
36
+ # A scalar is treated like a 1-d sequence with length 1.
37
+ xp_assert_equal(variation(4.0), 0.0)
38
+
39
+ @pytest.mark.parametrize('nan_policy, expected',
40
+ [('propagate', np.nan),
41
+ ('omit', np.sqrt(20/3)/4)])
42
+ @skip_xp_backends(np_only=True,
43
+ reason='`nan_policy` only supports NumPy backend')
44
+ def test_variation_nan(self, nan_policy, expected, xp):
45
+ x = xp.arange(10.)
46
+ x[9] = xp.nan
47
+ xp_assert_close(variation(x, nan_policy=nan_policy), expected)
48
+
49
+ @skip_xp_backends(np_only=True,
50
+ reason='`nan_policy` only supports NumPy backend')
51
+ def test_nan_policy_raise(self, xp):
52
+ x = xp.asarray([1.0, 2.0, xp.nan, 3.0])
53
+ with pytest.raises(ValueError, match='input contains nan'):
54
+ variation(x, nan_policy='raise')
55
+
56
+ @skip_xp_backends(np_only=True,
57
+ reason='`nan_policy` only supports NumPy backend')
58
+ def test_bad_nan_policy(self, xp):
59
+ with pytest.raises(ValueError, match='must be one of'):
60
+ variation([1, 2, 3], nan_policy='foobar')
61
+
62
+ @skip_xp_backends(np_only=True,
63
+ reason='`keepdims` only supports NumPy backend')
64
+ def test_keepdims(self, xp):
65
+ x = xp.reshape(xp.arange(10), (2, 5))
66
+ y = variation(x, axis=1, keepdims=True)
67
+ expected = np.array([[np.sqrt(2)/2],
68
+ [np.sqrt(2)/7]])
69
+ xp_assert_close(y, expected)
70
+
71
+ @skip_xp_backends(np_only=True,
72
+ reason='`keepdims` only supports NumPy backend')
73
+ @pytest.mark.parametrize('axis, expected',
74
+ [(0, np.empty((1, 0))),
75
+ (1, np.full((5, 1), fill_value=np.nan))])
76
+ def test_keepdims_size0(self, axis, expected, xp):
77
+ x = xp.zeros((5, 0))
78
+ if axis == 1:
79
+ with pytest.warns(SmallSampleWarning, match=too_small_nd_not_omit):
80
+ y = variation(x, axis=axis, keepdims=True)
81
+ else:
82
+ y = variation(x, axis=axis, keepdims=True)
83
+ xp_assert_equal(y, expected)
84
+
85
+ @skip_xp_backends(np_only=True,
86
+ reason='`keepdims` only supports NumPy backend')
87
+ @pytest.mark.parametrize('incr, expected_fill', [(0, np.inf), (1, np.nan)])
88
+ def test_keepdims_and_ddof_eq_len_plus_incr(self, incr, expected_fill, xp):
89
+ x = xp.asarray([[1, 1, 2, 2], [1, 2, 3, 3]])
90
+ y = variation(x, axis=1, ddof=x.shape[1] + incr, keepdims=True)
91
+ xp_assert_equal(y, xp.full((2, 1), fill_value=expected_fill))
92
+
93
+ @skip_xp_backends(np_only=True,
94
+ reason='`nan_policy` only supports NumPy backend')
95
+ def test_propagate_nan(self, xp):
96
+ # Check that the shape of the result is the same for inputs
97
+ # with and without nans, cf gh-5817
98
+ a = xp.reshape(xp.arange(8, dtype=float), (2, -1))
99
+ a[1, 0] = xp.nan
100
+ v = variation(a, axis=1, nan_policy="propagate")
101
+ xp_assert_close(v, [math.sqrt(5/4)/1.5, xp.nan], atol=1e-15)
102
+
103
+ @skip_xp_backends(np_only=True, reason='Python list input uses NumPy backend')
104
+ def test_axis_none(self, xp):
105
+ # Check that `variation` computes the result on the flattened
106
+ # input when axis is None.
107
+ y = variation([[0, 1], [2, 3]], axis=None)
108
+ xp_assert_close(y, math.sqrt(5/4)/1.5)
109
+
110
+ def test_bad_axis(self, xp):
111
+ # Check that an invalid axis raises np.exceptions.AxisError.
112
+ x = xp.asarray([[1, 2, 3], [4, 5, 6]])
113
+ with pytest.raises((AxisError, IndexError)):
114
+ variation(x, axis=10)
115
+
116
+ def test_mean_zero(self, xp):
117
+ # Check that `variation` returns inf for a sequence that is not
118
+ # identically zero but whose mean is zero.
119
+ x = xp.asarray([10., -3., 1., -4., -4.])
120
+ y = variation(x)
121
+ xp_assert_equal(y, xp.asarray(xp.inf))
122
+
123
+ x2 = xp.stack([x, -10.*x])
124
+ y2 = variation(x2, axis=1)
125
+ xp_assert_equal(y2, xp.asarray([xp.inf, xp.inf]))
126
+
127
+ @pytest.mark.parametrize('x', [[0.]*5, [1, 2, np.inf, 9]])
128
+ def test_return_nan(self, x, xp):
129
+ x = xp.asarray(x)
130
+ # Test some cases where `variation` returns nan.
131
+ y = variation(x)
132
+ xp_assert_equal(y, xp.asarray(xp.nan, dtype=x.dtype))
133
+
134
+ @pytest.mark.parametrize('axis, expected',
135
+ [(0, []), (1, [np.nan]*3), (None, np.nan)])
136
+ def test_2d_size_zero_with_axis(self, axis, expected, xp):
137
+ x = xp.empty((3, 0))
138
+ with suppress_warnings() as sup:
139
+ # torch
140
+ sup.filter(UserWarning, "std*")
141
+ if axis != 0:
142
+ if is_numpy(xp):
143
+ with pytest.warns(SmallSampleWarning, match="See documentation..."):
144
+ y = variation(x, axis=axis)
145
+ else:
146
+ y = variation(x, axis=axis)
147
+ else:
148
+ y = variation(x, axis=axis)
149
+ xp_assert_equal(y, xp.asarray(expected))
150
+
151
+ def test_neg_inf(self, xp):
152
+ # Edge case that produces -inf: ddof equals the number of non-nan
153
+ # values, the values are not constant, and the mean is negative.
154
+ x1 = xp.asarray([-3., -5.])
155
+ xp_assert_equal(variation(x1, ddof=2), xp.asarray(-xp.inf))
156
+
157
+ @skip_xp_backends(np_only=True,
158
+ reason='`nan_policy` only supports NumPy backend')
159
+ def test_neg_inf_nan(self, xp):
160
+ x2 = xp.asarray([[xp.nan, 1, -10, xp.nan],
161
+ [-20, -3, xp.nan, xp.nan]])
162
+ xp_assert_equal(variation(x2, axis=1, ddof=2, nan_policy='omit'),
163
+ [-xp.inf, -xp.inf])
164
+
165
+ @skip_xp_backends(np_only=True,
166
+ reason='`nan_policy` only supports NumPy backend')
167
+ @pytest.mark.parametrize("nan_policy", ['propagate', 'omit'])
168
+ def test_combined_edge_cases(self, nan_policy, xp):
169
+ x = xp.array([[0, 10, xp.nan, 1],
170
+ [0, -5, xp.nan, 2],
171
+ [0, -5, xp.nan, 3]])
172
+ if nan_policy == 'omit':
173
+ with pytest.warns(SmallSampleWarning, match=too_small_nd_omit):
174
+ y = variation(x, axis=0, nan_policy=nan_policy)
175
+ else:
176
+ y = variation(x, axis=0, nan_policy=nan_policy)
177
+ xp_assert_close(y, [xp.nan, xp.inf, xp.nan, math.sqrt(2/3)/2])
178
+
179
+ @skip_xp_backends(np_only=True,
180
+ reason='`nan_policy` only supports NumPy backend')
181
+ @pytest.mark.parametrize(
182
+ 'ddof, expected',
183
+ [(0, [np.sqrt(1/6), np.sqrt(5/8), np.inf, 0, np.nan, 0.0, np.nan]),
184
+ (1, [0.5, np.sqrt(5/6), np.inf, 0, np.nan, 0, np.nan]),
185
+ (2, [np.sqrt(0.5), np.sqrt(5/4), np.inf, np.nan, np.nan, 0, np.nan])]
186
+ )
187
+ def test_more_nan_policy_omit_tests(self, ddof, expected, xp):
188
+ # The slightly strange formatting in the follow array is my attempt to
189
+ # maintain a clean tabular arrangement of the data while satisfying
190
+ # the demands of pycodestyle. Currently, E201 and E241 are not
191
+ # disabled by the `noqa` annotation.
192
+ nan = xp.nan
193
+ x = xp.asarray([[1.0, 2.0, nan, 3.0],
194
+ [0.0, 4.0, 3.0, 1.0],
195
+ [nan, -.5, 0.5, nan],
196
+ [nan, 9.0, 9.0, nan],
197
+ [nan, nan, nan, nan],
198
+ [3.0, 3.0, 3.0, 3.0],
199
+ [0.0, 0.0, 0.0, 0.0]])
200
+ with pytest.warns(SmallSampleWarning, match=too_small_nd_omit):
201
+ v = variation(x, axis=1, ddof=ddof, nan_policy='omit')
202
+ xp_assert_close(v, expected)
203
+
204
+ @skip_xp_backends(np_only=True,
205
+ reason='`nan_policy` only supports NumPy backend')
206
+ def test_variation_ddof(self, xp):
207
+ # test variation with delta degrees of freedom
208
+ # regression test for gh-13341
209
+ a = xp.asarray([1., 2., 3., 4., 5.])
210
+ nan_a = xp.asarray([1, 2, 3, xp.nan, 4, 5, xp.nan])
211
+ y = variation(a, ddof=1)
212
+ nan_y = variation(nan_a, nan_policy="omit", ddof=1)
213
+ xp_assert_close(y, math.sqrt(5/2)/3)
214
+ assert y == nan_y
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/METADATA ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: sentry-sdk
3
+ Version: 2.54.0
4
+ Summary: Python client for Sentry (https://sentry.io)
5
+ Home-page: https://github.com/getsentry/sentry-python
6
+ Author: Sentry Team and Contributors
7
+ Author-email: hello@sentry.io
8
+ License: MIT
9
+ Project-URL: Documentation, https://docs.sentry.io/platforms/python/
10
+ Project-URL: Changelog, https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Web Environment
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: BSD License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.6
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Requires-Python: >=3.6
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: urllib3>=1.26.11
32
+ Requires-Dist: certifi
33
+ Provides-Extra: aiohttp
34
+ Requires-Dist: aiohttp>=3.5; extra == "aiohttp"
35
+ Provides-Extra: anthropic
36
+ Requires-Dist: anthropic>=0.16; extra == "anthropic"
37
+ Provides-Extra: arq
38
+ Requires-Dist: arq>=0.23; extra == "arq"
39
+ Provides-Extra: asyncpg
40
+ Requires-Dist: asyncpg>=0.23; extra == "asyncpg"
41
+ Provides-Extra: beam
42
+ Requires-Dist: apache-beam>=2.12; extra == "beam"
43
+ Provides-Extra: bottle
44
+ Requires-Dist: bottle>=0.12.13; extra == "bottle"
45
+ Provides-Extra: celery
46
+ Requires-Dist: celery>=3; extra == "celery"
47
+ Provides-Extra: celery-redbeat
48
+ Requires-Dist: celery-redbeat>=2; extra == "celery-redbeat"
49
+ Provides-Extra: chalice
50
+ Requires-Dist: chalice>=1.16.0; extra == "chalice"
51
+ Provides-Extra: clickhouse-driver
52
+ Requires-Dist: clickhouse-driver>=0.2.0; extra == "clickhouse-driver"
53
+ Provides-Extra: django
54
+ Requires-Dist: django>=1.8; extra == "django"
55
+ Provides-Extra: falcon
56
+ Requires-Dist: falcon>=1.4; extra == "falcon"
57
+ Provides-Extra: fastapi
58
+ Requires-Dist: fastapi>=0.79.0; extra == "fastapi"
59
+ Provides-Extra: flask
60
+ Requires-Dist: flask>=0.11; extra == "flask"
61
+ Requires-Dist: blinker>=1.1; extra == "flask"
62
+ Requires-Dist: markupsafe; extra == "flask"
63
+ Provides-Extra: grpcio
64
+ Requires-Dist: grpcio>=1.21.1; extra == "grpcio"
65
+ Requires-Dist: protobuf>=3.8.0; extra == "grpcio"
66
+ Provides-Extra: http2
67
+ Requires-Dist: httpcore[http2]==1.*; extra == "http2"
68
+ Provides-Extra: httpx
69
+ Requires-Dist: httpx>=0.16.0; extra == "httpx"
70
+ Provides-Extra: huey
71
+ Requires-Dist: huey>=2; extra == "huey"
72
+ Provides-Extra: huggingface-hub
73
+ Requires-Dist: huggingface_hub>=0.22; extra == "huggingface-hub"
74
+ Provides-Extra: langchain
75
+ Requires-Dist: langchain>=0.0.210; extra == "langchain"
76
+ Provides-Extra: langgraph
77
+ Requires-Dist: langgraph>=0.6.6; extra == "langgraph"
78
+ Provides-Extra: launchdarkly
79
+ Requires-Dist: launchdarkly-server-sdk>=9.8.0; extra == "launchdarkly"
80
+ Provides-Extra: litellm
81
+ Requires-Dist: litellm>=1.77.5; extra == "litellm"
82
+ Provides-Extra: litestar
83
+ Requires-Dist: litestar>=2.0.0; extra == "litestar"
84
+ Provides-Extra: loguru
85
+ Requires-Dist: loguru>=0.5; extra == "loguru"
86
+ Provides-Extra: mcp
87
+ Requires-Dist: mcp>=1.15.0; extra == "mcp"
88
+ Provides-Extra: openai
89
+ Requires-Dist: openai>=1.0.0; extra == "openai"
90
+ Requires-Dist: tiktoken>=0.3.0; extra == "openai"
91
+ Provides-Extra: openfeature
92
+ Requires-Dist: openfeature-sdk>=0.7.1; extra == "openfeature"
93
+ Provides-Extra: opentelemetry
94
+ Requires-Dist: opentelemetry-distro>=0.35b0; extra == "opentelemetry"
95
+ Provides-Extra: opentelemetry-experimental
96
+ Requires-Dist: opentelemetry-distro; extra == "opentelemetry-experimental"
97
+ Provides-Extra: opentelemetry-otlp
98
+ Requires-Dist: opentelemetry-distro[otlp]>=0.35b0; extra == "opentelemetry-otlp"
99
+ Provides-Extra: pure-eval
100
+ Requires-Dist: pure_eval; extra == "pure-eval"
101
+ Requires-Dist: executing; extra == "pure-eval"
102
+ Requires-Dist: asttokens; extra == "pure-eval"
103
+ Provides-Extra: pydantic-ai
104
+ Requires-Dist: pydantic-ai>=1.0.0; extra == "pydantic-ai"
105
+ Provides-Extra: pymongo
106
+ Requires-Dist: pymongo>=3.1; extra == "pymongo"
107
+ Provides-Extra: pyspark
108
+ Requires-Dist: pyspark>=2.4.4; extra == "pyspark"
109
+ Provides-Extra: quart
110
+ Requires-Dist: quart>=0.16.1; extra == "quart"
111
+ Requires-Dist: blinker>=1.1; extra == "quart"
112
+ Provides-Extra: rq
113
+ Requires-Dist: rq>=0.6; extra == "rq"
114
+ Provides-Extra: sanic
115
+ Requires-Dist: sanic>=0.8; extra == "sanic"
116
+ Provides-Extra: sqlalchemy
117
+ Requires-Dist: sqlalchemy>=1.2; extra == "sqlalchemy"
118
+ Provides-Extra: starlette
119
+ Requires-Dist: starlette>=0.19.1; extra == "starlette"
120
+ Provides-Extra: starlite
121
+ Requires-Dist: starlite>=1.48; extra == "starlite"
122
+ Provides-Extra: statsig
123
+ Requires-Dist: statsig>=0.55.3; extra == "statsig"
124
+ Provides-Extra: tornado
125
+ Requires-Dist: tornado>=6; extra == "tornado"
126
+ Provides-Extra: unleash
127
+ Requires-Dist: UnleashClient>=6.0.1; extra == "unleash"
128
+ Provides-Extra: google-genai
129
+ Requires-Dist: google-genai>=1.29.0; extra == "google-genai"
130
+ Dynamic: author
131
+ Dynamic: author-email
132
+ Dynamic: classifier
133
+ Dynamic: description
134
+ Dynamic: description-content-type
135
+ Dynamic: home-page
136
+ Dynamic: license
137
+ Dynamic: license-file
138
+ Dynamic: project-url
139
+ Dynamic: provides-extra
140
+ Dynamic: requires-dist
141
+ Dynamic: requires-python
142
+ Dynamic: summary
143
+
144
+ <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
145
+ <img src="https://sentry-brand.storage.googleapis.com/github-banners/github-sdk-python.png" alt="Sentry for Python">
146
+ </a>
147
+ <div align="center">
148
+
149
+ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us
150
+ [<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_.
151
+
152
+ [![Discord](https://img.shields.io/discord/621778831602221064?logo=discord&labelColor=%20%235462eb&logoColor=%20%23f5f5f5&color=%20%235462eb)](https://discord.com/invite/Ww9hbqr)
153
+ [![X Follow](https://img.shields.io/twitter/follow/sentry?label=sentry&style=social)](https://x.com/intent/follow?screen_name=sentry)
154
+ [![PyPi page link -- version](https://img.shields.io/pypi/v/sentry-sdk.svg)](https://pypi.python.org/pypi/sentry-sdk)
155
+ <img src="https://img.shields.io/badge/python-3.7 | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 | 3.13 | 3.14-blue.svg" alt="python">
156
+ [![Build Status](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml/badge.svg)](https://github.com/getsentry/sentry-python/actions/workflows/ci.yml)
157
+
158
+ <br/>
159
+
160
+ </div>
161
+
162
+
163
+ # Official Sentry SDK for Python
164
+
165
+ Welcome to the official Python SDK for **[Sentry](http://sentry.io/)**.
166
+
167
+
168
+ ## 📦 Getting Started
169
+
170
+ ### Prerequisites
171
+
172
+ You need a Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects/).
173
+
174
+ ### Installation
175
+
176
+ Getting Sentry into your project is straightforward. Just run this command in your terminal:
177
+
178
+ ```bash
179
+ pip install --upgrade sentry-sdk
180
+ ```
181
+
182
+ ### Basic Configuration
183
+
184
+ Here's a quick configuration example to get Sentry up and running:
185
+
186
+ ```python
187
+ import sentry_sdk
188
+
189
+ sentry_sdk.init(
190
+ "https://12927b5f211046b575ee51fd8b1ac34f@o1.ingest.sentry.io/1", # Your DSN here
191
+
192
+ # Set traces_sample_rate to 1.0 to capture 100%
193
+ # of traces for performance monitoring.
194
+ traces_sample_rate=1.0,
195
+ )
196
+ ```
197
+
198
+ With this configuration, Sentry will monitor for exceptions and performance issues.
199
+
200
+ ### Quick Usage Example
201
+
202
+ To generate some events that will show up in Sentry, you can log messages or capture errors:
203
+
204
+ ```python
205
+ import sentry_sdk
206
+ sentry_sdk.init(...) # same as above
207
+
208
+ sentry_sdk.capture_message("Hello Sentry!") # You'll see this in your Sentry dashboard.
209
+
210
+ raise ValueError("Oops, something went wrong!") # This will create an error event in Sentry.
211
+ ```
212
+
213
+
214
+ ## 📚 Documentation
215
+
216
+ For more details on advanced usage, integrations, and customization, check out the full documentation on [https://docs.sentry.io](https://docs.sentry.io/).
217
+
218
+
219
+ ## 🧩 Integrations
220
+
221
+ Sentry integrates with a ton of popular Python libraries and frameworks, including [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/), [Django](https://docs.sentry.io/platforms/python/integrations/django/), [Celery](https://docs.sentry.io/platforms/python/integrations/celery/), [OpenAI](https://docs.sentry.io/platforms/python/integrations/openai/) and many, many more. Check out the [full list of integrations](https://docs.sentry.io/platforms/python/integrations/) to get the full picture.
222
+
223
+
224
+ ## 🚧 Migrating Between Versions?
225
+
226
+ ### From `1.x` to `2.x`
227
+
228
+ If you're using the older `1.x` version of the SDK, now's the time to upgrade to `2.x`. It includes significant upgrades and new features. Check our [migration guide](https://docs.sentry.io/platforms/python/migration/1.x-to-2.x) for assistance.
229
+
230
+ ### From `raven-python`
231
+
232
+ Using the legacy `raven-python` client? It's now in maintenance mode, and we recommend migrating to the new SDK for an improved experience. Get all the details in our [migration guide](https://docs.sentry.io/platforms/python/migration/raven-to-sentry-sdk/).
233
+
234
+
235
+ ## 🙌 Want to Contribute?
236
+
237
+ We'd love your help in improving the Sentry SDK! Whether it's fixing bugs, adding features, writing new integrations, or enhancing documentation, every contribution is valuable.
238
+
239
+ For details on how to contribute, please read our [contribution guide](CONTRIBUTING.md) and explore the [open issues](https://github.com/getsentry/sentry-python/issues).
240
+
241
+
242
+ ## 🛟 Need Help?
243
+
244
+ If you encounter issues or need help setting up or configuring the SDK, don't hesitate to reach out to the [Sentry Community on Discord](https://discord.com/invite/Ww9hbqr). There is a ton of great people there ready to help!
245
+
246
+
247
+ ## 🔗 Resources
248
+
249
+ Here are all resources to help you make the most of Sentry:
250
+
251
+ - [Documentation](https://docs.sentry.io/platforms/python/) - Official documentation to get started.
252
+ - [Discord](https://discord.com/invite/Ww9hbqr) - Join our Discord community.
253
+ - [X/Twitter](https://x.com/intent/follow?screen_name=sentry) - Follow us on X (Twitter) for updates.
254
+ - [Stack Overflow](https://stackoverflow.com/questions/tagged/sentry) - Questions and answers related to Sentry.
255
+
256
+ <a name="license"></a>
257
+ ## 📃 License
258
+
259
+ The SDK is open-source and available under the MIT license. Check out the [LICENSE](LICENSE) file for more information.
260
+
261
+
262
+ ## 😘 Contributors
263
+
264
+ Thanks to everyone who has helped improve the SDK!
265
+
266
+ <a href="https://github.com/getsentry/sentry-python/graphs/contributors">
267
+ <img src="https://contributors-img.web.app/image?repo=getsentry/sentry-python" />
268
+ </a>
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/RECORD ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ sentry_sdk-2.54.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ sentry_sdk-2.54.0.dist-info/METADATA,sha256=Gx-nTBD7sKyl35LMfJgjUcM1iC9dl3t0rqFrqJ9I3yM,10815
3
+ sentry_sdk-2.54.0.dist-info/RECORD,,
4
+ sentry_sdk-2.54.0.dist-info/WHEEL,sha256=uC7DnXjtoKy23CNUXRq6ohLsm8FbS2C_ECfYYzqZHVY,109
5
+ sentry_sdk-2.54.0.dist-info/entry_points.txt,sha256=qacZEz40UspQZD1IukCXykx0JtImqGDOctS5KfOLTko,91
6
+ sentry_sdk-2.54.0.dist-info/licenses/LICENSE,sha256=KhQNZg9GKBL6KQvHQNBGMxJsXsRdhLebVp4Sew7t3Qs,1093
7
+ sentry_sdk-2.54.0.dist-info/top_level.txt,sha256=XrQz30XE9FKXSY_yGLrd9bsv2Rk390GTDJOSujYaMxI,11
8
+ sentry_sdk/__init__.py,sha256=npWmBHXcM-3_uEkc3IeGphrrn6ylv3xI1oC5MKrafAM,1455
9
+ sentry_sdk/__pycache__/__init__.cpython-310.pyc,,
10
+ sentry_sdk/__pycache__/_batcher.cpython-310.pyc,,
11
+ sentry_sdk/__pycache__/_compat.cpython-310.pyc,,
12
+ sentry_sdk/__pycache__/_init_implementation.cpython-310.pyc,,
13
+ sentry_sdk/__pycache__/_log_batcher.cpython-310.pyc,,
14
+ sentry_sdk/__pycache__/_lru_cache.cpython-310.pyc,,
15
+ sentry_sdk/__pycache__/_metrics_batcher.cpython-310.pyc,,
16
+ sentry_sdk/__pycache__/_queue.cpython-310.pyc,,
17
+ sentry_sdk/__pycache__/_span_batcher.cpython-310.pyc,,
18
+ sentry_sdk/__pycache__/_types.cpython-310.pyc,,
19
+ sentry_sdk/__pycache__/_werkzeug.cpython-310.pyc,,
20
+ sentry_sdk/__pycache__/api.cpython-310.pyc,,
21
+ sentry_sdk/__pycache__/attachments.cpython-310.pyc,,
22
+ sentry_sdk/__pycache__/client.cpython-310.pyc,,
23
+ sentry_sdk/__pycache__/consts.cpython-310.pyc,,
24
+ sentry_sdk/__pycache__/debug.cpython-310.pyc,,
25
+ sentry_sdk/__pycache__/envelope.cpython-310.pyc,,
26
+ sentry_sdk/__pycache__/feature_flags.cpython-310.pyc,,
27
+ sentry_sdk/__pycache__/hub.cpython-310.pyc,,
28
+ sentry_sdk/__pycache__/logger.cpython-310.pyc,,
29
+ sentry_sdk/__pycache__/metrics.cpython-310.pyc,,
30
+ sentry_sdk/__pycache__/monitor.cpython-310.pyc,,
31
+ sentry_sdk/__pycache__/scope.cpython-310.pyc,,
32
+ sentry_sdk/__pycache__/scrubber.cpython-310.pyc,,
33
+ sentry_sdk/__pycache__/serializer.cpython-310.pyc,,
34
+ sentry_sdk/__pycache__/session.cpython-310.pyc,,
35
+ sentry_sdk/__pycache__/sessions.cpython-310.pyc,,
36
+ sentry_sdk/__pycache__/spotlight.cpython-310.pyc,,
37
+ sentry_sdk/__pycache__/traces.cpython-310.pyc,,
38
+ sentry_sdk/__pycache__/tracing.cpython-310.pyc,,
39
+ sentry_sdk/__pycache__/tracing_utils.cpython-310.pyc,,
40
+ sentry_sdk/__pycache__/transport.cpython-310.pyc,,
41
+ sentry_sdk/__pycache__/types.cpython-310.pyc,,
42
+ sentry_sdk/__pycache__/utils.cpython-310.pyc,,
43
+ sentry_sdk/__pycache__/worker.cpython-310.pyc,,
44
+ sentry_sdk/_batcher.py,sha256=3Elbey1gpWzYSo-Dr5xxP00QpYcRYb8FGYqei9U_mdE,4004
45
+ sentry_sdk/_compat.py,sha256=tSI9LTAlSw7x_putvg7qg5SSdo7W1EwpbYiB_godUMQ,3065
46
+ sentry_sdk/_init_implementation.py,sha256=xualjTVpMB8XbJUX-30eAnuiyPfDeoeZoer3iIl0mH4,2491
47
+ sentry_sdk/_log_batcher.py,sha256=6Y3VNP6a65t1gzND9Rz9356xj2ZXOI1rB8Wq2De7Cpc,1827
48
+ sentry_sdk/_lru_cache.py,sha256=YSnCmL1qArB6_dsfcwKZgO4eJhBak87HqjqbUzBNQ7A,1167
49
+ sentry_sdk/_metrics_batcher.py,sha256=c7aw1sG7rldcS4XrpKAX59AGMXZ74Vx9Ja7peQo7MPc,1273
50
+ sentry_sdk/_queue.py,sha256=bluPs51jz8d3w74aSolOZYc3jnwmyTGPKvKxv7Z2LL0,11244
51
+ sentry_sdk/_span_batcher.py,sha256=EscEhZvzyJIby2taeOfRL7m6hm2RwptdmXwk0b8k36o,4406
52
+ sentry_sdk/_types.py,sha256=bcDjVByhfqJoYB2deda3oZBYv73gRanJ3WfFM2WagXM,11018
53
+ sentry_sdk/_werkzeug.py,sha256=vQL3Z_q3OBQ8vEby2ktiY7Ey8szMDWZsUe-BGJ9A3oY,3716
54
+ sentry_sdk/ai/__init__.py,sha256=L2EAYEx9075dUVZGEB_CBxSgwaLeYLFWhBYfIEeBDRg,218
55
+ sentry_sdk/ai/__pycache__/__init__.cpython-310.pyc,,
56
+ sentry_sdk/ai/__pycache__/_openai_completions_api.cpython-310.pyc,,
57
+ sentry_sdk/ai/__pycache__/_openai_responses_api.cpython-310.pyc,,
58
+ sentry_sdk/ai/__pycache__/monitoring.cpython-310.pyc,,
59
+ sentry_sdk/ai/__pycache__/utils.cpython-310.pyc,,
60
+ sentry_sdk/ai/_openai_completions_api.py,sha256=MeLmyCCd-PQLWRN4RHgCm7bK6QXBjU74Df0ZGHDDDCg,1821
61
+ sentry_sdk/ai/_openai_responses_api.py,sha256=xN2fbP2hNibB-kW0mbA7L9s_g_JrYhyra7V4S9xF8kU,656
62
+ sentry_sdk/ai/monitoring.py,sha256=PRYQXdKh2CdIttIKcCWhQKebGHlBHn6b0lKWAmhK7MQ,5539
63
+ sentry_sdk/ai/utils.py,sha256=VtyghTEHI_3KRrEltYpLlIOO5FX5eD_Og1l7sqA9mx4,23837
64
+ sentry_sdk/api.py,sha256=AcIvABOYpeiCWS89yjtdM25pTtGP367yqEK-p-nHXFw,15280
65
+ sentry_sdk/attachments.py,sha256=fvmTzYvG2a2mjNzTzcja28ize87kEEZMtXwK1rmXpBc,3023
66
+ sentry_sdk/client.py,sha256=jhdrYnioKRqwZy66VgqrwGNyTewajkd1stPU0iZqZLA,38867
67
+ sentry_sdk/consts.py,sha256=NcgNHS_eqVHiBmwkjiBY5I-cz0MH8cFz7Qr6qQclQ4k,55042
68
+ sentry_sdk/crons/__init__.py,sha256=3Zt6g1-pZZ12uRKKsC8QLm3XgJ4K1VYxgVpNNUygOZY,221
69
+ sentry_sdk/crons/__pycache__/__init__.cpython-310.pyc,,
70
+ sentry_sdk/crons/__pycache__/api.cpython-310.pyc,,
71
+ sentry_sdk/crons/__pycache__/consts.cpython-310.pyc,,
72
+ sentry_sdk/crons/__pycache__/decorator.cpython-310.pyc,,
73
+ sentry_sdk/crons/api.py,sha256=gwtNjHZxZy51piEwYrnrYg3bZkifrdkSRlDAZYC30Kg,1679
74
+ sentry_sdk/crons/consts.py,sha256=dXqJk5meBSu5rjlGpqAOlkpACnuUi7svQnAFoy1ZNUU,87
75
+ sentry_sdk/crons/decorator.py,sha256=4fYEHYlhdtKyhzJr1HZZ7g2ierEJ3ULZe4N7a3jqbYE,3834
76
+ sentry_sdk/debug.py,sha256=63f8uUowpbZ75E8q-r_8Tdymsv9jXZn1VMh287VcWhk,959
77
+ sentry_sdk/envelope.py,sha256=q0CtNI9IgYPTlviQyp8HB8aeIxLVcklMIqaQ-LU_HpU,9652
78
+ sentry_sdk/feature_flags.py,sha256=J9G-nnQiXimYbhkPNDGz_CjAccYlbXS9KgybExBZjUI,2136
79
+ sentry_sdk/hub.py,sha256=sVkOrpjU0cNhxOFtWfxA8Nc_3T8hiGH-mVFZa4tX1Us,25147
80
+ sentry_sdk/integrations/__init__.py,sha256=U52rckcGzXoe73On-T70R64feEIg1ir1O1NSSkQvHzg,12674
81
+ sentry_sdk/integrations/__pycache__/__init__.cpython-310.pyc,,
82
+ sentry_sdk/integrations/__pycache__/_asgi_common.cpython-310.pyc,,
83
+ sentry_sdk/integrations/__pycache__/_wsgi_common.cpython-310.pyc,,
84
+ sentry_sdk/integrations/__pycache__/aiohttp.cpython-310.pyc,,
85
+ sentry_sdk/integrations/__pycache__/anthropic.cpython-310.pyc,,
86
+ sentry_sdk/integrations/__pycache__/argv.cpython-310.pyc,,
87
+ sentry_sdk/integrations/__pycache__/ariadne.cpython-310.pyc,,
88
+ sentry_sdk/integrations/__pycache__/arq.cpython-310.pyc,,
89
+ sentry_sdk/integrations/__pycache__/asgi.cpython-310.pyc,,
90
+ sentry_sdk/integrations/__pycache__/asyncio.cpython-310.pyc,,
91
+ sentry_sdk/integrations/__pycache__/asyncpg.cpython-310.pyc,,
92
+ sentry_sdk/integrations/__pycache__/atexit.cpython-310.pyc,,
93
+ sentry_sdk/integrations/__pycache__/aws_lambda.cpython-310.pyc,,
94
+ sentry_sdk/integrations/__pycache__/beam.cpython-310.pyc,,
95
+ sentry_sdk/integrations/__pycache__/boto3.cpython-310.pyc,,
96
+ sentry_sdk/integrations/__pycache__/bottle.cpython-310.pyc,,
97
+ sentry_sdk/integrations/__pycache__/chalice.cpython-310.pyc,,
98
+ sentry_sdk/integrations/__pycache__/clickhouse_driver.cpython-310.pyc,,
99
+ sentry_sdk/integrations/__pycache__/cloud_resource_context.cpython-310.pyc,,
100
+ sentry_sdk/integrations/__pycache__/cohere.cpython-310.pyc,,
101
+ sentry_sdk/integrations/__pycache__/dedupe.cpython-310.pyc,,
102
+ sentry_sdk/integrations/__pycache__/dramatiq.cpython-310.pyc,,
103
+ sentry_sdk/integrations/__pycache__/excepthook.cpython-310.pyc,,
104
+ sentry_sdk/integrations/__pycache__/executing.cpython-310.pyc,,
105
+ sentry_sdk/integrations/__pycache__/falcon.cpython-310.pyc,,
106
+ sentry_sdk/integrations/__pycache__/fastapi.cpython-310.pyc,,
107
+ sentry_sdk/integrations/__pycache__/flask.cpython-310.pyc,,
108
+ sentry_sdk/integrations/__pycache__/gcp.cpython-310.pyc,,
109
+ sentry_sdk/integrations/__pycache__/gnu_backtrace.cpython-310.pyc,,
110
+ sentry_sdk/integrations/__pycache__/gql.cpython-310.pyc,,
111
+ sentry_sdk/integrations/__pycache__/graphene.cpython-310.pyc,,
112
+ sentry_sdk/integrations/__pycache__/httpx.cpython-310.pyc,,
113
+ sentry_sdk/integrations/__pycache__/huey.cpython-310.pyc,,
114
+ sentry_sdk/integrations/__pycache__/huggingface_hub.cpython-310.pyc,,
115
+ sentry_sdk/integrations/__pycache__/langchain.cpython-310.pyc,,
116
+ sentry_sdk/integrations/__pycache__/langgraph.cpython-310.pyc,,
117
+ sentry_sdk/integrations/__pycache__/launchdarkly.cpython-310.pyc,,
118
+ sentry_sdk/integrations/__pycache__/litellm.cpython-310.pyc,,
119
+ sentry_sdk/integrations/__pycache__/litestar.cpython-310.pyc,,
120
+ sentry_sdk/integrations/__pycache__/logging.cpython-310.pyc,,
121
+ sentry_sdk/integrations/__pycache__/loguru.cpython-310.pyc,,
122
+ sentry_sdk/integrations/__pycache__/mcp.cpython-310.pyc,,
123
+ sentry_sdk/integrations/__pycache__/modules.cpython-310.pyc,,
124
+ sentry_sdk/integrations/__pycache__/openai.cpython-310.pyc,,
125
+ sentry_sdk/integrations/__pycache__/openfeature.cpython-310.pyc,,
126
+ sentry_sdk/integrations/__pycache__/otlp.cpython-310.pyc,,
127
+ sentry_sdk/integrations/__pycache__/pure_eval.cpython-310.pyc,,
128
+ sentry_sdk/integrations/__pycache__/pymongo.cpython-310.pyc,,
129
+ sentry_sdk/integrations/__pycache__/pyramid.cpython-310.pyc,,
130
+ sentry_sdk/integrations/__pycache__/quart.cpython-310.pyc,,
131
+ sentry_sdk/integrations/__pycache__/ray.cpython-310.pyc,,
132
+ sentry_sdk/integrations/__pycache__/rq.cpython-310.pyc,,
133
+ sentry_sdk/integrations/__pycache__/rust_tracing.cpython-310.pyc,,
134
+ sentry_sdk/integrations/__pycache__/sanic.cpython-310.pyc,,
135
+ sentry_sdk/integrations/__pycache__/serverless.cpython-310.pyc,,
136
+ sentry_sdk/integrations/__pycache__/socket.cpython-310.pyc,,
137
+ sentry_sdk/integrations/__pycache__/sqlalchemy.cpython-310.pyc,,
138
+ sentry_sdk/integrations/__pycache__/starlette.cpython-310.pyc,,
139
+ sentry_sdk/integrations/__pycache__/starlite.cpython-310.pyc,,
140
+ sentry_sdk/integrations/__pycache__/statsig.cpython-310.pyc,,
141
+ sentry_sdk/integrations/__pycache__/stdlib.cpython-310.pyc,,
142
+ sentry_sdk/integrations/__pycache__/strawberry.cpython-310.pyc,,
143
+ sentry_sdk/integrations/__pycache__/sys_exit.cpython-310.pyc,,
144
+ sentry_sdk/integrations/__pycache__/threading.cpython-310.pyc,,
145
+ sentry_sdk/integrations/__pycache__/tornado.cpython-310.pyc,,
146
+ sentry_sdk/integrations/__pycache__/trytond.cpython-310.pyc,,
147
+ sentry_sdk/integrations/__pycache__/typer.cpython-310.pyc,,
148
+ sentry_sdk/integrations/__pycache__/unleash.cpython-310.pyc,,
149
+ sentry_sdk/integrations/__pycache__/unraisablehook.cpython-310.pyc,,
150
+ sentry_sdk/integrations/__pycache__/wsgi.cpython-310.pyc,,
151
+ sentry_sdk/integrations/_asgi_common.py,sha256=qY2nH21YGtQ1EufzdrovHtGZ-ZaMbSzYNKCo8z-kD44,3145
152
+ sentry_sdk/integrations/_wsgi_common.py,sha256=ffyvbYSYtVNo8wkzx7tt1T7anuMiu2ixApZmC0O9NH4,7282
153
+ sentry_sdk/integrations/aiohttp.py,sha256=vQrqPm_IVgvgQo4PLEyDNrvA5oloz1xALOFtVDTtOpE,12930
154
+ sentry_sdk/integrations/anthropic.py,sha256=Y-Ka4FRtEyzefdh4whN1SJMsQ8P60CcKPwopy_ug-lg,22132
155
+ sentry_sdk/integrations/argv.py,sha256=3dyTYcNVhx-EoCxzZI8-JO1mxydBo_zHxIKHpLJgJcc,877
156
+ sentry_sdk/integrations/ariadne.py,sha256=u1X6QEcXfwBXa4mmHkgcj8XMoowwBGIWQQYAsItpjwg,5792
157
+ sentry_sdk/integrations/arq.py,sha256=3hs8Y41X3rjxCd769CHjUBYQe3YgULtbX6WQQB5-kwQ,7906
158
+ sentry_sdk/integrations/asgi.py,sha256=AoJcWDRkmm5vqSMH44V2zx00BiT9Kzqfo3pd3Eyi6D8,12687
159
+ sentry_sdk/integrations/asyncio.py,sha256=nszg5HkxWLoTzfS3EZ9hBzsCC7JM8JKOBFXbNXnCDpI,6994
160
+ sentry_sdk/integrations/asyncpg.py,sha256=T0Ijpln-xoQCuY0AS15dYZK2_1XCdKYT1J9EfdSQURo,6578
161
+ sentry_sdk/integrations/atexit.py,sha256=eUcgC6f7WoqJadxDbn76dBv6zoS97kgyxshjGBNK1us,1567
162
+ sentry_sdk/integrations/aws_lambda.py,sha256=HDvJk2EpOjS0_2wkTXc9lQr2w-huT7v3j4_-Pxq0KPw,17895
163
+ sentry_sdk/integrations/beam.py,sha256=j-BzEzAHXk12HJ8izUyIOaM02d29BZUpYldBMCq8vdI,5092
164
+ sentry_sdk/integrations/boto3.py,sha256=4HLGehOoU8rc-85yL5ATUUZL9x_TGYjPkNYHOcT4Z2w,4341
165
+ sentry_sdk/integrations/bottle.py,sha256=Im8xqoQvrygqKHsK-rtaX41gOaY_hxb4anjgJnZQGu4,6404
166
+ sentry_sdk/integrations/celery/__init__.py,sha256=LTWUX6mEsf93fITkcLUV1exm7Rk12DY6JUGKH_gPXCI,18497
167
+ sentry_sdk/integrations/celery/__pycache__/__init__.cpython-310.pyc,,
168
+ sentry_sdk/integrations/celery/__pycache__/beat.cpython-310.pyc,,
169
+ sentry_sdk/integrations/celery/__pycache__/utils.cpython-310.pyc,,
170
+ sentry_sdk/integrations/celery/beat.py,sha256=RCG2yAyJSyWtzDGw6B1M_w3TXDvPnznAt1dhfFcLBDI,8839
171
+ sentry_sdk/integrations/celery/utils.py,sha256=KyaM868RGak0JeFHkQVYtR1CkKRNpSD4_bbpisF5jqo,1152
172
+ sentry_sdk/integrations/chalice.py,sha256=nd_J4MnPZzoVdH4M5HV_-ljeS8fbxe_5DXmKJm6zqSI,4663
173
+ sentry_sdk/integrations/clickhouse_driver.py,sha256=mNYW99LlIOCk45aUeELY9cuHTfBorhwV0rGn2c_25EY,5905
174
+ sentry_sdk/integrations/cloud_resource_context.py,sha256=J_3Zd9czyI2NuWy09BEwGKzw80rQlVlJ1CQqTvJ5m18,7638
175
+ sentry_sdk/integrations/cohere.py,sha256=QxgvN7fy385-EwUPYFup98UiMxxg_zrE8h0yCfI5iT8,9495
176
+ sentry_sdk/integrations/dedupe.py,sha256=EApcjbAp_uEmsOSb0m64JNGaKUEqB46YCYX8AgTDO24,1903
177
+ sentry_sdk/integrations/django/__init__.py,sha256=T2N0ZnN4aI4AGJvoyNtYBBXtAKPrN3suuQPQi1Ks_r8,26421
178
+ sentry_sdk/integrations/django/__pycache__/__init__.cpython-310.pyc,,
179
+ sentry_sdk/integrations/django/__pycache__/asgi.cpython-310.pyc,,
180
+ sentry_sdk/integrations/django/__pycache__/caching.cpython-310.pyc,,
181
+ sentry_sdk/integrations/django/__pycache__/middleware.cpython-310.pyc,,
182
+ sentry_sdk/integrations/django/__pycache__/signals_handlers.cpython-310.pyc,,
183
+ sentry_sdk/integrations/django/__pycache__/tasks.cpython-310.pyc,,
184
+ sentry_sdk/integrations/django/__pycache__/templates.cpython-310.pyc,,
185
+ sentry_sdk/integrations/django/__pycache__/transactions.cpython-310.pyc,,
186
+ sentry_sdk/integrations/django/__pycache__/views.cpython-310.pyc,,
187
+ sentry_sdk/integrations/django/asgi.py,sha256=xi4ceuIgjFsvyBwzGOwHj_siLHqeYHuL5oLfPqDxPKQ,8436
188
+ sentry_sdk/integrations/django/caching.py,sha256=gXRDSZigV1SETmxDUe8GA53Tha2fo0ZAFOofuorQD30,6980
189
+ sentry_sdk/integrations/django/middleware.py,sha256=kSN4ORVUuO8Yvt0sC6YS8br2gk6gLmBwysIFsN9z2js,5917
190
+ sentry_sdk/integrations/django/signals_handlers.py,sha256=E1r1sYzKQHko6fD8bPC7_rXGH5kBVDwmE2sutWuGAwQ,3062
191
+ sentry_sdk/integrations/django/tasks.py,sha256=Bu_5jxvFNcAk9N8PedxhWP5Fq-Mj8zVRYdDRsd-6eJA,1151
192
+ sentry_sdk/integrations/django/templates.py,sha256=NZuSVDU0srkF_La5BpEIGqonCbK-qLKMMI3bqj2za3w,5695
193
+ sentry_sdk/integrations/django/transactions.py,sha256=zjsJgVFJZX-c5H_I-TXeLrvrw3OvgAWgmxYO5nTdhfQ,4918
194
+ sentry_sdk/integrations/django/views.py,sha256=Cz2H_yeZkPixOksVoi5urp6Xeq5p0YdDsBWz5aEJan4,3256
195
+ sentry_sdk/integrations/dramatiq.py,sha256=OIq0lIUbabt9widLKGkyjhvx9MKXNF9atP1gTsLheuQ,7438
196
+ sentry_sdk/integrations/excepthook.py,sha256=lhbIwr1eIj3k8shtmUGDOWI7Qr-OaT5kbgeHj-F217g,2371
197
+ sentry_sdk/integrations/executing.py,sha256=O5R4pw999PIisy7uksrMkRx0SsmfBFKI1BEpI3cTDz4,1981
198
+ sentry_sdk/integrations/falcon.py,sha256=zWKFTzoOY92BryGKsjKDAhVxFDhyop4G02js6OlmIXY,9277
199
+ sentry_sdk/integrations/fastapi.py,sha256=eebHCt2FiR7YQCaRJVOnXurltMZ4phRCZaL6BXSEpVI,4485
200
+ sentry_sdk/integrations/flask.py,sha256=KGG2Jbcw9SdwADJLg5GmBnVq3VywK7qQwdPv97RldmA,8519
201
+ sentry_sdk/integrations/gcp.py,sha256=Fao0nrrBpiG8_GHygzh6VvmM8bpJq0mkvgTwu5LT1a4,8400
202
+ sentry_sdk/integrations/gnu_backtrace.py,sha256=XND4pkVeprhDdvPgOi8pBgQQ9g3CtPA-wJK0e0ex1XE,2771
203
+ sentry_sdk/integrations/google_genai/__init__.py,sha256=R_07o_qCgCH-EiWyEPoVxlREfvXETK2kwSUPQQSvFXA,11424
204
+ sentry_sdk/integrations/google_genai/__pycache__/__init__.cpython-310.pyc,,
205
+ sentry_sdk/integrations/google_genai/__pycache__/consts.cpython-310.pyc,,
206
+ sentry_sdk/integrations/google_genai/__pycache__/streaming.cpython-310.pyc,,
207
+ sentry_sdk/integrations/google_genai/__pycache__/utils.cpython-310.pyc,,
208
+ sentry_sdk/integrations/google_genai/consts.py,sha256=nqHKKSyGixrSoozA06BGVBFaUCsvZlvGoubUZGI1kB8,559
209
+ sentry_sdk/integrations/google_genai/streaming.py,sha256=JqhTcAX3DtEsZ033AXsnA0KAzQe_jqca-7cztTKDcRI,5416
210
+ sentry_sdk/integrations/google_genai/utils.py,sha256=WCTyevkQF2CdGpdlidONJSWSdDmnqEa0dcaiRX2luuk,34850
211
+ sentry_sdk/integrations/gql.py,sha256=oLssOmHYQ4e0OQ1ITer8TynvyLXtDUoM9X29-IsVAkI,5003
212
+ sentry_sdk/integrations/graphene.py,sha256=11XRvAsSgvCLcfF1xvdSeAf0vvJm72hfcE3toAS8jZI,5066
213
+ sentry_sdk/integrations/grpc/__init__.py,sha256=0Y3neOWwES1PsWJsluPF_2_VatFlVvg7IUjTYYdCs-U,6253
214
+ sentry_sdk/integrations/grpc/__pycache__/__init__.cpython-310.pyc,,
215
+ sentry_sdk/integrations/grpc/__pycache__/client.cpython-310.pyc,,
216
+ sentry_sdk/integrations/grpc/__pycache__/consts.cpython-310.pyc,,
217
+ sentry_sdk/integrations/grpc/__pycache__/server.cpython-310.pyc,,
218
+ sentry_sdk/integrations/grpc/aio/__init__.py,sha256=2rgrliowpPfLLw40_2YU6ixSzIu_3f8NN3TRplzc8S8,141
219
+ sentry_sdk/integrations/grpc/aio/__pycache__/__init__.cpython-310.pyc,,
220
+ sentry_sdk/integrations/grpc/aio/__pycache__/client.cpython-310.pyc,,
221
+ sentry_sdk/integrations/grpc/aio/__pycache__/server.cpython-310.pyc,,
222
+ sentry_sdk/integrations/grpc/aio/client.py,sha256=2GNrTWJt4iZ9dK-M3_0-sVWlUcfqKItHZI5u-uzesUM,3507
223
+ sentry_sdk/integrations/grpc/aio/server.py,sha256=cRBvz9GOJemvNOsCB9ymTUX70nhjljfzvX0bfR8Wc_o,3954
224
+ sentry_sdk/integrations/grpc/client.py,sha256=s7yLcbYgnq1-bdh6jvSOv6NwKTx0m9tLPt0q4qKI7kw,3404
225
+ sentry_sdk/integrations/grpc/consts.py,sha256=NpsN5gKWDmtGtVK_L5HscgFZBHqjOpmLJLGKyh8GZBA,31
226
+ sentry_sdk/integrations/grpc/server.py,sha256=M5QJUxQNE8c_OZdTXsWL92GbwVHrNhNCy6Zanq4lH_E,2433
227
+ sentry_sdk/integrations/httpx.py,sha256=GuZdi2WtJeyAhvyrl0M3J5bGNfw9HrJs1TxWjxkaeGA,5159
228
+ sentry_sdk/integrations/huey.py,sha256=GOslGxuYfrdPLqx_4MWOH_tdwwnbD72SkTdc-P8uF80,5348
229
+ sentry_sdk/integrations/huggingface_hub.py,sha256=axCqdDlmYn7wANHgVBo3MDv9QgBr0MWj3lBYhPJJX7E,14966
230
+ sentry_sdk/integrations/langchain.py,sha256=Oa-YJ2WoHX8Huyrzs4aQ2xlaupFR5Ft8FC4_0b_zvBs,42903
231
+ sentry_sdk/integrations/langgraph.py,sha256=xb9InjYjd4jAQECWddl30QGRoHRbbhoYBeHscsM7C1A,13301
232
+ sentry_sdk/integrations/launchdarkly.py,sha256=RSTCAUOJCo6Npr4V3-7-vSOaZ531Jj1LNU5IftXL6_w,1918
233
+ sentry_sdk/integrations/litellm.py,sha256=1CLM3CBdIv0YZSloDPCfemIdlufNG41eWvCBRG_AFow,11550
234
+ sentry_sdk/integrations/litestar.py,sha256=oJIz1vv2JgIT_AriKXDTQvQjkMOmwKfT68DFrCfdJ-8,11698
235
+ sentry_sdk/integrations/logging.py,sha256=eLjza7xDrfBszOH4gDHxPtSM3WfiWsw9WGR3GUfnA-A,13739
236
+ sentry_sdk/integrations/loguru.py,sha256=2UaLLzXVEOV0cYxOU5n9GpkmNtC_bA1KzCzEnrqIilE,6505
237
+ sentry_sdk/integrations/mcp.py,sha256=4t7cVGwqjoqyNSd4HrwzjfM7fw2B5HYWRJoT6wOw6AA,22192
238
+ sentry_sdk/integrations/modules.py,sha256=7kmS9T-werRkKN0w51skyDmTMuZbdz9L28RgXPsoDeU,786
239
+ sentry_sdk/integrations/openai.py,sha256=FegxXw6BSfwWg3gHWDD8K3UtZYxYOgw59b92A5RIBio,38434
240
+ sentry_sdk/integrations/openai_agents/__init__.py,sha256=0FHafAmsKZKNtijv3ZRxS9b2xoUvfHbbgFuWZ3eSbRo,10709
241
+ sentry_sdk/integrations/openai_agents/__pycache__/__init__.cpython-310.pyc,,
242
+ sentry_sdk/integrations/openai_agents/__pycache__/consts.cpython-310.pyc,,
243
+ sentry_sdk/integrations/openai_agents/__pycache__/utils.cpython-310.pyc,,
244
+ sentry_sdk/integrations/openai_agents/consts.py,sha256=PTb3vlqkuMPktu21ALK72o5WMIX4-cewTEiTRdHKFdQ,38
245
+ sentry_sdk/integrations/openai_agents/patches/__init__.py,sha256=62qvLBPGajoxGi4C41eBOztIiB8MGRpmP2i3GSD_22k,383
246
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/__init__.cpython-310.pyc,,
247
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/agent_run.cpython-310.pyc,,
248
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/error_tracing.cpython-310.pyc,,
249
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/models.cpython-310.pyc,,
250
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/runner.cpython-310.pyc,,
251
+ sentry_sdk/integrations/openai_agents/patches/__pycache__/tools.cpython-310.pyc,,
252
+ sentry_sdk/integrations/openai_agents/patches/agent_run.py,sha256=OhLQLEB7LQEMRs6BkQ0jfyY6QaZ-lhP5yZ_b44KTRV0,8257
253
+ sentry_sdk/integrations/openai_agents/patches/error_tracing.py,sha256=Fzs4oAyGWnmbaeLMMRnr9m6F6M2N9Cm0i4GSPsJbNqI,2237
254
+ sentry_sdk/integrations/openai_agents/patches/models.py,sha256=mKUbs01jhNIs06fKgP6nraRB-5m_UvCGkvK0Xu4cuDg,7278
255
+ sentry_sdk/integrations/openai_agents/patches/runner.py,sha256=gJLrC334MrfcSCxG93__iOh3jcROGWw4YKHXcHJ5dYY,6837
256
+ sentry_sdk/integrations/openai_agents/patches/tools.py,sha256=9I7GOIY-X3WyegTMMq-KIbs5DQ3Qg5JHHtIrEU3eivA,2823
257
+ sentry_sdk/integrations/openai_agents/spans/__init__.py,sha256=uzqInMjqfA_MtdTJoRRH10Z4cVtVESbi7qc5sC_zr8U,393
258
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/__init__.cpython-310.pyc,,
259
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/agent_workflow.cpython-310.pyc,,
260
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/ai_client.cpython-310.pyc,,
261
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/execute_tool.cpython-310.pyc,,
262
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/handoff.cpython-310.pyc,,
263
+ sentry_sdk/integrations/openai_agents/spans/__pycache__/invoke_agent.cpython-310.pyc,,
264
+ sentry_sdk/integrations/openai_agents/spans/agent_workflow.py,sha256=lqr87hbaV1GCXX40cGQLSlf3U6V-nmD2zj5kr2w9kmk,459
265
+ sentry_sdk/integrations/openai_agents/spans/ai_client.py,sha256=RbJNDn9DXM4NJLHJBIodRp1GK-kQmclYCD5DgOV2WTI,2265
266
+ sentry_sdk/integrations/openai_agents/spans/execute_tool.py,sha256=ePm9PMnEzoYZW8M04dnDRINV7dRnDKtHa4YFn1InqZY,1612
267
+ sentry_sdk/integrations/openai_agents/spans/handoff.py,sha256=icCbs6HOFrVXY4V1LILCoyV-qxNntIBhgx8AFHW6MGo,723
268
+ sentry_sdk/integrations/openai_agents/spans/invoke_agent.py,sha256=VWB1HmR3oyoTqi3ZrHIHY37ageQnPsap5C81bLcxrOA,3592
269
+ sentry_sdk/integrations/openai_agents/utils.py,sha256=IW-S6m5hM9qaAmcKrv5JvaWStcBJn9saJHNDE7dE0G4,8848
270
+ sentry_sdk/integrations/openfeature.py,sha256=w6bYjrHJdjIpziEvEBocCbxdryO2eDZGGOoc7g8jNEU,1102
271
+ sentry_sdk/integrations/opentelemetry/__init__.py,sha256=emNL5aAq_NhK0PZmfX_g4GIdvBS6nHqGrjrIgrdC5m8,229
272
+ sentry_sdk/integrations/opentelemetry/__pycache__/__init__.cpython-310.pyc,,
273
+ sentry_sdk/integrations/opentelemetry/__pycache__/consts.cpython-310.pyc,,
274
+ sentry_sdk/integrations/opentelemetry/__pycache__/integration.cpython-310.pyc,,
275
+ sentry_sdk/integrations/opentelemetry/__pycache__/propagator.cpython-310.pyc,,
276
+ sentry_sdk/integrations/opentelemetry/__pycache__/span_processor.cpython-310.pyc,,
277
+ sentry_sdk/integrations/opentelemetry/consts.py,sha256=6yhH65VVzzIjpU8MRYItLKkskkBsLlbsO-_2MULlEHQ,275
278
+ sentry_sdk/integrations/opentelemetry/integration.py,sha256=VPQlj-tDBgjSRXOxtrxeFpv9Mc_OqX7cC997gMy4CkY,1742
279
+ sentry_sdk/integrations/opentelemetry/propagator.py,sha256=ofVK4IJ9zhSN0cRmw_Cr15IHK0XckmBy8WqA_oaGa5Q,3973
280
+ sentry_sdk/integrations/opentelemetry/span_processor.py,sha256=YK-k88VMoJNrOEXMqYaVM_Y-FywN2hQjdrodLeqGegw,13222
281
+ sentry_sdk/integrations/otlp.py,sha256=5h0hFY19myYSg_buSAutomC_8_BfRtDyHyLE9XD_A8A,7713
282
+ sentry_sdk/integrations/pure_eval.py,sha256=SLN-omknLQWyeH1_3v3Qi-puFCAliYKQqi0wdDt3Keg,4560
283
+ sentry_sdk/integrations/pydantic_ai/__init__.py,sha256=YrUxvNgPIznxzVaniyLTorkkTmlYyosAbA37tFOTR68,1465
284
+ sentry_sdk/integrations/pydantic_ai/__pycache__/__init__.cpython-310.pyc,,
285
+ sentry_sdk/integrations/pydantic_ai/__pycache__/consts.cpython-310.pyc,,
286
+ sentry_sdk/integrations/pydantic_ai/__pycache__/utils.cpython-310.pyc,,
287
+ sentry_sdk/integrations/pydantic_ai/consts.py,sha256=fxOQ5n_Do8EqqqxtOJm5zyvhQmOV75HACNrt_-zGngs,36
288
+ sentry_sdk/integrations/pydantic_ai/patches/__init__.py,sha256=_RHvjc3436KSwPjzrAdnyascgggxg5e0MQpdHhmiS-U,229
289
+ sentry_sdk/integrations/pydantic_ai/patches/__pycache__/__init__.cpython-310.pyc,,
290
+ sentry_sdk/integrations/pydantic_ai/patches/__pycache__/agent_run.cpython-310.pyc,,
291
+ sentry_sdk/integrations/pydantic_ai/patches/__pycache__/graph_nodes.cpython-310.pyc,,
292
+ sentry_sdk/integrations/pydantic_ai/patches/__pycache__/model_request.cpython-310.pyc,,
293
+ sentry_sdk/integrations/pydantic_ai/patches/__pycache__/tools.cpython-310.pyc,,
294
+ sentry_sdk/integrations/pydantic_ai/patches/agent_run.py,sha256=iGafWMXefgs_1HQfV_rK4Pe5wJex4vLbAdX-O83fxQQ,7345
295
+ sentry_sdk/integrations/pydantic_ai/patches/graph_nodes.py,sha256=TDkIjRUxGGt0UbC3FzgaCJNJN1s682IXoVFO07biL6E,3793
296
+ sentry_sdk/integrations/pydantic_ai/patches/model_request.py,sha256=15uGRv0UXjZcEc9b6Jzx7o9yhToUQfd4KRLZm_OWMm8,1240
297
+ sentry_sdk/integrations/pydantic_ai/patches/tools.py,sha256=2TtPbiqkQZCVHuYJWpxldu2hrjsg0a-09A0CA_kAnuU,6868
298
+ sentry_sdk/integrations/pydantic_ai/spans/__init__.py,sha256=dTUjvkw7VMOAiSasuAq37q_njvANsUlgfZxgXRKJDDo,243
299
+ sentry_sdk/integrations/pydantic_ai/spans/__pycache__/__init__.cpython-310.pyc,,
300
+ sentry_sdk/integrations/pydantic_ai/spans/__pycache__/ai_client.cpython-310.pyc,,
301
+ sentry_sdk/integrations/pydantic_ai/spans/__pycache__/execute_tool.cpython-310.pyc,,
302
+ sentry_sdk/integrations/pydantic_ai/spans/__pycache__/invoke_agent.cpython-310.pyc,,
303
+ sentry_sdk/integrations/pydantic_ai/spans/__pycache__/utils.cpython-310.pyc,,
304
+ sentry_sdk/integrations/pydantic_ai/spans/ai_client.py,sha256=nHjgNoBfzcdbXicBchRJV1A4om5BkgC-cfoB_GPN8Y0,10496
305
+ sentry_sdk/integrations/pydantic_ai/spans/execute_tool.py,sha256=0k-eIN1tltSOQf2kFdUMGKbyWhKYTNZE8dJF9vkOfnE,1542
306
+ sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py,sha256=Mbq_7NkqD5oyjY-_AOhblliYNT_Ij6z-MEMfZl4xyyY,5742
307
+ sentry_sdk/integrations/pydantic_ai/spans/utils.py,sha256=VSWLcgjrUwNSR_31TFM5BRG0EsGrc3X8BWIxM4v0HZI,1763
308
+ sentry_sdk/integrations/pydantic_ai/utils.py,sha256=OWFa15_jQ7H4gHfMAUQHmSVclLVrF_DBb7heaPZ89HY,7091
309
+ sentry_sdk/integrations/pymongo.py,sha256=whIHxnsiz245UNT7yKMP1OqfAsBdC7ITy7kuice0uwE,6275
310
+ sentry_sdk/integrations/pyramid.py,sha256=EzK6W2VB4DdDfV_VXnp5ERibM27mVK-JGib3k9Khc4E,7208
311
+ sentry_sdk/integrations/quart.py,sha256=4GTx6E7auhLeYXyY8WoloqSghbeU14Jcz-gfDL4o3aE,7258
312
+ sentry_sdk/integrations/ray.py,sha256=8zLUo2ZFl9KEt88X-yJYVVoDphJUTWRZRT0I5OQ1PCk,5884
313
+ sentry_sdk/integrations/redis/__init__.py,sha256=TzeEWrYcDO9u3q5WXT8J9Zk5Ft9nrWW1PsE3i0ULGUg,1662
314
+ sentry_sdk/integrations/redis/__pycache__/__init__.cpython-310.pyc,,
315
+ sentry_sdk/integrations/redis/__pycache__/_async_common.cpython-310.pyc,,
316
+ sentry_sdk/integrations/redis/__pycache__/_sync_common.cpython-310.pyc,,
317
+ sentry_sdk/integrations/redis/__pycache__/consts.cpython-310.pyc,,
318
+ sentry_sdk/integrations/redis/__pycache__/rb.cpython-310.pyc,,
319
+ sentry_sdk/integrations/redis/__pycache__/redis.cpython-310.pyc,,
320
+ sentry_sdk/integrations/redis/__pycache__/redis_cluster.cpython-310.pyc,,
321
+ sentry_sdk/integrations/redis/__pycache__/redis_py_cluster_legacy.cpython-310.pyc,,
322
+ sentry_sdk/integrations/redis/__pycache__/utils.cpython-310.pyc,,
323
+ sentry_sdk/integrations/redis/_async_common.py,sha256=V05_CgSyWBKBLQ4Udkg4LT5ovPAnP5iqsvfeqsmLEwU,4058
324
+ sentry_sdk/integrations/redis/_sync_common.py,sha256=3seE5lTc2fDNLXutpe41Qv-3pdRVbLHFGCQaT9OXzvc,3776
325
+ sentry_sdk/integrations/redis/consts.py,sha256=y2f-FJ7TIkzto01tyjXvbKVSVELVkjZaxj3FG5DZ0hA,480
326
+ sentry_sdk/integrations/redis/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
327
+ sentry_sdk/integrations/redis/modules/__pycache__/__init__.cpython-310.pyc,,
328
+ sentry_sdk/integrations/redis/modules/__pycache__/caches.cpython-310.pyc,,
329
+ sentry_sdk/integrations/redis/modules/__pycache__/queries.cpython-310.pyc,,
330
+ sentry_sdk/integrations/redis/modules/caches.py,sha256=cV64P6UWHXolvTtog5jQFHtR4XFd5IqA5vVYXc8xO2E,4020
331
+ sentry_sdk/integrations/redis/modules/queries.py,sha256=lRwn72AUvk5a29n43UEpx6l9ix_xC2htHcl4cHKsdcw,1941
332
+ sentry_sdk/integrations/redis/rb.py,sha256=we3oh4fEhiirglutAllZe55sAoz6vKtaQt1tvLPGoX4,791
333
+ sentry_sdk/integrations/redis/redis.py,sha256=NaaefF_0poC8-9citN6etyAC6WOabxBVOdH_J8FJ7ec,1684
334
+ sentry_sdk/integrations/redis/redis_cluster.py,sha256=rBbj1WRa_-NAR6tTQHKQMF40WjvNb6o6FoojImIE03Y,3530
335
+ sentry_sdk/integrations/redis/redis_py_cluster_legacy.py,sha256=YREwCLBkx_SDVkzNLGNcgCr4yi_mdomlwgKlVU8bgSU,1570
336
+ sentry_sdk/integrations/redis/utils.py,sha256=i818myPF61yl4EIS-t3ptyYCa2IrsaAWeFR0cqS0QNY,3954
337
+ sentry_sdk/integrations/rq.py,sha256=kEyWh-Q95B4iFOKBbweDIvjcukPL0W47ctwL9z1FCWU,5786
338
+ sentry_sdk/integrations/rust_tracing.py,sha256=p3aFy8Gs8Dgvvlv9PSrbl7JDYmA5zus-fTichRzTiLM,9101
339
+ sentry_sdk/integrations/sanic.py,sha256=OJ570xdV4luxJY9_b4gutVf8gQhNpqyZHxyT3evydLM,12700
340
+ sentry_sdk/integrations/serverless.py,sha256=eZSd0NPYBm3ZGdYFmDYlXDtAD_Pe_aUGV77bCzJhoEI,1621
341
+ sentry_sdk/integrations/socket.py,sha256=fj-4yzw7uecKDa4Jl_8AN_Nb9KSIvCh3iR8oqaLsYaQ,3164
342
+ sentry_sdk/integrations/spark/__init__.py,sha256=oOewMErnZk2rzNvIlZO6URxQexu9bUJuSLM2m_zECy8,208
343
+ sentry_sdk/integrations/spark/__pycache__/__init__.cpython-310.pyc,,
344
+ sentry_sdk/integrations/spark/__pycache__/spark_driver.cpython-310.pyc,,
345
+ sentry_sdk/integrations/spark/__pycache__/spark_worker.cpython-310.pyc,,
346
+ sentry_sdk/integrations/spark/spark_driver.py,sha256=mYX1ohjUD7wrc7F16OhvNyyOGqgQ7QM6bFzfBb_MUZY,8896
347
+ sentry_sdk/integrations/spark/spark_worker.py,sha256=PtRzOBjrG0__Au-Uidd8cO5zpx-EJY_D13H9CG900RE,3632
348
+ sentry_sdk/integrations/sqlalchemy.py,sha256=Q6JQxDcwo2U-3ggB_wUhQZps1gzzXz6-Yf20dcCMUWU,4347
349
+ sentry_sdk/integrations/starlette.py,sha256=1cSqN0IARPGi6kLitW93ASlTJIAFFUxsyWnS8QMMzJY,26130
350
+ sentry_sdk/integrations/starlite.py,sha256=GC_FaL-cyjeUtsRIJ29jMR4HlYXRwI-JRYy7GFn5QAI,10451
351
+ sentry_sdk/integrations/statsig.py,sha256=ceSjGymN4Fqdnk8Tz-L5teHz0eNOJtptB_W0Y1VZu2o,1214
352
+ sentry_sdk/integrations/stdlib.py,sha256=2yN0_v-fokZwgfnsKBvcIdl4tQ-QpLUnoQzYyOX_gH4,9376
353
+ sentry_sdk/integrations/strawberry.py,sha256=cTY1L8ihyR5mCiF2H5ZEM59t0BMwNmWqwNkTIuIrFUA,14120
354
+ sentry_sdk/integrations/sys_exit.py,sha256=nLbBnbyPjUgyhsI1VkmTxVAOgdlenf-dFtIqzFTZNOI,2408
355
+ sentry_sdk/integrations/threading.py,sha256=jUsmnGEPoi6XGhuLZP3pWKJCDksul-e7uLwAyPK_vUI,7107
356
+ sentry_sdk/integrations/tornado.py,sha256=jh_tm6UR-m-OPFlTKD4eOYEsyex2Lm9rw7_UpZ-1dCQ,7212
357
+ sentry_sdk/integrations/trytond.py,sha256=FjAKIKDTRmEc1JUFsHkcZhslCOD7RsT-pKYoSg1Qyuk,1750
358
+ sentry_sdk/integrations/typer.py,sha256=hvLL7llTverbhjdC8eU5r0ps39XVf2qI27C35VWyXrE,1833
359
+ sentry_sdk/integrations/unleash.py,sha256=Gz3qAKB0fTtOgzCOJV24ocW1NbdcDkkqijrWDE6Oi7E,1045
360
+ sentry_sdk/integrations/unraisablehook.py,sha256=zThW8f6uFGFfwpPHFXq_pLbnaQRT-1tmltyOPVfTPzM,1717
361
+ sentry_sdk/integrations/wsgi.py,sha256=y7Wrge2IQ63aBq8jlhqfURoYpZSipg9zn-86Odg9gQ4,11823
362
+ sentry_sdk/logger.py,sha256=3hfleFTl9n6ZlZeb-F8jVVMGoae_SU8fOZd0N6HWbuA,2683
363
+ sentry_sdk/metrics.py,sha256=z8futlRltjsPeTkU_We4HAanxeopDaWtfJTkAumwL68,1470
364
+ sentry_sdk/monitor.py,sha256=YRmomlJySjuuCHLJPgGMhRbHXun651He5QZXUvKWZp0,3443
365
+ sentry_sdk/profiler/__init__.py,sha256=3PI3bHk9RSkkOXZKN84DDedk_7M65EiqqaIGo-DYs0E,1291
366
+ sentry_sdk/profiler/__pycache__/__init__.cpython-310.pyc,,
367
+ sentry_sdk/profiler/__pycache__/continuous_profiler.cpython-310.pyc,,
368
+ sentry_sdk/profiler/__pycache__/transaction_profiler.cpython-310.pyc,,
369
+ sentry_sdk/profiler/__pycache__/utils.cpython-310.pyc,,
370
+ sentry_sdk/profiler/continuous_profiler.py,sha256=lRZa2yF81ByIh1yQVHdsK-Ur5jRMR6aKJuPCkuHn0pI,22550
371
+ sentry_sdk/profiler/transaction_profiler.py,sha256=AJicxLx2aPcnTBm5E6GGx_34j-y2yD907_OsHtN6xyQ,27248
372
+ sentry_sdk/profiler/utils.py,sha256=Y-GN2SoAKa12nxwUQRvI5LTYEWfIkhOvoCPG6B4K_N0,6397
373
+ sentry_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
+ sentry_sdk/scope.py,sha256=HtA_ivY_Syuw2sxXiXCgp1PsRg46CetAuVeth_slfzk,68615
375
+ sentry_sdk/scrubber.py,sha256=pEJECHaWzg0vf93S_uYe9PgStTImDXjLFu0pzIJ6XAM,5953
376
+ sentry_sdk/serializer.py,sha256=W3HrcoJ9iMzHa6j9Nmu5Y7Qopbkon3ovxuPxRM5R4pU,13199
377
+ sentry_sdk/session.py,sha256=ajYuxKt5cKfxl_OjcF0-g5IpowrJhvMe9rjTq1CaQac,5274
378
+ sentry_sdk/sessions.py,sha256=-k0OGB28DoWbb7nIW4ML8R_fiF5nLnboWqObnfyZnWQ,8932
379
+ sentry_sdk/spotlight.py,sha256=0bJrMpoT47xS2LJzpDfUZ5z5YEhdUla78r0YDtVm2Zo,12191
380
+ sentry_sdk/traces.py,sha256=1oVGyMonl10vIrFokfD5UBHXQoPIu4rP2rtnKL3Ju6Y,4568
381
+ sentry_sdk/tracing.py,sha256=OkIHt-BYfYhLe9MyEcTUlgN_n0CjqQn-BJ0K_9gnxaY,50512
382
+ sentry_sdk/tracing_utils.py,sha256=aItaWdi76Q0-HGsILrkNesctXp76BkriTol-jXSZjfI,43300
383
+ sentry_sdk/transport.py,sha256=P21HMCcD58PJfRNPA7Y39hlMqIFK5RsPCMwsy-QzXAQ,32141
384
+ sentry_sdk/types.py,sha256=A92AqvfrGQZ9KY6FaUjKfL9F1HK7Ui3heQilVzfzYCs,1269
385
+ sentry_sdk/utils.py,sha256=GHNtXHJYBUeMHd2U7lyhCxpeGJhZMgLKRE-I5jkxZD4,65189
386
+ sentry_sdk/worker.py,sha256=djRCygOJFRmdXBS4lRSF4RTljVZ47BWEal85WlTD0uo,4257
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/WHEEL ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
6
+
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [opentelemetry_propagator]
2
+ sentry = sentry_sdk.integrations.opentelemetry:SentryPropagator
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Functional Software, Inc. dba Sentry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk-2.54.0.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ sentry_sdk
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/__init__.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sentry_sdk import profiler
2
+ from sentry_sdk import metrics
3
+ from sentry_sdk.scope import Scope
4
+ from sentry_sdk.transport import Transport, HttpTransport
5
+ from sentry_sdk.client import Client
6
+
7
+ from sentry_sdk.api import * # noqa
8
+ from sentry_sdk.consts import VERSION
9
+
10
+ __all__ = [ # noqa
11
+ "Hub",
12
+ "Scope",
13
+ "Client",
14
+ "Transport",
15
+ "HttpTransport",
16
+ "VERSION",
17
+ "integrations",
18
+ # From sentry_sdk.api
19
+ "init",
20
+ "add_attachment",
21
+ "add_breadcrumb",
22
+ "capture_event",
23
+ "capture_exception",
24
+ "capture_message",
25
+ "configure_scope",
26
+ "continue_trace",
27
+ "flush",
28
+ "get_baggage",
29
+ "get_client",
30
+ "get_global_scope",
31
+ "get_isolation_scope",
32
+ "get_current_scope",
33
+ "get_current_span",
34
+ "get_traceparent",
35
+ "is_initialized",
36
+ "isolation_scope",
37
+ "last_event_id",
38
+ "new_scope",
39
+ "push_scope",
40
+ "remove_attribute",
41
+ "set_attribute",
42
+ "set_context",
43
+ "set_extra",
44
+ "set_level",
45
+ "set_measurement",
46
+ "set_tag",
47
+ "set_tags",
48
+ "set_user",
49
+ "start_span",
50
+ "start_transaction",
51
+ "trace",
52
+ "monitor",
53
+ "logger",
54
+ "metrics",
55
+ "profiler",
56
+ "start_session",
57
+ "end_session",
58
+ "set_transaction_name",
59
+ "update_current_span",
60
+ ]
61
+
62
+ # Initialize the debug support after everything is loaded
63
+ from sentry_sdk.debug import init_debug_support
64
+
65
+ init_debug_support()
66
+ del init_debug_support
67
+
68
+ # circular imports
69
+ from sentry_sdk.hub import Hub
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_batcher.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import random
3
+ import threading
4
+ from datetime import datetime, timezone
5
+ from typing import TYPE_CHECKING, TypeVar, Generic
6
+
7
+ from sentry_sdk.utils import format_timestamp, safe_repr, serialize_attribute
8
+ from sentry_sdk.envelope import Envelope, Item, PayloadRef
9
+
10
+ if TYPE_CHECKING:
11
+ from typing import Optional, Callable, Any
12
+
13
+ T = TypeVar("T")
14
+
15
+
16
+ class Batcher(Generic[T]):
17
+ MAX_BEFORE_FLUSH = 100
18
+ MAX_BEFORE_DROP = 1_000
19
+ FLUSH_WAIT_TIME = 5.0
20
+
21
+ TYPE = ""
22
+ CONTENT_TYPE = ""
23
+
24
+ def __init__(
25
+ self,
26
+ capture_func: "Callable[[Envelope], None]",
27
+ record_lost_func: "Callable[..., None]",
28
+ ) -> None:
29
+ self._buffer: "list[T]" = []
30
+ self._capture_func = capture_func
31
+ self._record_lost_func = record_lost_func
32
+ self._running = True
33
+ self._lock = threading.Lock()
34
+
35
+ self._flush_event: "threading.Event" = threading.Event()
36
+
37
+ self._flusher: "Optional[threading.Thread]" = None
38
+ self._flusher_pid: "Optional[int]" = None
39
+
40
+ def _ensure_thread(self) -> bool:
41
+ """For forking processes we might need to restart this thread.
42
+ This ensures that our process actually has that thread running.
43
+ """
44
+ if not self._running:
45
+ return False
46
+
47
+ pid = os.getpid()
48
+ if self._flusher_pid == pid:
49
+ return True
50
+
51
+ with self._lock:
52
+ # Recheck to make sure another thread didn't get here and start the
53
+ # the flusher in the meantime
54
+ if self._flusher_pid == pid:
55
+ return True
56
+
57
+ self._flusher_pid = pid
58
+
59
+ self._flusher = threading.Thread(target=self._flush_loop)
60
+ self._flusher.daemon = True
61
+
62
+ try:
63
+ self._flusher.start()
64
+ except RuntimeError:
65
+ # Unfortunately at this point the interpreter is in a state that no
66
+ # longer allows us to spawn a thread and we have to bail.
67
+ self._running = False
68
+ return False
69
+
70
+ return True
71
+
72
+ def _flush_loop(self) -> None:
73
+ while self._running:
74
+ self._flush_event.wait(self.FLUSH_WAIT_TIME + random.random())
75
+ self._flush_event.clear()
76
+ self._flush()
77
+
78
+ def add(self, item: "T") -> None:
79
+ if not self._ensure_thread() or self._flusher is None:
80
+ return None
81
+
82
+ with self._lock:
83
+ if len(self._buffer) >= self.MAX_BEFORE_DROP:
84
+ self._record_lost(item)
85
+ return None
86
+
87
+ self._buffer.append(item)
88
+ if len(self._buffer) >= self.MAX_BEFORE_FLUSH:
89
+ self._flush_event.set()
90
+
91
+ def kill(self) -> None:
92
+ if self._flusher is None:
93
+ return
94
+
95
+ self._running = False
96
+ self._flush_event.set()
97
+ self._flusher = None
98
+
99
+ def flush(self) -> None:
100
+ self._flush()
101
+
102
+ def _add_to_envelope(self, envelope: "Envelope") -> None:
103
+ envelope.add_item(
104
+ Item(
105
+ type=self.TYPE,
106
+ content_type=self.CONTENT_TYPE,
107
+ headers={
108
+ "item_count": len(self._buffer),
109
+ },
110
+ payload=PayloadRef(
111
+ json={
112
+ "items": [
113
+ self._to_transport_format(item) for item in self._buffer
114
+ ]
115
+ }
116
+ ),
117
+ )
118
+ )
119
+
120
+ def _flush(self) -> "Optional[Envelope]":
121
+ envelope = Envelope(
122
+ headers={"sent_at": format_timestamp(datetime.now(timezone.utc))}
123
+ )
124
+ with self._lock:
125
+ if len(self._buffer) == 0:
126
+ return None
127
+
128
+ self._add_to_envelope(envelope)
129
+ self._buffer.clear()
130
+
131
+ self._capture_func(envelope)
132
+ return envelope
133
+
134
+ def _record_lost(self, item: "T") -> None:
135
+ pass
136
+
137
+ @staticmethod
138
+ def _to_transport_format(item: "T") -> "Any":
139
+ pass
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_compat.py ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ if TYPE_CHECKING:
6
+ from typing import Any
7
+ from typing import TypeVar
8
+
9
+ T = TypeVar("T")
10
+
11
+
12
+ PY37 = sys.version_info[0] == 3 and sys.version_info[1] >= 7
13
+ PY38 = sys.version_info[0] == 3 and sys.version_info[1] >= 8
14
+ PY310 = sys.version_info[0] == 3 and sys.version_info[1] >= 10
15
+ PY311 = sys.version_info[0] == 3 and sys.version_info[1] >= 11
16
+
17
+
18
+ def with_metaclass(meta: "Any", *bases: "Any") -> "Any":
19
+ class MetaClass(type):
20
+ def __new__(metacls: "Any", name: "Any", this_bases: "Any", d: "Any") -> "Any":
21
+ return meta(name, bases, d)
22
+
23
+ return type.__new__(MetaClass, "temporary_class", (), {})
24
+
25
+
26
+ def check_uwsgi_thread_support() -> bool:
27
+ # We check two things here:
28
+ #
29
+ # 1. uWSGI doesn't run in threaded mode by default -- issue a warning if
30
+ # that's the case.
31
+ #
32
+ # 2. Additionally, if uWSGI is running in preforking mode (default), it needs
33
+ # the --py-call-uwsgi-fork-hooks option for the SDK to work properly. This
34
+ # is because any background threads spawned before the main process is
35
+ # forked are NOT CLEANED UP IN THE CHILDREN BY DEFAULT even if
36
+ # --enable-threads is on. One has to explicitly provide
37
+ # --py-call-uwsgi-fork-hooks to force uWSGI to run regular cpython
38
+ # after-fork hooks that take care of cleaning up stale thread data.
39
+ try:
40
+ from uwsgi import opt # type: ignore
41
+ except ImportError:
42
+ return True
43
+
44
+ from sentry_sdk.consts import FALSE_VALUES
45
+
46
+ def enabled(option: str) -> bool:
47
+ value = opt.get(option, False)
48
+ if isinstance(value, bool):
49
+ return value
50
+
51
+ if isinstance(value, bytes):
52
+ try:
53
+ value = value.decode()
54
+ except Exception:
55
+ pass
56
+
57
+ return value and str(value).lower() not in FALSE_VALUES
58
+
59
+ # When `threads` is passed in as a uwsgi option,
60
+ # `enable-threads` is implied on.
61
+ threads_enabled = "threads" in opt or enabled("enable-threads")
62
+ fork_hooks_on = enabled("py-call-uwsgi-fork-hooks")
63
+ lazy_mode = enabled("lazy-apps") or enabled("lazy")
64
+
65
+ if lazy_mode and not threads_enabled:
66
+ from warnings import warn
67
+
68
+ warn(
69
+ Warning(
70
+ "IMPORTANT: "
71
+ "We detected the use of uWSGI without thread support. "
72
+ "This might lead to unexpected issues. "
73
+ 'Please run uWSGI with "--enable-threads" for full support.'
74
+ )
75
+ )
76
+
77
+ return False
78
+
79
+ elif not lazy_mode and (not threads_enabled or not fork_hooks_on):
80
+ from warnings import warn
81
+
82
+ warn(
83
+ Warning(
84
+ "IMPORTANT: "
85
+ "We detected the use of uWSGI in preforking mode without "
86
+ "thread support. This might lead to crashing workers. "
87
+ 'Please run uWSGI with both "--enable-threads" and '
88
+ '"--py-call-uwsgi-fork-hooks" for full support.'
89
+ )
90
+ )
91
+
92
+ return False
93
+
94
+ return True
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_init_implementation.py ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import warnings
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ import sentry_sdk
6
+
7
+ if TYPE_CHECKING:
8
+ from typing import Any, ContextManager, Optional
9
+
10
+ import sentry_sdk.consts
11
+
12
+
13
+ class _InitGuard:
14
+ _CONTEXT_MANAGER_DEPRECATION_WARNING_MESSAGE = (
15
+ "Using the return value of sentry_sdk.init as a context manager "
16
+ "and manually calling the __enter__ and __exit__ methods on the "
17
+ "return value are deprecated. We are no longer maintaining this "
18
+ "functionality, and we will remove it in the next major release."
19
+ )
20
+
21
+ def __init__(self, client: "sentry_sdk.Client") -> None:
22
+ self._client = client
23
+
24
+ def __enter__(self) -> "_InitGuard":
25
+ warnings.warn(
26
+ self._CONTEXT_MANAGER_DEPRECATION_WARNING_MESSAGE,
27
+ stacklevel=2,
28
+ category=DeprecationWarning,
29
+ )
30
+
31
+ return self
32
+
33
+ def __exit__(self, exc_type: "Any", exc_value: "Any", tb: "Any") -> None:
34
+ warnings.warn(
35
+ self._CONTEXT_MANAGER_DEPRECATION_WARNING_MESSAGE,
36
+ stacklevel=2,
37
+ category=DeprecationWarning,
38
+ )
39
+
40
+ c = self._client
41
+ if c is not None:
42
+ c.close()
43
+
44
+
45
+ def _check_python_deprecations() -> None:
46
+ # Since we're likely to deprecate Python versions in the future, I'm keeping
47
+ # this handy function around. Use this to detect the Python version used and
48
+ # to output logger.warning()s if it's deprecated.
49
+ pass
50
+
51
+
52
+ def _init(*args: "Optional[str]", **kwargs: "Any") -> "ContextManager[Any]":
53
+ """Initializes the SDK and optionally integrations.
54
+
55
+ This takes the same arguments as the client constructor.
56
+ """
57
+ client = sentry_sdk.Client(*args, **kwargs)
58
+ sentry_sdk.get_global_scope().set_client(client)
59
+ _check_python_deprecations()
60
+ rv = _InitGuard(client)
61
+ return rv
62
+
63
+
64
+ if TYPE_CHECKING:
65
+ # Make mypy, PyCharm and other static analyzers think `init` is a type to
66
+ # have nicer autocompletion for params.
67
+ #
68
+ # Use `ClientConstructor` to define the argument types of `init` and
69
+ # `ContextManager[Any]` to tell static analyzers about the return type.
70
+
71
+ class init(sentry_sdk.consts.ClientConstructor, _InitGuard): # noqa: N801
72
+ pass
73
+
74
+ else:
75
+ # Alias `init` for actual usage. Go through the lambda indirection to throw
76
+ # PyCharm off of the weakly typed signature (it would otherwise discover
77
+ # both the weakly typed signature of `_init` and our faked `init` type).
78
+
79
+ init = (lambda: _init)()
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_log_batcher.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import TYPE_CHECKING
2
+
3
+ from sentry_sdk._batcher import Batcher
4
+ from sentry_sdk.utils import serialize_attribute
5
+ from sentry_sdk.envelope import Envelope, Item, PayloadRef
6
+
7
+ if TYPE_CHECKING:
8
+ from typing import Any
9
+ from sentry_sdk._types import Log
10
+
11
+
12
+ class LogBatcher(Batcher["Log"]):
13
+ MAX_BEFORE_FLUSH = 100
14
+ MAX_BEFORE_DROP = 1_000
15
+ FLUSH_WAIT_TIME = 5.0
16
+
17
+ TYPE = "log"
18
+ CONTENT_TYPE = "application/vnd.sentry.items.log+json"
19
+
20
+ @staticmethod
21
+ def _to_transport_format(item: "Log") -> "Any":
22
+ if "sentry.severity_number" not in item["attributes"]:
23
+ item["attributes"]["sentry.severity_number"] = item["severity_number"]
24
+ if "sentry.severity_text" not in item["attributes"]:
25
+ item["attributes"]["sentry.severity_text"] = item["severity_text"]
26
+
27
+ res = {
28
+ "timestamp": int(item["time_unix_nano"]) / 1.0e9,
29
+ "trace_id": item.get("trace_id", "00000000-0000-0000-0000-000000000000"),
30
+ "span_id": item.get("span_id"),
31
+ "level": str(item["severity_text"]),
32
+ "body": str(item["body"]),
33
+ "attributes": {
34
+ k: serialize_attribute(v) for (k, v) in item["attributes"].items()
35
+ },
36
+ }
37
+
38
+ return res
39
+
40
+ def _record_lost(self, item: "Log") -> None:
41
+ # Construct log envelope item without sending it to report lost bytes
42
+ log_item = Item(
43
+ type=self.TYPE,
44
+ content_type=self.CONTENT_TYPE,
45
+ headers={
46
+ "item_count": 1,
47
+ },
48
+ payload=PayloadRef(json={"items": [self._to_transport_format(item)]}),
49
+ )
50
+
51
+ self._record_lost_func(
52
+ reason="queue_overflow",
53
+ data_category="log_item",
54
+ item=log_item,
55
+ quantity=1,
56
+ )
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_lru_cache.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import TYPE_CHECKING
2
+
3
+ if TYPE_CHECKING:
4
+ from typing import Any
5
+
6
+
7
+ _SENTINEL = object()
8
+
9
+
10
+ class LRUCache:
11
+ def __init__(self, max_size: int) -> None:
12
+ if max_size <= 0:
13
+ raise AssertionError(f"invalid max_size: {max_size}")
14
+ self.max_size = max_size
15
+ self._data: "dict[Any, Any]" = {}
16
+ self.hits = self.misses = 0
17
+ self.full = False
18
+
19
+ def set(self, key: "Any", value: "Any") -> None:
20
+ current = self._data.pop(key, _SENTINEL)
21
+ if current is not _SENTINEL:
22
+ self._data[key] = value
23
+ elif self.full:
24
+ self._data.pop(next(iter(self._data)))
25
+ self._data[key] = value
26
+ else:
27
+ self._data[key] = value
28
+ self.full = len(self._data) >= self.max_size
29
+
30
+ def get(self, key: "Any", default: "Any" = None) -> "Any":
31
+ try:
32
+ ret = self._data.pop(key)
33
+ except KeyError:
34
+ self.misses += 1
35
+ ret = default
36
+ else:
37
+ self.hits += 1
38
+ self._data[key] = ret
39
+
40
+ return ret
41
+
42
+ def get_all(self) -> "list[tuple[Any, Any]]":
43
+ return list(self._data.items())
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_metrics_batcher.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import TYPE_CHECKING
2
+
3
+ from sentry_sdk._batcher import Batcher
4
+ from sentry_sdk.utils import serialize_attribute
5
+ from sentry_sdk.envelope import Item
6
+
7
+ if TYPE_CHECKING:
8
+ from typing import Any
9
+ from sentry_sdk._types import Metric
10
+
11
+
12
+ class MetricsBatcher(Batcher["Metric"]):
13
+ MAX_BEFORE_FLUSH = 1000
14
+ MAX_BEFORE_DROP = 10_000
15
+ FLUSH_WAIT_TIME = 5.0
16
+
17
+ TYPE = "trace_metric"
18
+ CONTENT_TYPE = "application/vnd.sentry.items.trace-metric+json"
19
+
20
+ @staticmethod
21
+ def _to_transport_format(item: "Metric") -> "Any":
22
+ res = {
23
+ "timestamp": item["timestamp"],
24
+ "trace_id": item["trace_id"],
25
+ "name": item["name"],
26
+ "type": item["type"],
27
+ "value": item["value"],
28
+ "attributes": {
29
+ k: serialize_attribute(v) for (k, v) in item["attributes"].items()
30
+ },
31
+ }
32
+
33
+ if item.get("span_id") is not None:
34
+ res["span_id"] = item["span_id"]
35
+
36
+ if item.get("unit") is not None:
37
+ res["unit"] = item["unit"]
38
+
39
+ return res
40
+
41
+ def _record_lost(self, item: "Metric") -> None:
42
+ self._record_lost_func(
43
+ reason="queue_overflow",
44
+ data_category="trace_metric",
45
+ quantity=1,
46
+ )
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_queue.py ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ A fork of Python 3.6's stdlib queue (found in Pythons 'cpython/Lib/queue.py')
3
+ with Lock swapped out for RLock to avoid a deadlock while garbage collecting.
4
+
5
+ https://github.com/python/cpython/blob/v3.6.12/Lib/queue.py
6
+
7
+
8
+ See also
9
+ https://codewithoutrules.com/2017/08/16/concurrency-python/
10
+ https://bugs.python.org/issue14976
11
+ https://github.com/sqlalchemy/sqlalchemy/blob/4eb747b61f0c1b1c25bdee3856d7195d10a0c227/lib/sqlalchemy/queue.py#L1
12
+
13
+ We also vendor the code to evade eventlet's broken monkeypatching, see
14
+ https://github.com/getsentry/sentry-python/pull/484
15
+
16
+
17
+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
18
+ 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
19
+
20
+ All Rights Reserved
21
+
22
+
23
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
24
+ --------------------------------------------
25
+
26
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
27
+ ("PSF"), and the Individual or Organization ("Licensee") accessing and
28
+ otherwise using this software ("Python") in source or binary form and
29
+ its associated documentation.
30
+
31
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
32
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
33
+ analyze, test, perform and/or display publicly, prepare derivative works,
34
+ distribute, and otherwise use Python alone or in any derivative version,
35
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
36
+ i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
37
+ 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
38
+ All Rights Reserved" are retained in Python alone or in any derivative version
39
+ prepared by Licensee.
40
+
41
+ 3. In the event Licensee prepares a derivative work that is based on
42
+ or incorporates Python or any part thereof, and wants to make
43
+ the derivative work available to others as provided herein, then
44
+ Licensee hereby agrees to include in any such work a brief summary of
45
+ the changes made to Python.
46
+
47
+ 4. PSF is making Python available to Licensee on an "AS IS"
48
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
49
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
50
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
51
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
52
+ INFRINGE ANY THIRD PARTY RIGHTS.
53
+
54
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
55
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
56
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
57
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
58
+
59
+ 6. This License Agreement will automatically terminate upon a material
60
+ breach of its terms and conditions.
61
+
62
+ 7. Nothing in this License Agreement shall be deemed to create any
63
+ relationship of agency, partnership, or joint venture between PSF and
64
+ Licensee. This License Agreement does not grant permission to use PSF
65
+ trademarks or trade name in a trademark sense to endorse or promote
66
+ products or services of Licensee, or any third party.
67
+
68
+ 8. By copying, installing or otherwise using Python, Licensee
69
+ agrees to be bound by the terms and conditions of this License
70
+ Agreement.
71
+
72
+ """
73
+
74
+ import threading
75
+
76
+ from collections import deque
77
+ from time import time
78
+
79
+ from typing import TYPE_CHECKING
80
+
81
+ if TYPE_CHECKING:
82
+ from typing import Any
83
+
84
+ __all__ = ["EmptyError", "FullError", "Queue"]
85
+
86
+
87
+ class EmptyError(Exception):
88
+ "Exception raised by Queue.get(block=0)/get_nowait()."
89
+
90
+ pass
91
+
92
+
93
+ class FullError(Exception):
94
+ "Exception raised by Queue.put(block=0)/put_nowait()."
95
+
96
+ pass
97
+
98
+
99
+ class Queue:
100
+ """Create a queue object with a given maximum size.
101
+
102
+ If maxsize is <= 0, the queue size is infinite.
103
+ """
104
+
105
+ def __init__(self, maxsize=0):
106
+ self.maxsize = maxsize
107
+ self._init(maxsize)
108
+
109
+ # mutex must be held whenever the queue is mutating. All methods
110
+ # that acquire mutex must release it before returning. mutex
111
+ # is shared between the three conditions, so acquiring and
112
+ # releasing the conditions also acquires and releases mutex.
113
+ self.mutex = threading.RLock()
114
+
115
+ # Notify not_empty whenever an item is added to the queue; a
116
+ # thread waiting to get is notified then.
117
+ self.not_empty = threading.Condition(self.mutex)
118
+
119
+ # Notify not_full whenever an item is removed from the queue;
120
+ # a thread waiting to put is notified then.
121
+ self.not_full = threading.Condition(self.mutex)
122
+
123
+ # Notify all_tasks_done whenever the number of unfinished tasks
124
+ # drops to zero; thread waiting to join() is notified to resume
125
+ self.all_tasks_done = threading.Condition(self.mutex)
126
+ self.unfinished_tasks = 0
127
+
128
+ def task_done(self):
129
+ """Indicate that a formerly enqueued task is complete.
130
+
131
+ Used by Queue consumer threads. For each get() used to fetch a task,
132
+ a subsequent call to task_done() tells the queue that the processing
133
+ on the task is complete.
134
+
135
+ If a join() is currently blocking, it will resume when all items
136
+ have been processed (meaning that a task_done() call was received
137
+ for every item that had been put() into the queue).
138
+
139
+ Raises a ValueError if called more times than there were items
140
+ placed in the queue.
141
+ """
142
+ with self.all_tasks_done:
143
+ unfinished = self.unfinished_tasks - 1
144
+ if unfinished <= 0:
145
+ if unfinished < 0:
146
+ raise ValueError("task_done() called too many times")
147
+ self.all_tasks_done.notify_all()
148
+ self.unfinished_tasks = unfinished
149
+
150
+ def join(self):
151
+ """Blocks until all items in the Queue have been gotten and processed.
152
+
153
+ The count of unfinished tasks goes up whenever an item is added to the
154
+ queue. The count goes down whenever a consumer thread calls task_done()
155
+ to indicate the item was retrieved and all work on it is complete.
156
+
157
+ When the count of unfinished tasks drops to zero, join() unblocks.
158
+ """
159
+ with self.all_tasks_done:
160
+ while self.unfinished_tasks:
161
+ self.all_tasks_done.wait()
162
+
163
+ def qsize(self):
164
+ """Return the approximate size of the queue (not reliable!)."""
165
+ with self.mutex:
166
+ return self._qsize()
167
+
168
+ def empty(self):
169
+ """Return True if the queue is empty, False otherwise (not reliable!).
170
+
171
+ This method is likely to be removed at some point. Use qsize() == 0
172
+ as a direct substitute, but be aware that either approach risks a race
173
+ condition where a queue can grow before the result of empty() or
174
+ qsize() can be used.
175
+
176
+ To create code that needs to wait for all queued tasks to be
177
+ completed, the preferred technique is to use the join() method.
178
+ """
179
+ with self.mutex:
180
+ return not self._qsize()
181
+
182
+ def full(self):
183
+ """Return True if the queue is full, False otherwise (not reliable!).
184
+
185
+ This method is likely to be removed at some point. Use qsize() >= n
186
+ as a direct substitute, but be aware that either approach risks a race
187
+ condition where a queue can shrink before the result of full() or
188
+ qsize() can be used.
189
+ """
190
+ with self.mutex:
191
+ return 0 < self.maxsize <= self._qsize()
192
+
193
+ def put(self, item, block=True, timeout=None):
194
+ """Put an item into the queue.
195
+
196
+ If optional args 'block' is true and 'timeout' is None (the default),
197
+ block if necessary until a free slot is available. If 'timeout' is
198
+ a non-negative number, it blocks at most 'timeout' seconds and raises
199
+ the FullError exception if no free slot was available within that time.
200
+ Otherwise ('block' is false), put an item on the queue if a free slot
201
+ is immediately available, else raise the FullError exception ('timeout'
202
+ is ignored in that case).
203
+ """
204
+ with self.not_full:
205
+ if self.maxsize > 0:
206
+ if not block:
207
+ if self._qsize() >= self.maxsize:
208
+ raise FullError()
209
+ elif timeout is None:
210
+ while self._qsize() >= self.maxsize:
211
+ self.not_full.wait()
212
+ elif timeout < 0:
213
+ raise ValueError("'timeout' must be a non-negative number")
214
+ else:
215
+ endtime = time() + timeout
216
+ while self._qsize() >= self.maxsize:
217
+ remaining = endtime - time()
218
+ if remaining <= 0.0:
219
+ raise FullError()
220
+ self.not_full.wait(remaining)
221
+ self._put(item)
222
+ self.unfinished_tasks += 1
223
+ self.not_empty.notify()
224
+
225
+ def get(self, block=True, timeout=None):
226
+ """Remove and return an item from the queue.
227
+
228
+ If optional args 'block' is true and 'timeout' is None (the default),
229
+ block if necessary until an item is available. If 'timeout' is
230
+ a non-negative number, it blocks at most 'timeout' seconds and raises
231
+ the EmptyError exception if no item was available within that time.
232
+ Otherwise ('block' is false), return an item if one is immediately
233
+ available, else raise the EmptyError exception ('timeout' is ignored
234
+ in that case).
235
+ """
236
+ with self.not_empty:
237
+ if not block:
238
+ if not self._qsize():
239
+ raise EmptyError()
240
+ elif timeout is None:
241
+ while not self._qsize():
242
+ self.not_empty.wait()
243
+ elif timeout < 0:
244
+ raise ValueError("'timeout' must be a non-negative number")
245
+ else:
246
+ endtime = time() + timeout
247
+ while not self._qsize():
248
+ remaining = endtime - time()
249
+ if remaining <= 0.0:
250
+ raise EmptyError()
251
+ self.not_empty.wait(remaining)
252
+ item = self._get()
253
+ self.not_full.notify()
254
+ return item
255
+
256
+ def put_nowait(self, item):
257
+ """Put an item into the queue without blocking.
258
+
259
+ Only enqueue the item if a free slot is immediately available.
260
+ Otherwise raise the FullError exception.
261
+ """
262
+ return self.put(item, block=False)
263
+
264
+ def get_nowait(self):
265
+ """Remove and return an item from the queue without blocking.
266
+
267
+ Only get an item if one is immediately available. Otherwise
268
+ raise the EmptyError exception.
269
+ """
270
+ return self.get(block=False)
271
+
272
+ # Override these methods to implement other queue organizations
273
+ # (e.g. stack or priority queue).
274
+ # These will only be called with appropriate locks held
275
+
276
+ # Initialize the queue representation
277
+ def _init(self, maxsize):
278
+ self.queue: "Any" = deque()
279
+
280
+ def _qsize(self):
281
+ return len(self.queue)
282
+
283
+ # Put a new item in the queue
284
+ def _put(self, item):
285
+ self.queue.append(item)
286
+
287
+ # Get an item from the queue
288
+ def _get(self):
289
+ return self.queue.popleft()
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_span_batcher.py ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import threading
2
+ from collections import defaultdict
3
+ from datetime import datetime, timezone
4
+ from typing import TYPE_CHECKING
5
+
6
+ from sentry_sdk._batcher import Batcher
7
+ from sentry_sdk.consts import SPANSTATUS
8
+ from sentry_sdk.envelope import Envelope, Item, PayloadRef
9
+ from sentry_sdk.utils import format_timestamp, serialize_attribute, safe_repr
10
+
11
+ if TYPE_CHECKING:
12
+ from typing import Any, Callable, Optional
13
+ from sentry_sdk.traces import StreamedSpan
14
+ from sentry_sdk._types import SerializedAttributeValue
15
+
16
+
17
+ class SpanBatcher(Batcher["StreamedSpan"]):
18
+ # TODO[span-first]: size-based flushes
19
+ # TODO[span-first]: adjust flush/drop defaults
20
+ MAX_BEFORE_FLUSH = 1000
21
+ MAX_BEFORE_DROP = 5000
22
+ FLUSH_WAIT_TIME = 5.0
23
+
24
+ TYPE = "span"
25
+ CONTENT_TYPE = "application/vnd.sentry.items.span.v2+json"
26
+
27
+ def __init__(
28
+ self,
29
+ capture_func: "Callable[[Envelope], None]",
30
+ record_lost_func: "Callable[..., None]",
31
+ ) -> None:
32
+ # Spans from different traces cannot be emitted in the same envelope
33
+ # since the envelope contains a shared trace header. That's why we bucket
34
+ # by trace_id, so that we can then send the buckets each in its own
35
+ # envelope.
36
+ # trace_id -> span buffer
37
+ self._span_buffer: dict[str, list["StreamedSpan"]] = defaultdict(list)
38
+ self._capture_func = capture_func
39
+ self._record_lost_func = record_lost_func
40
+ self._running = True
41
+ self._lock = threading.Lock()
42
+
43
+ self._flush_event: "threading.Event" = threading.Event()
44
+
45
+ self._flusher: "Optional[threading.Thread]" = None
46
+ self._flusher_pid: "Optional[int]" = None
47
+
48
+ def get_size(self) -> int:
49
+ # caller is responsible for locking before checking this
50
+ return sum(len(buffer) for buffer in self._span_buffer.values())
51
+
52
+ def add(self, span: "StreamedSpan") -> None:
53
+ if not self._ensure_thread() or self._flusher is None:
54
+ return None
55
+
56
+ with self._lock:
57
+ size = self.get_size()
58
+ if size >= self.MAX_BEFORE_DROP:
59
+ self._record_lost_func(
60
+ reason="queue_overflow",
61
+ data_category="span",
62
+ quantity=1,
63
+ )
64
+ return None
65
+
66
+ self._span_buffer[span.trace_id].append(span)
67
+ if size + 1 >= self.MAX_BEFORE_FLUSH:
68
+ self._flush_event.set()
69
+
70
+ @staticmethod
71
+ def _to_transport_format(item: "StreamedSpan") -> "Any":
72
+ # TODO[span-first]
73
+ res: "dict[str, Any]" = {
74
+ "span_id": item.span_id,
75
+ "name": item._name,
76
+ "status": item._status,
77
+ }
78
+
79
+ if item._attributes:
80
+ res["attributes"] = {
81
+ k: serialize_attribute(v) for (k, v) in item._attributes.items()
82
+ }
83
+
84
+ return res
85
+
86
+ def _flush(self) -> None:
87
+ with self._lock:
88
+ if len(self._span_buffer) == 0:
89
+ return None
90
+
91
+ envelopes = []
92
+ for trace_id, spans in self._span_buffer.items():
93
+ if spans:
94
+ # TODO[span-first]
95
+ # dsc = spans[0].dynamic_sampling_context()
96
+ dsc = None
97
+
98
+ envelope = Envelope(
99
+ headers={
100
+ "sent_at": format_timestamp(datetime.now(timezone.utc)),
101
+ "trace": dsc,
102
+ }
103
+ )
104
+
105
+ envelope.add_item(
106
+ Item(
107
+ type="span",
108
+ content_type="application/vnd.sentry.items.span.v2+json",
109
+ headers={
110
+ "item_count": len(spans),
111
+ },
112
+ payload=PayloadRef(
113
+ json={
114
+ "items": [
115
+ self._to_transport_format(span)
116
+ for span in spans
117
+ ]
118
+ }
119
+ ),
120
+ )
121
+ )
122
+
123
+ envelopes.append(envelope)
124
+
125
+ self._span_buffer.clear()
126
+
127
+ for envelope in envelopes:
128
+ self._capture_func(envelope)
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_types.py ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import TYPE_CHECKING, TypeVar, Union
2
+
3
+
4
+ # Re-exported for compat, since code out there in the wild might use this variable.
5
+ MYPY = TYPE_CHECKING
6
+
7
+
8
+ SENSITIVE_DATA_SUBSTITUTE = "[Filtered]"
9
+ BLOB_DATA_SUBSTITUTE = "[Blob substitute]"
10
+
11
+
12
+ class AnnotatedValue:
13
+ """
14
+ Meta information for a data field in the event payload.
15
+ This is to tell Relay that we have tampered with the fields value.
16
+ See:
17
+ https://github.com/getsentry/relay/blob/be12cd49a0f06ea932ed9b9f93a655de5d6ad6d1/relay-general/src/types/meta.rs#L407-L423
18
+ """
19
+
20
+ __slots__ = ("value", "metadata")
21
+
22
+ def __init__(self, value: "Optional[Any]", metadata: "Dict[str, Any]") -> None:
23
+ self.value = value
24
+ self.metadata = metadata
25
+
26
+ def __eq__(self, other: "Any") -> bool:
27
+ if not isinstance(other, AnnotatedValue):
28
+ return False
29
+
30
+ return self.value == other.value and self.metadata == other.metadata
31
+
32
+ def __str__(self: "AnnotatedValue") -> str:
33
+ return str({"value": str(self.value), "metadata": str(self.metadata)})
34
+
35
+ def __len__(self: "AnnotatedValue") -> int:
36
+ if self.value is not None:
37
+ return len(self.value)
38
+ else:
39
+ return 0
40
+
41
+ @classmethod
42
+ def removed_because_raw_data(cls) -> "AnnotatedValue":
43
+ """The value was removed because it could not be parsed. This is done for request body values that are not json nor a form."""
44
+ return AnnotatedValue(
45
+ value="",
46
+ metadata={
47
+ "rem": [ # Remark
48
+ [
49
+ "!raw", # Unparsable raw data
50
+ "x", # The fields original value was removed
51
+ ]
52
+ ]
53
+ },
54
+ )
55
+
56
+ @classmethod
57
+ def removed_because_over_size_limit(cls, value: "Any" = "") -> "AnnotatedValue":
58
+ """
59
+ The actual value was removed because the size of the field exceeded the configured maximum size,
60
+ for example specified with the max_request_body_size sdk option.
61
+ """
62
+ return AnnotatedValue(
63
+ value=value,
64
+ metadata={
65
+ "rem": [ # Remark
66
+ [
67
+ "!config", # Because of configured maximum size
68
+ "x", # The fields original value was removed
69
+ ]
70
+ ]
71
+ },
72
+ )
73
+
74
+ @classmethod
75
+ def substituted_because_contains_sensitive_data(cls) -> "AnnotatedValue":
76
+ """The actual value was removed because it contained sensitive information."""
77
+ return AnnotatedValue(
78
+ value=SENSITIVE_DATA_SUBSTITUTE,
79
+ metadata={
80
+ "rem": [ # Remark
81
+ [
82
+ "!config", # Because of SDK configuration (in this case the config is the hard coded removal of certain django cookies)
83
+ "s", # The fields original value was substituted
84
+ ]
85
+ ]
86
+ },
87
+ )
88
+
89
+
90
+ T = TypeVar("T")
91
+ Annotated = Union[AnnotatedValue, T]
92
+
93
+
94
+ if TYPE_CHECKING:
95
+ from collections.abc import Container, MutableMapping, Sequence
96
+
97
+ from datetime import datetime
98
+
99
+ from types import TracebackType
100
+ from typing import Any
101
+ from typing import Callable
102
+ from typing import Dict
103
+ from typing import Mapping
104
+ from typing import NotRequired
105
+ from typing import Optional
106
+ from typing import Tuple
107
+ from typing import Type
108
+ from typing_extensions import Literal, TypedDict
109
+
110
+ class SDKInfo(TypedDict):
111
+ name: str
112
+ version: str
113
+ packages: "Sequence[Mapping[str, str]]"
114
+
115
+ # "critical" is an alias of "fatal" recognized by Relay
116
+ LogLevelStr = Literal["fatal", "critical", "error", "warning", "info", "debug"]
117
+
118
+ DurationUnit = Literal[
119
+ "nanosecond",
120
+ "microsecond",
121
+ "millisecond",
122
+ "second",
123
+ "minute",
124
+ "hour",
125
+ "day",
126
+ "week",
127
+ ]
128
+
129
+ InformationUnit = Literal[
130
+ "bit",
131
+ "byte",
132
+ "kilobyte",
133
+ "kibibyte",
134
+ "megabyte",
135
+ "mebibyte",
136
+ "gigabyte",
137
+ "gibibyte",
138
+ "terabyte",
139
+ "tebibyte",
140
+ "petabyte",
141
+ "pebibyte",
142
+ "exabyte",
143
+ "exbibyte",
144
+ ]
145
+
146
+ FractionUnit = Literal["ratio", "percent"]
147
+ MeasurementUnit = Union[DurationUnit, InformationUnit, FractionUnit, str]
148
+
149
+ MeasurementValue = TypedDict(
150
+ "MeasurementValue",
151
+ {
152
+ "value": float,
153
+ "unit": NotRequired[Optional[MeasurementUnit]],
154
+ },
155
+ )
156
+
157
+ Event = TypedDict(
158
+ "Event",
159
+ {
160
+ "breadcrumbs": Annotated[
161
+ dict[Literal["values"], list[dict[str, Any]]]
162
+ ], # TODO: We can expand on this type
163
+ "check_in_id": str,
164
+ "contexts": dict[str, dict[str, object]],
165
+ "dist": str,
166
+ "duration": Optional[float],
167
+ "environment": Optional[str],
168
+ "errors": list[dict[str, Any]], # TODO: We can expand on this type
169
+ "event_id": str,
170
+ "exception": dict[
171
+ Literal["values"], list[dict[str, Any]]
172
+ ], # TODO: We can expand on this type
173
+ "extra": MutableMapping[str, object],
174
+ "fingerprint": list[str],
175
+ "level": LogLevelStr,
176
+ "logentry": Mapping[str, object],
177
+ "logger": str,
178
+ "measurements": dict[str, MeasurementValue],
179
+ "message": str,
180
+ "modules": dict[str, str],
181
+ "monitor_config": Mapping[str, object],
182
+ "monitor_slug": Optional[str],
183
+ "platform": Literal["python"],
184
+ "profile": object, # Should be sentry_sdk.profiler.Profile, but we can't import that here due to circular imports
185
+ "release": Optional[str],
186
+ "request": dict[str, object],
187
+ "sdk": Mapping[str, object],
188
+ "server_name": str,
189
+ "spans": Annotated[list[dict[str, object]]],
190
+ "stacktrace": dict[
191
+ str, object
192
+ ], # We access this key in the code, but I am unsure whether we ever set it
193
+ "start_timestamp": datetime,
194
+ "status": Optional[str],
195
+ "tags": MutableMapping[
196
+ str, str
197
+ ], # Tags must be less than 200 characters each
198
+ "threads": dict[
199
+ Literal["values"], list[dict[str, Any]]
200
+ ], # TODO: We can expand on this type
201
+ "timestamp": Optional[datetime], # Must be set before sending the event
202
+ "transaction": str,
203
+ "transaction_info": Mapping[str, Any], # TODO: We can expand on this type
204
+ "type": Literal["check_in", "transaction"],
205
+ "user": dict[str, object],
206
+ "_dropped_spans": int,
207
+ },
208
+ total=False,
209
+ )
210
+
211
+ ExcInfo = Union[
212
+ tuple[Type[BaseException], BaseException, Optional[TracebackType]],
213
+ tuple[None, None, None],
214
+ ]
215
+
216
+ # TODO: Make a proper type definition for this (PRs welcome!)
217
+ Hint = Dict[str, Any]
218
+
219
+ AttributeValue = (
220
+ str
221
+ | bool
222
+ | float
223
+ | int
224
+ | list[str]
225
+ | list[bool]
226
+ | list[float]
227
+ | list[int]
228
+ | tuple[str, ...]
229
+ | tuple[bool, ...]
230
+ | tuple[float, ...]
231
+ | tuple[int, ...]
232
+ )
233
+ Attributes = dict[str, AttributeValue]
234
+
235
+ SerializedAttributeValue = TypedDict(
236
+ # https://develop.sentry.dev/sdk/telemetry/attributes/#supported-types
237
+ "SerializedAttributeValue",
238
+ {
239
+ "type": Literal[
240
+ "string",
241
+ "boolean",
242
+ "double",
243
+ "integer",
244
+ "array",
245
+ ],
246
+ "value": AttributeValue,
247
+ },
248
+ )
249
+
250
+ Log = TypedDict(
251
+ "Log",
252
+ {
253
+ "severity_text": str,
254
+ "severity_number": int,
255
+ "body": str,
256
+ "attributes": Attributes,
257
+ "time_unix_nano": int,
258
+ "trace_id": Optional[str],
259
+ "span_id": Optional[str],
260
+ },
261
+ )
262
+
263
+ MetricType = Literal["counter", "gauge", "distribution"]
264
+ MetricUnit = Union[DurationUnit, InformationUnit, str]
265
+
266
+ Metric = TypedDict(
267
+ "Metric",
268
+ {
269
+ "timestamp": float,
270
+ "trace_id": Optional[str],
271
+ "span_id": Optional[str],
272
+ "name": str,
273
+ "type": MetricType,
274
+ "value": float,
275
+ "unit": Optional[MetricUnit],
276
+ "attributes": Attributes,
277
+ },
278
+ )
279
+
280
+ MetricProcessor = Callable[[Metric, Hint], Optional[Metric]]
281
+
282
+ # TODO: Make a proper type definition for this (PRs welcome!)
283
+ Breadcrumb = Dict[str, Any]
284
+
285
+ # TODO: Make a proper type definition for this (PRs welcome!)
286
+ BreadcrumbHint = Dict[str, Any]
287
+
288
+ # TODO: Make a proper type definition for this (PRs welcome!)
289
+ SamplingContext = Dict[str, Any]
290
+
291
+ EventProcessor = Callable[[Event, Hint], Optional[Event]]
292
+ ErrorProcessor = Callable[[Event, ExcInfo], Optional[Event]]
293
+ BreadcrumbProcessor = Callable[[Breadcrumb, BreadcrumbHint], Optional[Breadcrumb]]
294
+ TransactionProcessor = Callable[[Event, Hint], Optional[Event]]
295
+ LogProcessor = Callable[[Log, Hint], Optional[Log]]
296
+
297
+ TracesSampler = Callable[[SamplingContext], Union[float, int, bool]]
298
+
299
+ # https://github.com/python/mypy/issues/5710
300
+ NotImplementedType = Any
301
+
302
+ EventDataCategory = Literal[
303
+ "default",
304
+ "error",
305
+ "crash",
306
+ "transaction",
307
+ "security",
308
+ "attachment",
309
+ "session",
310
+ "internal",
311
+ "profile",
312
+ "profile_chunk",
313
+ "monitor",
314
+ "span",
315
+ "log_item",
316
+ "log_byte",
317
+ "trace_metric",
318
+ ]
319
+ SessionStatus = Literal["ok", "exited", "crashed", "abnormal"]
320
+
321
+ ContinuousProfilerMode = Literal["thread", "gevent", "unknown"]
322
+ ProfilerMode = Union[ContinuousProfilerMode, Literal["sleep"]]
323
+
324
+ MonitorConfigScheduleType = Literal["crontab", "interval"]
325
+ MonitorConfigScheduleUnit = Literal[
326
+ "year",
327
+ "month",
328
+ "week",
329
+ "day",
330
+ "hour",
331
+ "minute",
332
+ "second", # not supported in Sentry and will result in a warning
333
+ ]
334
+
335
+ MonitorConfigSchedule = TypedDict(
336
+ "MonitorConfigSchedule",
337
+ {
338
+ "type": MonitorConfigScheduleType,
339
+ "value": Union[int, str],
340
+ "unit": MonitorConfigScheduleUnit,
341
+ },
342
+ total=False,
343
+ )
344
+
345
+ MonitorConfig = TypedDict(
346
+ "MonitorConfig",
347
+ {
348
+ "schedule": MonitorConfigSchedule,
349
+ "timezone": str,
350
+ "checkin_margin": int,
351
+ "max_runtime": int,
352
+ "failure_issue_threshold": int,
353
+ "recovery_threshold": int,
354
+ },
355
+ total=False,
356
+ )
357
+
358
+ HttpStatusCodeRange = Union[int, Container[int]]
359
+
360
+ class TextPart(TypedDict):
361
+ type: Literal["text"]
362
+ content: str
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/_werkzeug.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Copyright (c) 2007 by the Pallets team.
3
+
4
+ Some rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are
8
+ met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice,
11
+ this list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright
14
+ notice, this list of conditions and the following disclaimer in the
15
+ documentation and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of the copyright holder nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
24
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
+ COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
28
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31
+ THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF
32
+ SUCH DAMAGE.
33
+ """
34
+
35
+ from typing import TYPE_CHECKING
36
+
37
+ if TYPE_CHECKING:
38
+ from typing import Dict
39
+ from typing import Iterator
40
+ from typing import Tuple
41
+
42
+
43
+ #
44
+ # `get_headers` comes from `werkzeug.datastructures.EnvironHeaders`
45
+ # https://github.com/pallets/werkzeug/blob/0.14.1/werkzeug/datastructures.py#L1361
46
+ #
47
+ # We need this function because Django does not give us a "pure" http header
48
+ # dict. So we might as well use it for all WSGI integrations.
49
+ #
50
+ def _get_headers(environ: "Dict[str, str]") -> "Iterator[Tuple[str, str]]":
51
+ """
52
+ Returns only proper HTTP headers.
53
+ """
54
+ for key, value in environ.items():
55
+ key = str(key)
56
+ if key.startswith("HTTP_") and key not in (
57
+ "HTTP_CONTENT_TYPE",
58
+ "HTTP_CONTENT_LENGTH",
59
+ ):
60
+ yield key[5:].replace("_", "-").title(), value
61
+ elif key in ("CONTENT_TYPE", "CONTENT_LENGTH"):
62
+ yield key.replace("_", "-").title(), value
63
+
64
+
65
+ #
66
+ # `get_host` comes from `werkzeug.wsgi.get_host`
67
+ # https://github.com/pallets/werkzeug/blob/1.0.1/src/werkzeug/wsgi.py#L145
68
+ #
69
+ def get_host(environ: "Dict[str, str]", use_x_forwarded_for: bool = False) -> str:
70
+ """
71
+ Return the host for the given WSGI environment.
72
+ """
73
+ if use_x_forwarded_for and "HTTP_X_FORWARDED_HOST" in environ:
74
+ rv = environ["HTTP_X_FORWARDED_HOST"]
75
+ if environ["wsgi.url_scheme"] == "http" and rv.endswith(":80"):
76
+ rv = rv[:-3]
77
+ elif environ["wsgi.url_scheme"] == "https" and rv.endswith(":443"):
78
+ rv = rv[:-4]
79
+ elif environ.get("HTTP_HOST"):
80
+ rv = environ["HTTP_HOST"]
81
+ if environ["wsgi.url_scheme"] == "http" and rv.endswith(":80"):
82
+ rv = rv[:-3]
83
+ elif environ["wsgi.url_scheme"] == "https" and rv.endswith(":443"):
84
+ rv = rv[:-4]
85
+ elif environ.get("SERVER_NAME"):
86
+ rv = environ["SERVER_NAME"]
87
+ if (environ["wsgi.url_scheme"], environ["SERVER_PORT"]) not in (
88
+ ("https", "443"),
89
+ ("http", "80"),
90
+ ):
91
+ rv += ":" + environ["SERVER_PORT"]
92
+ else:
93
+ # In spite of the WSGI spec, SERVER_NAME might not be present.
94
+ rv = "unknown"
95
+
96
+ return rv
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/__init__.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from .utils import (
2
+ set_data_normalized,
3
+ GEN_AI_MESSAGE_ROLE_MAPPING,
4
+ GEN_AI_MESSAGE_ROLE_REVERSE_MAPPING,
5
+ normalize_message_role,
6
+ normalize_message_roles,
7
+ set_conversation_id,
8
+ ) # noqa: F401
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/_openai_completions_api.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from collections.abc import Iterable
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ if TYPE_CHECKING:
6
+ from sentry_sdk._types import TextPart
7
+ from typing import Union
8
+
9
+ from openai.types.chat import (
10
+ ChatCompletionMessageParam,
11
+ ChatCompletionSystemMessageParam,
12
+ ChatCompletionContentPartParam,
13
+ )
14
+
15
+
16
+ def _is_system_instruction(message: "ChatCompletionMessageParam") -> bool:
17
+ return isinstance(message, dict) and message.get("role") == "system"
18
+
19
+
20
+ def _get_system_instructions(
21
+ messages: "Iterable[ChatCompletionMessageParam]",
22
+ ) -> "list[ChatCompletionMessageParam]":
23
+ if not isinstance(messages, Iterable):
24
+ return []
25
+
26
+ return [message for message in messages if _is_system_instruction(message)]
27
+
28
+
29
+ def _get_text_items(
30
+ content: "Union[str, Iterable[ChatCompletionContentPartParam]]",
31
+ ) -> "list[str]":
32
+ if isinstance(content, str):
33
+ return [content]
34
+
35
+ if not isinstance(content, Iterable):
36
+ return []
37
+
38
+ text_items = []
39
+ for part in content:
40
+ if isinstance(part, dict) and part.get("type") == "text":
41
+ text = part.get("text", None)
42
+ if text is not None:
43
+ text_items.append(text)
44
+
45
+ return text_items
46
+
47
+
48
+ def _transform_system_instructions(
49
+ system_instructions: "list[ChatCompletionSystemMessageParam]",
50
+ ) -> "list[TextPart]":
51
+ instruction_text_parts: "list[TextPart]" = []
52
+
53
+ for instruction in system_instructions:
54
+ if not isinstance(instruction, dict):
55
+ continue
56
+
57
+ content = instruction.get("content")
58
+ if content is None:
59
+ continue
60
+
61
+ text_parts: "list[TextPart]" = [
62
+ {"type": "text", "content": text} for text in _get_text_items(content)
63
+ ]
64
+ instruction_text_parts += text_parts
65
+
66
+ return instruction_text_parts
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/_openai_responses_api.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import TYPE_CHECKING
2
+
3
+ if TYPE_CHECKING:
4
+ from typing import Union
5
+
6
+ from openai.types.responses import ResponseInputParam, ResponseInputItemParam
7
+
8
+
9
+ def _is_system_instruction(message: "ResponseInputItemParam") -> bool:
10
+ if not isinstance(message, dict) or not message.get("role") == "system":
11
+ return False
12
+
13
+ return "type" not in message or message["type"] == "message"
14
+
15
+
16
+ def _get_system_instructions(
17
+ messages: "Union[str, ResponseInputParam]",
18
+ ) -> "list[ResponseInputItemParam]":
19
+ if not isinstance(messages, list):
20
+ return []
21
+
22
+ return [message for message in messages if _is_system_instruction(message)]
miniconda3/envs/ladir/lib/python3.10/site-packages/sentry_sdk/ai/monitoring.py ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import inspect
2
+ import sys
3
+ from functools import wraps
4
+
5
+ from sentry_sdk.consts import SPANDATA
6
+ import sentry_sdk.utils
7
+ from sentry_sdk import start_span
8
+ from sentry_sdk.tracing import Span
9
+ from sentry_sdk.utils import ContextVar, reraise, capture_internal_exceptions
10
+
11
+ from typing import TYPE_CHECKING
12
+
13
+ if TYPE_CHECKING:
14
+ from typing import Optional, Callable, Awaitable, Any, Union, TypeVar
15
+
16
+ F = TypeVar("F", bound=Union[Callable[..., Any], Callable[..., Awaitable[Any]]])
17
+
18
+ _ai_pipeline_name = ContextVar("ai_pipeline_name", default=None)
19
+
20
+
21
+ def set_ai_pipeline_name(name: "Optional[str]") -> None:
22
+ _ai_pipeline_name.set(name)
23
+
24
+
25
+ def get_ai_pipeline_name() -> "Optional[str]":
26
+ return _ai_pipeline_name.get()
27
+
28
+
29
+ def ai_track(description: str, **span_kwargs: "Any") -> "Callable[[F], F]":
30
+ def decorator(f: "F") -> "F":
31
+ def sync_wrapped(*args: "Any", **kwargs: "Any") -> "Any":
32
+ curr_pipeline = _ai_pipeline_name.get()
33
+ op = span_kwargs.pop("op", "ai.run" if curr_pipeline else "ai.pipeline")
34
+
35
+ with start_span(name=description, op=op, **span_kwargs) as span:
36
+ for k, v in kwargs.pop("sentry_tags", {}).items():
37
+ span.set_tag(k, v)
38
+ for k, v in kwargs.pop("sentry_data", {}).items():
39
+ span.set_data(k, v)
40
+ if curr_pipeline:
41
+ span.set_data(SPANDATA.GEN_AI_PIPELINE_NAME, curr_pipeline)
42
+ return f(*args, **kwargs)
43
+ else:
44
+ _ai_pipeline_name.set(description)
45
+ try:
46
+ res = f(*args, **kwargs)
47
+ except Exception as e:
48
+ exc_info = sys.exc_info()
49
+ with capture_internal_exceptions():
50
+ event, hint = sentry_sdk.utils.event_from_exception(
51
+ e,
52
+ client_options=sentry_sdk.get_client().options,
53
+ mechanism={"type": "ai_monitoring", "handled": False},
54
+ )
55
+ sentry_sdk.capture_event(event, hint=hint)
56
+ reraise(*exc_info)
57
+ finally:
58
+ _ai_pipeline_name.set(None)
59
+ return res
60
+
61
+ async def async_wrapped(*args: "Any", **kwargs: "Any") -> "Any":
62
+ curr_pipeline = _ai_pipeline_name.get()
63
+ op = span_kwargs.pop("op", "ai.run" if curr_pipeline else "ai.pipeline")
64
+
65
+ with start_span(name=description, op=op, **span_kwargs) as span:
66
+ for k, v in kwargs.pop("sentry_tags", {}).items():
67
+ span.set_tag(k, v)
68
+ for k, v in kwargs.pop("sentry_data", {}).items():
69
+ span.set_data(k, v)
70
+ if curr_pipeline:
71
+ span.set_data(SPANDATA.GEN_AI_PIPELINE_NAME, curr_pipeline)
72
+ return await f(*args, **kwargs)
73
+ else:
74
+ _ai_pipeline_name.set(description)
75
+ try:
76
+ res = await f(*args, **kwargs)
77
+ except Exception as e:
78
+ exc_info = sys.exc_info()
79
+ with capture_internal_exceptions():
80
+ event, hint = sentry_sdk.utils.event_from_exception(
81
+ e,
82
+ client_options=sentry_sdk.get_client().options,
83
+ mechanism={"type": "ai_monitoring", "handled": False},
84
+ )
85
+ sentry_sdk.capture_event(event, hint=hint)
86
+ reraise(*exc_info)
87
+ finally:
88
+ _ai_pipeline_name.set(None)
89
+ return res
90
+
91
+ if inspect.iscoroutinefunction(f):
92
+ return wraps(f)(async_wrapped) # type: ignore
93
+ else:
94
+ return wraps(f)(sync_wrapped) # type: ignore
95
+
96
+ return decorator
97
+
98
+
99
+ def record_token_usage(
100
+ span: "Span",
101
+ input_tokens: "Optional[int]" = None,
102
+ input_tokens_cached: "Optional[int]" = None,
103
+ input_tokens_cache_write: "Optional[int]" = None,
104
+ output_tokens: "Optional[int]" = None,
105
+ output_tokens_reasoning: "Optional[int]" = None,
106
+ total_tokens: "Optional[int]" = None,
107
+ ) -> None:
108
+ # TODO: move pipeline name elsewhere
109
+ ai_pipeline_name = get_ai_pipeline_name()
110
+ if ai_pipeline_name:
111
+ span.set_data(SPANDATA.GEN_AI_PIPELINE_NAME, ai_pipeline_name)
112
+
113
+ if input_tokens is not None:
114
+ span.set_data(SPANDATA.GEN_AI_USAGE_INPUT_TOKENS, input_tokens)
115
+
116
+ if input_tokens_cached is not None:
117
+ span.set_data(
118
+ SPANDATA.GEN_AI_USAGE_INPUT_TOKENS_CACHED,
119
+ input_tokens_cached,
120
+ )
121
+
122
+ if input_tokens_cache_write is not None:
123
+ span.set_data(
124
+ SPANDATA.GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE,
125
+ input_tokens_cache_write,
126
+ )
127
+
128
+ if output_tokens is not None:
129
+ span.set_data(SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS, output_tokens)
130
+
131
+ if output_tokens_reasoning is not None:
132
+ span.set_data(
133
+ SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING,
134
+ output_tokens_reasoning,
135
+ )
136
+
137
+ if total_tokens is None and input_tokens is not None and output_tokens is not None:
138
+ total_tokens = input_tokens + output_tokens
139
+
140
+ if total_tokens is not None:
141
+ span.set_data(SPANDATA.GEN_AI_USAGE_TOTAL_TOKENS, total_tokens)
miniconda3/env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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import inspect
2
+ import json
3
+ from collections import deque
4
+ from copy import deepcopy
5
+ from sys import getsizeof
6
+ from typing import TYPE_CHECKING
7
+
8
+ from sentry_sdk._types import BLOB_DATA_SUBSTITUTE
9
+
10
+ if TYPE_CHECKING:
11
+ from typing import Any, Callable, Dict, List, Optional, Tuple
12
+
13
+ from sentry_sdk.tracing import Span
14
+
15
+ import sentry_sdk
16
+ from sentry_sdk.utils import logger
17
+
18
+ MAX_GEN_AI_MESSAGE_BYTES = 20_000 # 20KB
19
+ # Maximum characters when only a single message is left after bytes truncation
20
+ MAX_SINGLE_MESSAGE_CONTENT_CHARS = 10_000
21
+
22
+
23
+ class GEN_AI_ALLOWED_MESSAGE_ROLES:
24
+ SYSTEM = "system"
25
+ USER = "user"
26
+ ASSISTANT = "assistant"
27
+ TOOL = "tool"
28
+
29
+
30
+ GEN_AI_MESSAGE_ROLE_REVERSE_MAPPING = {
31
+ GEN_AI_ALLOWED_MESSAGE_ROLES.SYSTEM: ["system"],
32
+ GEN_AI_ALLOWED_MESSAGE_ROLES.USER: ["user", "human"],
33
+ GEN_AI_ALLOWED_MESSAGE_ROLES.ASSISTANT: ["assistant", "ai"],
34
+ GEN_AI_ALLOWED_MESSAGE_ROLES.TOOL: ["tool", "tool_call"],
35
+ }
36
+
37
+ GEN_AI_MESSAGE_ROLE_MAPPING = {}
38
+ for target_role, source_roles in GEN_AI_MESSAGE_ROLE_REVERSE_MAPPING.items():
39
+ for source_role in source_roles:
40
+ GEN_AI_MESSAGE_ROLE_MAPPING[source_role] = target_role
41
+
42
+
43
+ def parse_data_uri(url: str) -> "Tuple[str, str]":
44
+ """
45
+ Parse a data URI and return (mime_type, content).
46
+
47
+ Data URI format (RFC 2397): data:[<mediatype>][;base64],<data>
48
+
49
+ Examples:
50
+ data:image/jpeg;base64,/9j/4AAQ... → ("image/jpeg", "/9j/4AAQ...")
51
+ data:text/plain,Hello → ("text/plain", "Hello")
52
+ data:;base64,SGVsbG8= → ("", "SGVsbG8=")
53
+
54
+ Raises:
55
+ ValueError: If the URL is not a valid data URI (missing comma separator)
56
+ """
57
+ if "," not in url:
58
+ raise ValueError("Invalid data URI: missing comma separator")
59
+
60
+ header, content = url.split(",", 1)
61
+
62
+ # Extract mime type from header
63
+ # Format: "data:<mime>[;param1][;param2]..." e.g. "data:image/jpeg;base64"
64
+ # Remove "data:" prefix, then take everything before the first semicolon
65
+ if header.startswith("data:"):
66
+ mime_part = header[5:] # Remove "data:" prefix
67
+ else:
68
+ mime_part = header
69
+
70
+ mime_type = mime_part.split(";")[0]
71
+
72
+ return mime_type, content
73
+
74
+
75
+ def get_modality_from_mime_type(mime_type: str) -> str:
76
+ """
77
+ Infer the content modality from a MIME type string.
78
+
79
+ Args:
80
+ mime_type: A MIME type string (e.g., "image/jpeg", "audio/mp3")
81
+
82
+ Returns:
83
+ One of: "image", "audio", "video", or "document"
84
+ Defaults to "image" for unknown or empty MIME types.
85
+
86
+ Examples:
87
+ "image/jpeg" -> "image"
88
+ "audio/mp3" -> "audio"
89
+ "video/mp4" -> "video"
90
+ "application/pdf" -> "document"
91
+ "text/plain" -> "document"
92
+ """
93
+ if not mime_type:
94
+ return "image" # Default fallback
95
+
96
+ mime_lower = mime_type.lower()
97
+ if mime_lower.startswith("image/"):
98
+ return "image"
99
+ elif mime_lower.startswith("audio/"):
100
+ return "audio"
101
+ elif mime_lower.startswith("video/"):
102
+ return "video"
103
+ elif mime_lower.startswith("application/") or mime_lower.startswith("text/"):
104
+ return "document"
105
+ else:
106
+ return "image" # Default fallback for unknown types
107
+
108
+
109
+ def transform_openai_content_part(
110
+ content_part: "Dict[str, Any]",
111
+ ) -> "Optional[Dict[str, Any]]":
112
+ """
113
+ Transform an OpenAI/LiteLLM content part to Sentry's standardized format.
114
+
115
+ This handles the OpenAI image_url format used by OpenAI and LiteLLM SDKs.
116
+
117
+ Input format:
118
+ - {"type": "image_url", "image_url": {"url": "..."}}
119
+ - {"type": "image_url", "image_url": "..."} (string shorthand)
120
+
121
+ Output format (one of):
122
+ - {"type": "blob", "modality": "image", "mime_type": "...", "content": "..."}
123
+ - {"type": "uri", "modality": "image", "mime_type": "", "uri": "..."}
124
+
125
+ Args:
126
+ content_part: A dictionary representing a content part from OpenAI/LiteLLM
127
+
128
+ Returns:
129
+ A transformed dictionary in standardized format, or None if the format
130
+ is not OpenAI image_url format or transformation fails.
131
+ """
132
+ if not isinstance(content_part, dict):
133
+ return None
134
+
135
+ block_type = content_part.get("type")
136
+
137
+ if block_type != "image_url":
138
+ return None
139
+
140
+ image_url_data = content_part.get("image_url")
141
+ if isinstance(image_url_data, str):
142
+ url = image_url_data
143
+ elif isinstance(image_url_data, dict):
144
+ url = image_url_data.get("url", "")
145
+ else:
146
+ return None
147
+
148
+ if not url:
149
+ return None
150
+
151
+ # Check if it's a data URI (base64 encoded)
152
+ if url.startswith("data:"):
153
+ try:
154
+ mime_type, content = parse_data_uri(url)
155
+ return {
156
+ "type": "blob",
157
+ "modality": get_modality_from_mime_type(mime_type),
158
+ "mime_type": mime_type,
159
+ "content": content,
160
+ }
161
+ except ValueError:
162
+ # If parsing fails, return as URI
163
+ return {
164
+ "type": "uri",
165
+ "modality": "image",
166
+ "mime_type": "",
167
+ "uri": url,
168
+ }
169
+ else:
170
+ # Regular URL
171
+ return {
172
+ "type": "uri",
173
+ "modality": "image",
174
+ "mime_type": "",
175
+ "uri": url,
176
+ }
177
+
178
+
179
+ def transform_anthropic_content_part(
180
+ content_part: "Dict[str, Any]",
181
+ ) -> "Optional[Dict[str, Any]]":
182
+ """
183
+ Transform an Anthropic content part to Sentry's standardized format.
184
+
185
+ This handles the Anthropic image and document formats with source dictionaries.
186
+
187
+ Input format:
188
+ - {"type": "image", "source": {"type": "base64", "media_type": "...", "data": "..."}}
189
+ - {"type": "image", "source": {"type": "url", "media_type": "...", "url": "..."}}
190
+ - {"type": "image", "source": {"type": "file", "media_type": "...", "file_id": "..."}}
191
+ - {"type": "document", "source": {...}} (same source formats)
192
+
193
+ Output format (one of):
194
+ - {"type": "blob", "modality": "...", "mime_type": "...", "content": "..."}
195
+ - {"type": "uri", "modality": "...", "mime_type": "...", "uri": "..."}
196
+ - {"type": "file", "modality": "...", "mime_type": "...", "file_id": "..."}
197
+
198
+ Args:
199
+ content_part: A dictionary representing a content part from Anthropic
200
+
201
+ Returns:
202
+ A transformed dictionary in standardized format, or None if the format
203
+ is not Anthropic format or transformation fails.
204
+ """
205
+ if not isinstance(content_part, dict):
206
+ return None
207
+
208
+ block_type = content_part.get("type")
209
+
210
+ if block_type not in ("image", "document") or "source" not in content_part:
211
+ return None
212
+
213
+ source = content_part.get("source")
214
+ if not isinstance(source, dict):
215
+ return None
216
+
217
+ source_type = source.get("type")
218
+ media_type = source.get("media_type", "")
219
+ modality = (
220
+ "document"
221
+ if block_type == "document"
222
+ else get_modality_from_mime_type(media_type)
223
+ )
224
+
225
+ if source_type == "base64":
226
+ return {
227
+ "type": "blob",
228
+ "modality": modality,
229
+ "mime_type": media_type,
230
+ "content": source.get("data", ""),
231
+ }
232
+ elif source_type == "url":
233
+ return {
234
+ "type": "uri",
235
+ "modality": modality,
236
+ "mime_type": media_type,
237
+ "uri": source.get("url", ""),
238
+ }
239
+ elif source_type == "file":
240
+ return {
241
+ "type": "file",
242
+ "modality": modality,
243
+ "mime_type": media_type,
244
+ "file_id": source.get("file_id", ""),
245
+ }
246
+
247
+ return None
248
+
249
+
250
+ def transform_google_content_part(
251
+ content_part: "Dict[str, Any]",
252
+ ) -> "Optional[Dict[str, Any]]":
253
+ """
254
+ Transform a Google GenAI content part to Sentry's standardized format.
255
+
256
+ This handles the Google GenAI inline_data and file_data formats.
257
+
258
+ Input format:
259
+ - {"inline_data": {"mime_type": "...", "data": "..."}}
260
+ - {"file_data": {"mime_type": "...", "file_uri": "..."}}
261
+
262
+ Output format (one of):
263
+ - {"type": "blob", "modality": "...", "mime_type": "...", "content": "..."}
264
+ - {"type": "uri", "modality": "...", "mime_type": "...", "uri": "..."}
265
+
266
+ Args:
267
+ content_part: A dictionary representing a content part from Google GenAI
268
+
269
+ Returns:
270
+ A transformed dictionary in standardized format, or None if the format
271
+ is not Google format or transformation fails.
272
+ """
273
+ if not isinstance(content_part, dict):
274
+ return None
275
+
276
+ # Handle Google inline_data format
277
+ if "inline_data" in content_part:
278
+ inline_data = content_part.get("inline_data")
279
+ if isinstance(inline_data, dict):
280
+ mime_type = inline_data.get("mime_type", "")
281
+ return {
282
+ "type": "blob",
283
+ "modality": get_modality_from_mime_type(mime_type),
284
+ "mime_type": mime_type,
285
+ "content": inline_data.get("data", ""),
286
+ }
287
+ return None
288
+
289
+ # Handle Google file_data format
290
+ if "file_data" in content_part:
291
+ file_data = content_part.get("file_data")
292
+ if isinstance(file_data, dict):
293
+ mime_type = file_data.get("mime_type", "")
294
+ return {
295
+ "type": "uri",
296
+ "modality": get_modality_from_mime_type(mime_type),
297
+ "mime_type": mime_type,
298
+ "uri": file_data.get("file_uri", ""),
299
+ }
300
+ return None
301
+
302
+ return None
303
+
304
+
305
+ def transform_generic_content_part(
306
+ content_part: "Dict[str, Any]",
307
+ ) -> "Optional[Dict[str, Any]]":
308
+ """
309
+ Transform a generic/LangChain-style content part to Sentry's standardized format.
310
+
311
+ This handles generic formats where the type indicates the modality and
312
+ the data is provided via direct base64, url, or file_id fields.
313
+
314
+ Input format:
315
+ - {"type": "image", "base64": "...", "mime_type": "..."}
316
+ - {"type": "audio", "url": "...", "mime_type": "..."}
317
+ - {"type": "video", "base64": "...", "mime_type": "..."}
318
+ - {"type": "file", "file_id": "...", "mime_type": "..."}
319
+
320
+ Output format (one of):
321
+ - {"type": "blob", "modality": "...", "mime_type": "...", "content": "..."}
322
+ - {"type": "uri", "modality": "...", "mime_type": "...", "uri": "..."}
323
+ - {"type": "file", "modality": "...", "mime_type": "...", "file_id": "..."}
324
+
325
+ Args:
326
+ content_part: A dictionary representing a content part in generic format
327
+
328
+ Returns:
329
+ A transformed dictionary in standardized format, or None if the format
330
+ is not generic format or transformation fails.
331
+ """
332
+ if not isinstance(content_part, dict):
333
+ return None
334
+
335
+ block_type = content_part.get("type")
336
+
337
+ if block_type not in ("image", "audio", "video", "file"):
338
+ return None
339
+
340
+ # Ensure it's not Anthropic format (which also uses type: "image")
341
+ if "source" in content_part:
342
+ return None
343
+
344
+ mime_type = content_part.get("mime_type", "")
345
+ modality = block_type if block_type != "file" else "document"
346
+
347
+ # Check for base64 encoded content
348
+ if "base64" in content_part:
349
+ return {
350
+ "type": "blob",
351
+ "modality": modality,
352
+ "mime_type": mime_type,
353
+ "content": content_part.get("base64", ""),
354
+ }
355
+ # Check for URL reference
356
+ elif "url" in content_part:
357
+ return {
358
+ "type": "uri",
359
+ "modality": modality,
360
+ "mime_type": mime_type,
361
+ "uri": content_part.get("url", ""),
362
+ }
363
+ # Check for file_id reference
364
+ elif "file_id" in content_part:
365
+ return {
366
+ "type": "file",
367
+ "modality": modality,
368
+ "mime_type": mime_type,
369
+ "file_id": content_part.get("file_id", ""),
370
+ }
371
+
372
+ return None
373
+
374
+
375
+ def transform_content_part(
376
+ content_part: "Dict[str, Any]",
377
+ ) -> "Optional[Dict[str, Any]]":
378
+ """
379
+ Transform a content part from various AI SDK formats to Sentry's standardized format.
380
+
381
+ This is a heuristic dispatcher that detects the format and delegates to the
382
+ appropriate SDK-specific transformer. For direct SDK integration, prefer using
383
+ the specific transformers directly:
384
+ - transform_openai_content_part() for OpenAI/LiteLLM
385
+ - transform_anthropic_content_part() for Anthropic
386
+ - transform_google_content_part() for Google GenAI
387
+ - transform_generic_content_part() for LangChain and other generic formats
388
+
389
+ Detection order:
390
+ 1. OpenAI: type == "image_url"
391
+ 2. Google: "inline_data" or "file_data" keys present
392
+ 3. Anthropic: type in ("image", "document") with "source" key
393
+ 4. Generic: type in ("image", "audio", "video", "file") with base64/url/file_id
394
+
395
+ Output format (one of):
396
+ - {"type": "blob", "modality": "...", "mime_type": "...", "content": "..."}
397
+ - {"type": "uri", "modality": "...", "mime_type": "...", "uri": "..."}
398
+ - {"type": "file", "modality": "...", "mime_type": "...", "file_id": "..."}
399
+
400
+ Args:
401
+ content_part: A dictionary representing a content part from an AI SDK
402
+
403
+ Returns:
404
+ A transformed dictionary in standardized format, or None if the format
405
+ is unrecognized or transformation fails.
406
+ """
407
+ if not isinstance(content_part, dict):
408
+ return None
409
+
410
+ # Try OpenAI format first (most common, clear indicator)
411
+ result = transform_openai_content_part(content_part)
412
+ if result is not None:
413
+ return result
414
+
415
+ # Try Google format (unique keys make it easy to detect)
416
+ result = transform_google_content_part(content_part)
417
+ if result is not None:
418
+ return result
419
+
420
+ # Try Anthropic format (has "source" key)
421
+ result = transform_anthropic_content_part(content_part)
422
+ if result is not None:
423
+ return result
424
+
425
+ # Try generic format as fallback
426
+ result = transform_generic_content_part(content_part)
427
+ if result is not None:
428
+ return result
429
+
430
+ # Unrecognized format
431
+ return None
432
+
433
+
434
+ def transform_message_content(content: "Any") -> "Any":
435
+ """
436
+ Transform message content, handling both string content and list of content blocks.
437
+
438
+ For list content, each item is transformed using transform_content_part().
439
+ Items that cannot be transformed (return None) are kept as-is.
440
+
441
+ Args:
442
+ content: Message content - can be a string, list of content blocks, or other
443
+
444
+ Returns:
445
+ - String content: returned as-is
446
+ - List content: list with each transformable item converted to standardized format
447
+ - Other: returned as-is
448
+ """
449
+ if isinstance(content, str):
450
+ return content
451
+
452
+ if isinstance(content, (list, tuple)):
453
+ transformed = []
454
+ for item in content:
455
+ if isinstance(item, dict):
456
+ result = transform_content_part(item)
457
+ # If transformation succeeded, use the result; otherwise keep original
458
+ transformed.append(result if result is not None else item)
459
+ else:
460
+ transformed.append(item)
461
+ return transformed
462
+
463
+ return content
464
+
465
+
466
+ def _normalize_data(data: "Any", unpack: bool = True) -> "Any":
467
+ # convert pydantic data (e.g. OpenAI v1+) to json compatible format
468
+ if hasattr(data, "model_dump"):
469
+ # Check if it's a class (type) rather than an instance
470
+ # Model classes can be passed as arguments (e.g., for schema definitions)
471
+ if inspect.isclass(data):
472
+ return f"<ClassType: {data.__name__}>"
473
+
474
+ try:
475
+ return _normalize_data(data.model_dump(), unpack=unpack)
476
+ except Exception as e:
477
+ logger.warning("Could not convert pydantic data to JSON: %s", e)
478
+ return data if isinstance(data, (int, float, bool, str)) else str(data)
479
+
480
+ if isinstance(data, list):
481
+ if unpack and len(data) == 1:
482
+ return _normalize_data(data[0], unpack=unpack) # remove empty dimensions
483
+ return list(_normalize_data(x, unpack=unpack) for x in data)
484
+
485
+ if isinstance(data, dict):
486
+ return {k: _normalize_data(v, unpack=unpack) for (k, v) in data.items()}
487
+
488
+ return data if isinstance(data, (int, float, bool, str)) else str(data)
489
+
490
+
491
+ def set_data_normalized(
492
+ span: "Span", key: str, value: "Any", unpack: bool = True
493
+ ) -> None:
494
+ normalized = _normalize_data(value, unpack=unpack)
495
+ if isinstance(normalized, (int, float, bool, str)):
496
+ span.set_data(key, normalized)
497
+ else:
498
+ span.set_data(key, json.dumps(normalized))
499
+
500
+
501
+ def normalize_message_role(role: str) -> str:
502
+ """
503
+ Normalize a message role to one of the 4 allowed gen_ai role values.
504
+ Maps "ai" -> "assistant" and keeps other standard roles unchanged.
505
+ """
506
+ return GEN_AI_MESSAGE_ROLE_MAPPING.get(role, role)
507
+
508
+
509
+ def normalize_message_roles(messages: "list[dict[str, Any]]") -> "list[dict[str, Any]]":
510
+ """
511
+ Normalize roles in a list of messages to use standard gen_ai role values.
512
+ Creates a deep copy to avoid modifying the original messages.
513
+ """
514
+ normalized_messages = []
515
+ for message in messages:
516
+ if not isinstance(message, dict):
517
+ normalized_messages.append(message)
518
+ continue
519
+ normalized_message = message.copy()
520
+ if "role" in message:
521
+ normalized_message["role"] = normalize_message_role(message["role"])
522
+ normalized_messages.append(normalized_message)
523
+
524
+ return normalized_messages
525
+
526
+
527
+ def get_start_span_function() -> "Callable[..., Any]":
528
+ current_span = sentry_sdk.get_current_span()
529
+ transaction_exists = (
530
+ current_span is not None and current_span.containing_transaction is not None
531
+ )
532
+ return sentry_sdk.start_span if transaction_exists else sentry_sdk.start_transaction
533
+
534
+
535
+ def _truncate_single_message_content_if_present(
536
+ message: "Dict[str, Any]", max_chars: int
537
+ ) -> "Dict[str, Any]":
538
+ """
539
+ Truncate a message's content to at most `max_chars` characters and append an
540
+ ellipsis if truncation occurs.
541
+ """
542
+ if not isinstance(message, dict) or "content" not in message:
543
+ return message
544
+ content = message["content"]
545
+
546
+ if not isinstance(content, str) or len(content) <= max_chars:
547
+ return message
548
+
549
+ message["content"] = content[:max_chars] + "..."
550
+ return message
551
+
552
+
553
+ def _find_truncation_index(messages: "List[Dict[str, Any]]", max_bytes: int) -> int:
554
+ """
555
+ Find the index of the first message that would exceed the max bytes limit.
556
+ Compute the individual message sizes, and return the index of the first message from the back
557
+ of the list that would exceed the max bytes limit.
558
+ """
559
+ running_sum = 0
560
+ for idx in range(len(messages) - 1, -1, -1):
561
+ size = len(json.dumps(messages[idx], separators=(",", ":")).encode("utf-8"))
562
+ running_sum += size
563
+ if running_sum > max_bytes:
564
+ return idx + 1
565
+
566
+ return 0
567
+
568
+
569
+ def redact_blob_message_parts(
570
+ messages: "List[Dict[str, Any]]",
571
+ ) -> "List[Dict[str, Any]]":
572
+ """
573
+ Redact blob message parts from the messages by replacing blob content with "[Filtered]".
574
+
575
+ This function creates a deep copy of messages that contain blob content to avoid
576
+ mutating the original message dictionaries. Messages without blob content are
577
+ returned as-is to minimize copying overhead.
578
+
579
+ e.g:
580
+ {
581
+ "role": "user",
582
+ "content": [
583
+ {
584
+ "text": "How many ponies do you see in the image?",
585
+ "type": "text"
586
+ },
587
+ {
588
+ "type": "blob",
589
+ "modality": "image",
590
+ "mime_type": "image/jpeg",
591
+ "content": "data:image/jpeg;base64,..."
592
+ }
593
+ ]
594
+ }
595
+ becomes:
596
+ {
597
+ "role": "user",
598
+ "content": [
599
+ {
600
+ "text": "How many ponies do you see in the image?",
601
+ "type": "text"
602
+ },
603
+ {
604
+ "type": "blob",
605
+ "modality": "image",
606
+ "mime_type": "image/jpeg",
607
+ "content": "[Filtered]"
608
+ }
609
+ ]
610
+ }
611
+ """
612
+
613
+ # First pass: check if any message contains blob content
614
+ has_blobs = False
615
+ for message in messages:
616
+ if not isinstance(message, dict):
617
+ continue
618
+ content = message.get("content")
619
+ if isinstance(content, list):
620
+ for item in content:
621
+ if isinstance(item, dict) and item.get("type") == "blob":
622
+ has_blobs = True
623
+ break
624
+ if has_blobs:
625
+ break
626
+
627
+ # If no blobs found, return original messages to avoid unnecessary copying
628
+ if not has_blobs:
629
+ return messages
630
+
631
+ # Deep copy messages to avoid mutating the original
632
+ messages_copy = deepcopy(messages)
633
+
634
+ # Second pass: redact blob content in the copy
635
+ for message in messages_copy:
636
+ if not isinstance(message, dict):
637
+ continue
638
+
639
+ content = message.get("content")
640
+ if isinstance(content, list):
641
+ for item in content:
642
+ if isinstance(item, dict) and item.get("type") == "blob":
643
+ item["content"] = BLOB_DATA_SUBSTITUTE
644
+
645
+ return messages_copy
646
+
647
+
648
+ def truncate_messages_by_size(
649
+ messages: "List[Dict[str, Any]]",
650
+ max_bytes: int = MAX_GEN_AI_MESSAGE_BYTES,
651
+ max_single_message_chars: int = MAX_SINGLE_MESSAGE_CONTENT_CHARS,
652
+ ) -> "Tuple[List[Dict[str, Any]], int]":
653
+ """
654
+ Returns a truncated messages list, consisting of
655
+ - the last message, with its content truncated to `max_single_message_chars` characters,
656
+ if the last message's size exceeds `max_bytes` bytes; otherwise,
657
+ - the maximum number of messages, starting from the end of the `messages` list, whose total
658
+ serialized size does not exceed `max_bytes` bytes.
659
+
660
+ In the single message case, the serialized message size may exceed `max_bytes`, because
661
+ truncation is based only on character count in that case.
662
+ """
663
+ serialized_json = json.dumps(messages, separators=(",", ":"))
664
+ current_size = len(serialized_json.encode("utf-8"))
665
+
666
+ if current_size <= max_bytes:
667
+ return messages, 0
668
+
669
+ truncation_index = _find_truncation_index(messages, max_bytes)
670
+ if truncation_index < len(messages):
671
+ truncated_messages = messages[truncation_index:]
672
+ else:
673
+ truncation_index = len(messages) - 1
674
+ truncated_messages = messages[-1:]
675
+
676
+ if len(truncated_messages) == 1:
677
+ truncated_messages[0] = _truncate_single_message_content_if_present(
678
+ deepcopy(truncated_messages[0]), max_chars=max_single_message_chars
679
+ )
680
+
681
+ return truncated_messages, truncation_index
682
+
683
+
684
+ def truncate_and_annotate_messages(
685
+ messages: "Optional[List[Dict[str, Any]]]",
686
+ span: "Any",
687
+ scope: "Any",
688
+ max_single_message_chars: int = MAX_SINGLE_MESSAGE_CONTENT_CHARS,
689
+ ) -> "Optional[List[Dict[str, Any]]]":
690
+ if not messages:
691
+ return None
692
+
693
+ messages = redact_blob_message_parts(messages)
694
+
695
+ truncated_message = _truncate_single_message_content_if_present(
696
+ deepcopy(messages[-1]), max_chars=max_single_message_chars
697
+ )
698
+ if len(messages) > 1:
699
+ scope._gen_ai_original_message_count[span.span_id] = len(messages)
700
+
701
+ return [truncated_message]
702
+
703
+
704
+ def truncate_and_annotate_embedding_inputs(
705
+ messages: "Optional[List[Dict[str, Any]]]",
706
+ span: "Any",
707
+ scope: "Any",
708
+ max_bytes: int = MAX_GEN_AI_MESSAGE_BYTES,
709
+ ) -> "Optional[List[Dict[str, Any]]]":
710
+ if not messages:
711
+ return None
712
+
713
+ messages = redact_blob_message_parts(messages)
714
+
715
+ truncated_messages, removed_count = truncate_messages_by_size(messages, max_bytes)
716
+ if removed_count > 0:
717
+ scope._gen_ai_original_message_count[span.span_id] = len(messages)
718
+
719
+ return truncated_messages
720
+
721
+
722
+ def set_conversation_id(conversation_id: str) -> None:
723
+ """
724
+ Set the conversation_id in the scope.
725
+ """
726
+ scope = sentry_sdk.get_current_scope()
727
+ scope.set_conversation_id(conversation_id)