diff --git a/.gitattributes b/.gitattributes
index dcd6fcfc5cdf08d2cd77de1cbd2605b04c46c0cb..4e0b121e17ad5102cb2b74385a6197d03ecc1603 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -188,3 +188,18 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
.venv_haddock/lib/python3.12/site-packages/scipy/spatial/_qhull.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
.venv_haddock/lib/python3.12/site-packages/scipy/spatial/transform/_rigid_transform_cy.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
.venv_haddock/lib/python3.12/site-packages/scipy/spatial/transform/_rotation_cy.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm_2.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_gufuncs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_specfun.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_special_ufuncs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs_cxx.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/special/cython_special.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_ansari_swilk_statistics.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_biasedurn.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_qmc_cy.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_qmvnt_cy.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_sobol.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_stats.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_stats_pythran.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
+.venv_haddock/lib/python3.12/site-packages/scipy/stats/_unuran/unuran_wrapper.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._INSTALLER b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._INSTALLER differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._LICENSE.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._LICENSE.txt differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._METADATA b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._METADATA differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._RECORD b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._RECORD
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._RECORD differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._WHEEL b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._WHEEL
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/._WHEEL differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/INSTALLER b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/LICENSE.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4aa1cdf245553ae4a714aed40311ad61885c555d
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/LICENSE.txt
@@ -0,0 +1,934 @@
+Copyright (c) 2001-2002 Enthought, Inc. 2003, SciPy Developers.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----
+
+This binary distribution of SciPy can also bundle the following software
+(depending on the build):
+
+
+Name: OpenBLAS
+Files: scipy/.dylibs/libscipy_openblas*.so
+Description: bundled as a dynamically linked library
+Availability: https://github.com/OpenMathLib/OpenBLAS/
+License: BSD-3-Clause
+ Copyright (c) 2011-2014, The OpenBLAS Project
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the name of the OpenBLAS project nor the names of
+ its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Name: LAPACK
+Files: scipy/.dylibs/libscipy_openblas*.so
+Description: bundled in OpenBLAS
+Availability: https://github.com/OpenMathLib/OpenBLAS/
+License: BSD-3-Clause-Open-MPI
+ Copyright (c) 1992-2013 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+ Copyright (c) 2000-2013 The University of California Berkeley. All
+ rights reserved.
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
+ reserved.
+
+ $COPYRIGHT$
+
+ Additional copyrights may follow
+
+ $HEADER$
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer listed
+ in this license in the documentation and/or other materials
+ provided with the distribution.
+
+ - Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ The copyright holders provide no reassurances that the source code
+ provided does not infringe any patent, copyright, or any other
+ intellectual property rights of third parties. The copyright holders
+ disclaim any liability to any recipient for claims brought against
+ recipient by any third party for infringement of that parties
+ intellectual property rights.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Name: GCC runtime library
+Files: scipy/.dylibs/libgfortran*, scipy/.dylibs/libgcc*
+Description: dynamically linked to files compiled with gcc
+Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
+License: GPL-3.0-or-later WITH GCC-exception-3.1
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+ Libgfortran is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgfortran is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ .
+
+----
+
+Full text of license texts referred to above follows (that they are
+listed below does not necessarily imply the conditions apply to the
+present binary release):
+
+----
+
+GCC RUNTIME LIBRARY EXCEPTION
+
+Version 3.1, 31 March 2009
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+This GCC Runtime Library Exception ("Exception") is an additional
+permission under section 7 of the GNU General Public License, version
+3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
+bears a notice placed by the copyright holder of the file stating that
+the file is governed by GPLv3 along with this Exception.
+
+When you use GCC to compile a program, GCC may combine portions of
+certain GCC header files and runtime libraries with the compiled
+program. The purpose of this Exception is to allow compilation of
+non-GPL (including proprietary) programs to use, in this way, the
+header files and runtime libraries covered by this Exception.
+
+0. Definitions.
+
+A file is an "Independent Module" if it either requires the Runtime
+Library for execution after a Compilation Process, or makes use of an
+interface provided by the Runtime Library, but is not otherwise based
+on the Runtime Library.
+
+"GCC" means a version of the GNU Compiler Collection, with or without
+modifications, governed by version 3 (or a specified later version) of
+the GNU General Public License (GPL) with the option of using any
+subsequent versions published by the FSF.
+
+"GPL-compatible Software" is software whose conditions of propagation,
+modification and use would permit combination with GCC in accord with
+the license of GCC.
+
+"Target Code" refers to output from any compiler for a real or virtual
+target processor architecture, in executable form or suitable for
+input to an assembler, loader, linker and/or execution
+phase. Notwithstanding that, Target Code does not include data in any
+format that is used as a compiler intermediate representation, or used
+for producing a compiler intermediate representation.
+
+The "Compilation Process" transforms code entirely represented in
+non-intermediate languages designed for human-written code, and/or in
+Java Virtual Machine byte code, into Target Code. Thus, for example,
+use of source code generators and preprocessors need not be considered
+part of the Compilation Process, since the Compilation Process can be
+understood as starting with the output of the generators or
+preprocessors.
+
+A Compilation Process is "Eligible" if it is done using GCC, alone or
+with other GPL-compatible software, or if it is done without using any
+work based on GCC. For example, using non-GPL-compatible Software to
+optimize any GCC intermediate representations would not qualify as an
+Eligible Compilation Process.
+
+1. Grant of Additional Permission.
+
+You have permission to propagate a work of Target Code formed by
+combining the Runtime Library with Independent Modules, even if such
+propagation would otherwise violate the terms of GPLv3, provided that
+all Target Code was generated by Eligible Compilation Processes. You
+may then convey such a combination under terms of your choice,
+consistent with the licensing of the Independent Modules.
+
+2. No Weakening of GCC Copyleft.
+
+The availability of this Exception does not imply any general
+presumption that third-party software is unaffected by the copyleft
+requirements of the license of GCC.
+
+----
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
+
+
+Name: libquadmath
+Files: scipy/.dylibs/libquadmath*.so
+Description: dynamically linked to files compiled with gcc
+Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
+License: LGPL-2.1-or-later
+
+ GCC Quad-Precision Math Library
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Written by Francois-Xavier Coudert
+
+ This file is part of the libquadmath library.
+ Libquadmath is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ Libquadmath is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/METADATA b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..3fae2a783a0eca8e69f212fdfa984208ecce9225
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/METADATA
@@ -0,0 +1,1086 @@
+Metadata-Version: 2.1
+Name: scipy
+Version: 1.17.1
+Summary: Fundamental algorithms for scientific computing in Python
+Maintainer-Email: SciPy Developers
+License: Copyright (c) 2001-2002 Enthought, Inc. 2003, SciPy Developers.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ----
+
+ This binary distribution of SciPy can also bundle the following software
+ (depending on the build):
+
+
+ Name: OpenBLAS
+ Files: scipy/.dylibs/libscipy_openblas*.so
+ Description: bundled as a dynamically linked library
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
+ License: BSD-3-Clause
+ Copyright (c) 2011-2014, The OpenBLAS Project
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the name of the OpenBLAS project nor the names of
+ its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Name: LAPACK
+ Files: scipy/.dylibs/libscipy_openblas*.so
+ Description: bundled in OpenBLAS
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
+ License: BSD-3-Clause-Open-MPI
+ Copyright (c) 1992-2013 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+ Copyright (c) 2000-2013 The University of California Berkeley. All
+ rights reserved.
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
+ reserved.
+
+ $COPYRIGHT$
+
+ Additional copyrights may follow
+
+ $HEADER$
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer listed
+ in this license in the documentation and/or other materials
+ provided with the distribution.
+
+ - Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ The copyright holders provide no reassurances that the source code
+ provided does not infringe any patent, copyright, or any other
+ intellectual property rights of third parties. The copyright holders
+ disclaim any liability to any recipient for claims brought against
+ recipient by any third party for infringement of that parties
+ intellectual property rights.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Name: GCC runtime library
+ Files: scipy/.dylibs/libgfortran*, scipy/.dylibs/libgcc*
+ Description: dynamically linked to files compiled with gcc
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
+ License: GPL-3.0-or-later WITH GCC-exception-3.1
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+ Libgfortran is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgfortran is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ .
+
+ ----
+
+ Full text of license texts referred to above follows (that they are
+ listed below does not necessarily imply the conditions apply to the
+ present binary release):
+
+ ----
+
+ GCC RUNTIME LIBRARY EXCEPTION
+
+ Version 3.1, 31 March 2009
+
+ Copyright (C) 2009 Free Software Foundation, Inc.
+
+ Everyone is permitted to copy and distribute verbatim copies of this
+ license document, but changing it is not allowed.
+
+ This GCC Runtime Library Exception ("Exception") is an additional
+ permission under section 7 of the GNU General Public License, version
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
+ bears a notice placed by the copyright holder of the file stating that
+ the file is governed by GPLv3 along with this Exception.
+
+ When you use GCC to compile a program, GCC may combine portions of
+ certain GCC header files and runtime libraries with the compiled
+ program. The purpose of this Exception is to allow compilation of
+ non-GPL (including proprietary) programs to use, in this way, the
+ header files and runtime libraries covered by this Exception.
+
+ 0. Definitions.
+
+ A file is an "Independent Module" if it either requires the Runtime
+ Library for execution after a Compilation Process, or makes use of an
+ interface provided by the Runtime Library, but is not otherwise based
+ on the Runtime Library.
+
+ "GCC" means a version of the GNU Compiler Collection, with or without
+ modifications, governed by version 3 (or a specified later version) of
+ the GNU General Public License (GPL) with the option of using any
+ subsequent versions published by the FSF.
+
+ "GPL-compatible Software" is software whose conditions of propagation,
+ modification and use would permit combination with GCC in accord with
+ the license of GCC.
+
+ "Target Code" refers to output from any compiler for a real or virtual
+ target processor architecture, in executable form or suitable for
+ input to an assembler, loader, linker and/or execution
+ phase. Notwithstanding that, Target Code does not include data in any
+ format that is used as a compiler intermediate representation, or used
+ for producing a compiler intermediate representation.
+
+ The "Compilation Process" transforms code entirely represented in
+ non-intermediate languages designed for human-written code, and/or in
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
+ use of source code generators and preprocessors need not be considered
+ part of the Compilation Process, since the Compilation Process can be
+ understood as starting with the output of the generators or
+ preprocessors.
+
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
+ with other GPL-compatible software, or if it is done without using any
+ work based on GCC. For example, using non-GPL-compatible Software to
+ optimize any GCC intermediate representations would not qualify as an
+ Eligible Compilation Process.
+
+ 1. Grant of Additional Permission.
+
+ You have permission to propagate a work of Target Code formed by
+ combining the Runtime Library with Independent Modules, even if such
+ propagation would otherwise violate the terms of GPLv3, provided that
+ all Target Code was generated by Eligible Compilation Processes. You
+ may then convey such a combination under terms of your choice,
+ consistent with the licensing of the Independent Modules.
+
+ 2. No Weakening of GCC Copyleft.
+
+ The availability of this Exception does not imply any general
+ presumption that third-party software is unaffected by the copyleft
+ requirements of the license of GCC.
+
+ ----
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+ software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+ to take away your freedom to share and change the works. By contrast,
+ the GNU General Public License is intended to guarantee your freedom to
+ share and change all versions of a program--to make sure it remains free
+ software for all its users. We, the Free Software Foundation, use the
+ GNU General Public License for most of our software; it applies also to
+ any other work released this way by its authors. You can apply it to
+ your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+ price. Our General Public Licenses are designed to make sure that you
+ have the freedom to distribute copies of free software (and charge for
+ them if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new
+ free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+ these rights or asking you to surrender the rights. Therefore, you have
+ certain responsibilities if you distribute copies of the software, or if
+ you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+ gratis or for a fee, you must pass on to the recipients the same
+ freedoms that you received. You must make sure that they, too, receive
+ or can get the source code. And you must show them these terms so they
+ know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+ (1) assert copyright on the software, and (2) offer you this License
+ giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+ that there is no warranty for this free software. For both users' and
+ authors' sake, the GPL requires that modified versions be marked as
+ changed, so that their problems will not be attributed erroneously to
+ authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+ modified versions of the software inside them, although the manufacturer
+ can do so. This is fundamentally incompatible with the aim of
+ protecting users' freedom to change the software. The systematic
+ pattern of such abuse occurs in the area of products for individuals to
+ use, which is precisely where it is most unacceptable. Therefore, we
+ have designed this version of the GPL to prohibit the practice for those
+ products. If such problems arise substantially in other domains, we
+ stand ready to extend this provision to those domains in future versions
+ of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+ States should not allow patents to restrict development and use of
+ software on general-purpose computers, but in those that do, we wish to
+ avoid the special danger that patents applied to a free program could
+ make it effectively proprietary. To prevent this, the GPL assures that
+ patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+ works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+ License. Each licensee is addressed as "you". "Licensees" and
+ "recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+ in a fashion requiring copyright permission, other than the making of an
+ exact copy. The resulting work is called a "modified version" of the
+ earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+ on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+ permission, would make you directly or secondarily liable for
+ infringement under applicable copyright law, except executing it on a
+ computer or modifying a private copy. Propagation includes copying,
+ distribution (with or without modification), making available to the
+ public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+ parties to make or receive copies. Mere interaction with a user through
+ a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+ to the extent that it includes a convenient and prominently visible
+ feature that (1) displays an appropriate copyright notice, and (2)
+ tells the user that there is no warranty for the work (except to the
+ extent that warranties are provided), that licensees may convey the
+ work under this License, and how to view a copy of this License. If
+ the interface presents a list of user commands or options, such as a
+ menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+ for making modifications to it. "Object code" means any non-source
+ form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+ standard defined by a recognized standards body, or, in the case of
+ interfaces specified for a particular programming language, one that
+ is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+ than the work as a whole, that (a) is included in the normal form of
+ packaging a Major Component, but which is not part of that Major
+ Component, and (b) serves only to enable use of the work with that
+ Major Component, or to implement a Standard Interface for which an
+ implementation is available to the public in source code form. A
+ "Major Component", in this context, means a major essential component
+ (kernel, window system, and so on) of the specific operating system
+ (if any) on which the executable work runs, or a compiler used to
+ produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+ the source code needed to generate, install, and (for an executable
+ work) run the object code and to modify the work, including scripts to
+ control those activities. However, it does not include the work's
+ System Libraries, or general-purpose tools or generally available free
+ programs which are used unmodified in performing those activities but
+ which are not part of the work. For example, Corresponding Source
+ includes interface definition files associated with source files for
+ the work, and the source code for shared libraries and dynamically
+ linked subprograms that the work is specifically designed to require,
+ such as by intimate data communication or control flow between those
+ subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+ can regenerate automatically from other parts of the Corresponding
+ Source.
+
+ The Corresponding Source for a work in source code form is that
+ same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+ copyright on the Program, and are irrevocable provided the stated
+ conditions are met. This License explicitly affirms your unlimited
+ permission to run the unmodified Program. The output from running a
+ covered work is covered by this License only if the output, given its
+ content, constitutes a covered work. This License acknowledges your
+ rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+ convey, without conditions so long as your license otherwise remains
+ in force. You may convey covered works to others for the sole purpose
+ of having them make modifications exclusively for you, or provide you
+ with facilities for running those works, provided that you comply with
+ the terms of this License in conveying all material for which you do
+ not control copyright. Those thus making or running the covered works
+ for you must do so exclusively on your behalf, under your direction
+ and control, on terms that prohibit them from making any copies of
+ your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+ the conditions stated below. Sublicensing is not allowed; section 10
+ makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+ measure under any applicable law fulfilling obligations under article
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
+ similar laws prohibiting or restricting circumvention of such
+ measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+ circumvention of technological measures to the extent such circumvention
+ is effected by exercising rights under this License with respect to
+ the covered work, and you disclaim any intention to limit operation or
+ modification of the work as a means of enforcing, against the work's
+ users, your or third parties' legal rights to forbid circumvention of
+ technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+ receive it, in any medium, provided that you conspicuously and
+ appropriately publish on each copy an appropriate copyright notice;
+ keep intact all notices stating that this License and any
+ non-permissive terms added in accord with section 7 apply to the code;
+ keep intact all notices of the absence of any warranty; and give all
+ recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+ and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+ produce it from the Program, in the form of source code under the
+ terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+ works, which are not by their nature extensions of the covered work,
+ and which are not combined with it such as to form a larger program,
+ in or on a volume of a storage or distribution medium, is called an
+ "aggregate" if the compilation and its resulting copyright are not
+ used to limit the access or legal rights of the compilation's users
+ beyond what the individual works permit. Inclusion of a covered work
+ in an aggregate does not cause this License to apply to the other
+ parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+ of sections 4 and 5, provided that you also convey the
+ machine-readable Corresponding Source under the terms of this License,
+ in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+ from the Corresponding Source as a System Library, need not be
+ included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+ tangible personal property which is normally used for personal, family,
+ or household purposes, or (2) anything designed or sold for incorporation
+ into a dwelling. In determining whether a product is a consumer product,
+ doubtful cases shall be resolved in favor of coverage. For a particular
+ product received by a particular user, "normally used" refers to a
+ typical or common use of that class of product, regardless of the status
+ of the particular user or of the way in which the particular user
+ actually uses, or expects or is expected to use, the product. A product
+ is a consumer product regardless of whether the product has substantial
+ commercial, industrial or non-consumer uses, unless such uses represent
+ the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+ procedures, authorization keys, or other information required to install
+ and execute modified versions of a covered work in that User Product from
+ a modified version of its Corresponding Source. The information must
+ suffice to ensure that the continued functioning of the modified object
+ code is in no case prevented or interfered with solely because
+ modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+ specifically for use in, a User Product, and the conveying occurs as
+ part of a transaction in which the right of possession and use of the
+ User Product is transferred to the recipient in perpetuity or for a
+ fixed term (regardless of how the transaction is characterized), the
+ Corresponding Source conveyed under this section must be accompanied
+ by the Installation Information. But this requirement does not apply
+ if neither you nor any third party retains the ability to install
+ modified object code on the User Product (for example, the work has
+ been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+ requirement to continue to provide support service, warranty, or updates
+ for a work that has been modified or installed by the recipient, or for
+ the User Product in which it has been modified or installed. Access to a
+ network may be denied when the modification itself materially and
+ adversely affects the operation of the network or violates the rules and
+ protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+ in accord with this section must be in a format that is publicly
+ documented (and with an implementation available to the public in
+ source code form), and must require no special password or key for
+ unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+ License by making exceptions from one or more of its conditions.
+ Additional permissions that are applicable to the entire Program shall
+ be treated as though they were included in this License, to the extent
+ that they are valid under applicable law. If additional permissions
+ apply only to part of the Program, that part may be used separately
+ under those permissions, but the entire Program remains governed by
+ this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+ remove any additional permissions from that copy, or from any part of
+ it. (Additional permissions may be written to require their own
+ removal in certain cases when you modify the work.) You may place
+ additional permissions on material, added by you to a covered work,
+ for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+ add to a covered work, you may (if authorized by the copyright holders of
+ that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+ restrictions" within the meaning of section 10. If the Program as you
+ received it, or any part of it, contains a notice stating that it is
+ governed by this License along with a term that is a further
+ restriction, you may remove that term. If a license document contains
+ a further restriction but permits relicensing or conveying under this
+ License, you may add to a covered work material governed by the terms
+ of that license document, provided that the further restriction does
+ not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+ must place, in the relevant source files, a statement of the
+ additional terms that apply to those files, or a notice indicating
+ where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+ form of a separately written license, or stated as exceptions;
+ the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+ provided under this License. Any attempt otherwise to propagate or
+ modify it is void, and will automatically terminate your rights under
+ this License (including any patent licenses granted under the third
+ paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+ license from a particular copyright holder is reinstated (a)
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the copyright
+ holder fails to notify you of the violation by some reasonable means
+ prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+ reinstated permanently if the copyright holder notifies you of the
+ violation by some reasonable means, this is the first time you have
+ received notice of violation of this License (for any work) from that
+ copyright holder, and you cure the violation prior to 30 days after
+ your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+ licenses of parties who have received copies or rights from you under
+ this License. If your rights have been terminated and not permanently
+ reinstated, you do not qualify to receive new licenses for the same
+ material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+ run a copy of the Program. Ancillary propagation of a covered work
+ occurring solely as a consequence of using peer-to-peer transmission
+ to receive a copy likewise does not require acceptance. However,
+ nothing other than this License grants you permission to propagate or
+ modify any covered work. These actions infringe copyright if you do
+ not accept this License. Therefore, by modifying or propagating a
+ covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+ receives a license from the original licensors, to run, modify and
+ propagate that work, subject to this License. You are not responsible
+ for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+ organization, or substantially all assets of one, or subdividing an
+ organization, or merging organizations. If propagation of a covered
+ work results from an entity transaction, each party to that
+ transaction who receives a copy of the work also receives whatever
+ licenses to the work the party's predecessor in interest had or could
+ give under the previous paragraph, plus a right to possession of the
+ Corresponding Source of the work from the predecessor in interest, if
+ the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+ rights granted or affirmed under this License. For example, you may
+ not impose a license fee, royalty, or other charge for exercise of
+ rights granted under this License, and you may not initiate litigation
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
+ any patent claim is infringed by making, using, selling, offering for
+ sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+ License of the Program or a work on which the Program is based. The
+ work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+ owned or controlled by the contributor, whether already acquired or
+ hereafter acquired, that would be infringed by some manner, permitted
+ by this License, of making, using, or selling its contributor version,
+ but do not include claims that would be infringed only as a
+ consequence of further modification of the contributor version. For
+ purposes of this definition, "control" includes the right to grant
+ patent sublicenses in a manner consistent with the requirements of
+ this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+ patent license under the contributor's essential patent claims, to
+ make, use, sell, offer for sale, import and otherwise run, modify and
+ propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+ agreement or commitment, however denominated, not to enforce a patent
+ (such as an express permission to practice a patent or covenant not to
+ sue for patent infringement). To "grant" such a patent license to a
+ party means to make such an agreement or commitment not to enforce a
+ patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+ and the Corresponding Source of the work is not available for anyone
+ to copy, free of charge and under the terms of this License, through a
+ publicly available network server or other readily accessible means,
+ then you must either (1) cause the Corresponding Source to be so
+ available, or (2) arrange to deprive yourself of the benefit of the
+ patent license for this particular work, or (3) arrange, in a manner
+ consistent with the requirements of this License, to extend the patent
+ license to downstream recipients. "Knowingly relying" means you have
+ actual knowledge that, but for the patent license, your conveying the
+ covered work in a country, or your recipient's use of the covered work
+ in a country, would infringe one or more identifiable patents in that
+ country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+ arrangement, you convey, or propagate by procuring conveyance of, a
+ covered work, and grant a patent license to some of the parties
+ receiving the covered work authorizing them to use, propagate, modify
+ or convey a specific copy of the covered work, then the patent license
+ you grant is automatically extended to all recipients of the covered
+ work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+ the scope of its coverage, prohibits the exercise of, or is
+ conditioned on the non-exercise of one or more of the rights that are
+ specifically granted under this License. You may not convey a covered
+ work if you are a party to an arrangement with a third party that is
+ in the business of distributing software, under which you make payment
+ to the third party based on the extent of your activity of conveying
+ the work, and under which the third party grants, to any of the
+ parties who would receive the covered work from you, a discriminatory
+ patent license (a) in connection with copies of the covered work
+ conveyed by you (or copies made from those copies), or (b) primarily
+ for and in connection with specific products or compilations that
+ contain the covered work, unless you entered into that arrangement,
+ or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+ any implied license or other defenses to infringement that may
+ otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot convey a
+ covered work so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you may
+ not convey it at all. For example, if you agree to terms that obligate you
+ to collect a royalty for further conveying from those to whom you convey
+ the Program, the only way you could satisfy both those terms and this
+ License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+ permission to link or combine any covered work with a work licensed
+ under version 3 of the GNU Affero General Public License into a single
+ combined work, and to convey the resulting work. The terms of this
+ License will continue to apply to the part which is the covered work,
+ but the special requirements of the GNU Affero General Public License,
+ section 13, concerning interaction through a network will apply to the
+ combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+ the GNU General Public License from time to time. Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+ Program specifies that a certain numbered version of the GNU General
+ Public License "or any later version" applies to it, you have the
+ option of following the terms and conditions either of that numbered
+ version or of any later version published by the Free Software
+ Foundation. If the Program does not specify a version number of the
+ GNU General Public License, you may choose any version ever published
+ by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+ versions of the GNU General Public License can be used, that proxy's
+ public statement of acceptance of a version permanently authorizes you
+ to choose that version for the Program.
+
+ Later license versions may give you additional or different
+ permissions. However, no additional obligations are imposed on any
+ author or copyright holder as a result of your choosing to follow a
+ later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+ above cannot be given local legal effect according to their terms,
+ reviewing courts shall apply local law that most closely approximates
+ an absolute waiver of all civil liability in connection with the
+ Program, unless a warranty or assumption of liability accompanies a
+ copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ state the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+ notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the appropriate
+ parts of the General Public License. Of course, your program's commands
+ might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
+ For more information on this, and how to apply and follow the GNU GPL, see
+ .
+
+ The GNU General Public License does not permit incorporating your program
+ into proprietary programs. If your program is a subroutine library, you
+ may consider it more useful to permit linking proprietary applications with
+ the library. If this is what you want to do, use the GNU Lesser General
+ Public License instead of this License. But first, please read
+ .
+
+
+ Name: libquadmath
+ Files: scipy/.dylibs/libquadmath*.so
+ Description: dynamically linked to files compiled with gcc
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
+ License: LGPL-2.1-or-later
+
+ GCC Quad-Precision Math Library
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Written by Francois-Xavier Coudert
+
+ This file is part of the libquadmath library.
+ Libquadmath is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ Libquadmath is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
+
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Science/Research
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Scientific/Engineering
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Unix
+Classifier: Operating System :: MacOS
+Project-URL: homepage, https://scipy.org/
+Project-URL: documentation, https://docs.scipy.org/doc/scipy/
+Project-URL: source, https://github.com/scipy/scipy
+Project-URL: download, https://github.com/scipy/scipy/releases
+Project-URL: tracker, https://github.com/scipy/scipy/issues
+Requires-Python: >=3.11
+Requires-Dist: numpy<2.7,>=1.26.4
+Provides-Extra: test
+Requires-Dist: pytest>=8.0.0; extra == "test"
+Requires-Dist: pytest-cov; extra == "test"
+Requires-Dist: pytest-timeout; extra == "test"
+Requires-Dist: pytest-xdist; extra == "test"
+Requires-Dist: asv; extra == "test"
+Requires-Dist: mpmath; extra == "test"
+Requires-Dist: gmpy2; extra == "test"
+Requires-Dist: threadpoolctl; extra == "test"
+Requires-Dist: scikit-umfpack; extra == "test"
+Requires-Dist: pooch; extra == "test"
+Requires-Dist: hypothesis>=6.30; extra == "test"
+Requires-Dist: array-api-strict>=2.3.1; extra == "test"
+Requires-Dist: Cython; extra == "test"
+Requires-Dist: meson; extra == "test"
+Requires-Dist: ninja; sys_platform != "emscripten" and extra == "test"
+Provides-Extra: doc
+Requires-Dist: sphinx<8.2.0,>=5.0.0; extra == "doc"
+Requires-Dist: intersphinx_registry; extra == "doc"
+Requires-Dist: pydata-sphinx-theme>=0.15.2; extra == "doc"
+Requires-Dist: sphinx-copybutton; extra == "doc"
+Requires-Dist: sphinx-design>=0.4.0; extra == "doc"
+Requires-Dist: matplotlib>=3.5; extra == "doc"
+Requires-Dist: numpydoc; extra == "doc"
+Requires-Dist: jupytext; extra == "doc"
+Requires-Dist: myst-nb>=1.2.0; extra == "doc"
+Requires-Dist: pooch; extra == "doc"
+Requires-Dist: jupyterlite-sphinx>=0.19.1; extra == "doc"
+Requires-Dist: jupyterlite-pyodide-kernel; extra == "doc"
+Requires-Dist: linkify-it-py; extra == "doc"
+Requires-Dist: tabulate; extra == "doc"
+Provides-Extra: dev
+Requires-Dist: click<8.3.0; extra == "dev"
+Requires-Dist: spin; extra == "dev"
+Requires-Dist: mypy==1.10.0; extra == "dev"
+Requires-Dist: typing_extensions; extra == "dev"
+Requires-Dist: types-psutil; extra == "dev"
+Requires-Dist: pycodestyle; extra == "dev"
+Requires-Dist: ruff>=0.12.0; extra == "dev"
+Requires-Dist: cython-lint>=0.12.2; extra == "dev"
+Description-Content-Type: text/x-rst
+
+.. image:: https://raw.githubusercontent.com/scipy/scipy/main/doc/source/_static/logo.svg
+ :target: https://scipy.org
+ :width: 110
+ :height: 110
+ :align: left
+
+.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
+ :target: https://numfocus.org
+
+.. image:: https://img.shields.io/pypi/dm/scipy.svg?label=Pypi%20downloads
+ :target: https://pypi.org/project/scipy/
+
+.. image:: https://img.shields.io/conda/dn/conda-forge/scipy.svg?label=Conda%20downloads
+ :target: https://anaconda.org/conda-forge/scipy
+
+.. image:: https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg
+ :target: https://stackoverflow.com/questions/tagged/scipy
+
+.. image:: https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue.svg
+ :target: https://www.nature.com/articles/s41592-019-0686-2
+
+.. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=scipy
+ :target: https://insights.linuxfoundation.org/project/scipy
+
+SciPy (pronounced "Sigh Pie") is an open-source software for mathematics,
+science, and engineering. It includes modules for statistics, optimization,
+integration, linear algebra, Fourier transforms, signal and image processing,
+ODE solvers, and more.
+
+- **Website:** https://scipy.org
+- **Documentation:** https://docs.scipy.org/doc/scipy/
+- **Development version of the documentation:** https://scipy.github.io/devdocs
+- **SciPy development forum:** https://discuss.scientific-python.org/c/contributor/scipy
+- **Stack Overflow:** https://stackoverflow.com/questions/tagged/scipy
+- **Source code:** https://github.com/scipy/scipy
+- **Contributing:** https://scipy.github.io/devdocs/dev/index.html
+- **Bug reports:** https://github.com/scipy/scipy/issues
+- **Code of Conduct:** https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
+- **Report a security vulnerability:** https://tidelift.com/docs/security
+- **Citing in your work:** https://www.scipy.org/citing-scipy/
+
+SciPy is built to work with
+NumPy arrays, and provides many user-friendly and efficient numerical routines,
+such as routines for numerical integration and optimization. Together, they
+run on all popular operating systems, are quick to install, and are free of
+charge. NumPy and SciPy are easy to use, but powerful enough to be depended
+upon by some of the world's leading scientists and engineers. If you need to
+manipulate numbers on a computer and display or publish the results, give
+SciPy a try!
+
+For the installation instructions, see `our install
+guide `__.
+
+
+Call for Contributions
+----------------------
+
+We appreciate and welcome contributions. Small improvements or fixes are always appreciated; issues labeled as "good
+first issue" may be a good starting point. Have a look at `our contributing
+guide `__.
+
+Writing code isn’t the only way to contribute to SciPy. You can also:
+
+- review pull requests
+- triage issues
+- develop tutorials, presentations, and other educational materials
+- maintain and improve `our website `__
+- develop graphic design for our brand assets and promotional materials
+- help with outreach and onboard new contributors
+- write grant proposals and help with other fundraising efforts
+
+If you’re unsure where to start or how your skills fit in, reach out! You can
+ask on the `forum `__
+or here, on GitHub, by leaving a comment on a relevant issue that is already
+open.
+
+If you are new to contributing to open source, `this
+guide `__ helps explain why, what,
+and how to get involved.
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/RECORD b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/RECORD
new file mode 100644
index 0000000000000000000000000000000000000000..7f7c529e8c369f67c694184072f3028d5d8aa519
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/RECORD
@@ -0,0 +1,2397 @@
+scipy-1.17.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+scipy-1.17.1.dist-info/LICENSE.txt,sha256=YKfQXXKe1cdjhSoyShy0Ij1mXUrT9LigwTCuXGDJPkk,46841
+scipy-1.17.1.dist-info/METADATA,sha256=sc0seE9uADxsca9MXuV_Y3DuRn0XtlYlDZ_TjPV519A,62145
+scipy-1.17.1.dist-info/RECORD,,
+scipy-1.17.1.dist-info/WHEEL,sha256=JnJiRvkXFaFU4HlzyoqCApZ07jy6hpFKd_LkfBpWZzk,122
+scipy/.dylibs/libgcc_s.1.1.dylib,sha256=Z4HOH3ncEOIRulMrdmsKhEJldn0zQ_ApoIESgCRQpzA,183040
+scipy/.dylibs/libgfortran.5.dylib,sha256=hpplVaeH_VWQ4sRAzLTYLZY1hhaGWfvzNU4VcOPxC8w,1901520
+scipy/.dylibs/libquadmath.0.dylib,sha256=Z22G5Ro5UPdbQZRadYvbAr4cEf709KRbGZTUgyKOJQQ,363936
+scipy/__config__.py,sha256=5oFiAr8o-luIMww4vwFElg_LtJUau-4luw9jDWKi--I,5353
+scipy/__init__.py,sha256=M1vG4KmQncdTT5Vpo2haktyAAcuMY6baTCOYSf8C1NA,4063
+scipy/__pycache__/__config__.cpython-312.pyc,,
+scipy/__pycache__/__init__.cpython-312.pyc,,
+scipy/__pycache__/_distributor_init.cpython-312.pyc,,
+scipy/__pycache__/conftest.cpython-312.pyc,,
+scipy/__pycache__/version.cpython-312.pyc,,
+scipy/_cyutility.cpython-312-darwin.so,sha256=uRI8PgwVFjF_5kboBnaU7U01-H68EARGkaQ_W9HXzmc,169968
+scipy/_distributor_init.py,sha256=zJThN3Fvof09h24804pNDPd2iN-lCHV3yPlZylSefgQ,611
+scipy/_lib/__init__.py,sha256=CXrH_YBpZ-HImHHrqXIhQt_vevp4P5NXClp7hnFMVLM,353
+scipy/_lib/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/__pycache__/_array_api.cpython-312.pyc,,
+scipy/_lib/__pycache__/_array_api_compat_vendor.cpython-312.pyc,,
+scipy/_lib/__pycache__/_array_api_docs_tables.cpython-312.pyc,,
+scipy/_lib/__pycache__/_array_api_no_0d.cpython-312.pyc,,
+scipy/_lib/__pycache__/_array_api_override.cpython-312.pyc,,
+scipy/_lib/__pycache__/_bunch.cpython-312.pyc,,
+scipy/_lib/__pycache__/_ccallback.cpython-312.pyc,,
+scipy/_lib/__pycache__/_disjoint_set.cpython-312.pyc,,
+scipy/_lib/__pycache__/_docscrape.cpython-312.pyc,,
+scipy/_lib/__pycache__/_elementwise_iterative_method.cpython-312.pyc,,
+scipy/_lib/__pycache__/_gcutils.cpython-312.pyc,,
+scipy/_lib/__pycache__/_pep440.cpython-312.pyc,,
+scipy/_lib/__pycache__/_public_api.cpython-312.pyc,,
+scipy/_lib/__pycache__/_sparse.cpython-312.pyc,,
+scipy/_lib/__pycache__/_testutils.cpython-312.pyc,,
+scipy/_lib/__pycache__/_tmpdirs.cpython-312.pyc,,
+scipy/_lib/__pycache__/_util.cpython-312.pyc,,
+scipy/_lib/__pycache__/deprecation.cpython-312.pyc,,
+scipy/_lib/__pycache__/doccer.cpython-312.pyc,,
+scipy/_lib/__pycache__/uarray.cpython-312.pyc,,
+scipy/_lib/_array_api.py,sha256=57bQj4d0VrnSavgIJnJj9B8ocCYZUaGdn_EzMB0V4eI,37765
+scipy/_lib/_array_api_compat_vendor.py,sha256=4_s2kL0PK-57lDOQPRKUD9A1-rUK23tjbvUcwWUu1v8,402
+scipy/_lib/_array_api_docs_tables.py,sha256=28SLvfv6kvjpl8zKkyLED_IYCnT75I_oGkJcnC9UrGg,10959
+scipy/_lib/_array_api_no_0d.py,sha256=zVB7D070dZ9Rc-7mXvlkqpv75TgcvCy_7PL0q6yZsbg,4453
+scipy/_lib/_array_api_override.py,sha256=9VjrVzlIB1-l0Rt3GAUW-xJGuS7yyQ6kUz-EWnBlpyk,5239
+scipy/_lib/_bunch.py,sha256=KV-kCN6lXFOp7HSiiVGSmDSwzKUITtuy8WWnO_rWLRo,8305
+scipy/_lib/_ccallback.py,sha256=N9CO7kJYzk6IWQR5LHf_YA1-Oq48R38UIhJFIlJ2Qyc,7087
+scipy/_lib/_ccallback_c.cpython-312-darwin.so,sha256=wqdei46Z3cHe1J1n66GyKy_CRZ2k_qNDu-1NqwQ5Q8w,114640
+scipy/_lib/_disjoint_set.py,sha256=o_EUHZwnnI1m8nitEf8bSkF7TWZ65RSiklBN4daFruA,6160
+scipy/_lib/_docscrape.py,sha256=Jm2QPPIqNiAgKqoR5fX0P-bsBofYAtJhHbX2h1A63j0,23807
+scipy/_lib/_elementwise_iterative_method.py,sha256=fC1ou8u6XHCpMnTRKsqwyP5_zW0gDu0TzGqw-nqWEAU,15023
+scipy/_lib/_fpumode.cpython-312-darwin.so,sha256=FCAUmAbVLZYEm5lBmIGlngpwkdQq7jsvOA6GigO5UqY,50208
+scipy/_lib/_gcutils.py,sha256=hajQd-HUw9ckK7QeBaqXVRpmnxPgyXO3QqqniEh7tRk,2669
+scipy/_lib/_pep440.py,sha256=vo3nxbfjtMfGq1ektYzHIzRbj8W-NHOMp5WBRjPlDTg,14005
+scipy/_lib/_public_api.py,sha256=b-_Gi7cCEC_J8YjJtRcVq1hVpccTxCokxB3OCkaafgM,1610
+scipy/_lib/_sparse.py,sha256=Ifbhhdja4dpNNpsaO0VcjgRPcw2hqqHXOBF9eXRGsbE,875
+scipy/_lib/_test_ccallback.cpython-312-darwin.so,sha256=yT7cdVD7kapQylSVcN2Q8ihI84NlUOuf5hz4cQBPHfI,53032
+scipy/_lib/_test_deprecation_call.cpython-312-darwin.so,sha256=0gJY9mOEMsG2C6czVPzj8c1UI31RXuS0C3-Gf5PcTno,75104
+scipy/_lib/_test_deprecation_def.cpython-312-darwin.so,sha256=RcuVfdCqUCht6XsRYYbFAVvt1vyI5xhaEUcZiebiSjM,55096
+scipy/_lib/_testutils.py,sha256=qIz1sYnGCQfIDumEHDYDoQdMTHXlY40-DqVfI9hg7qk,12279
+scipy/_lib/_tmpdirs.py,sha256=z3IYpzACnWdN_BMjOvqYbkTvYyUbfbQvfehq7idENSo,2374
+scipy/_lib/_uarray/LICENSE,sha256=yAw5tfzga6SJfhTgsKiLVEWDNNlR6xNhQC_60s-4Y7Q,1514
+scipy/_lib/_uarray/__init__.py,sha256=Rww7wLA7FH6Yong7oMgl_sHPpjcRslRaTjh61W_xVg4,4493
+scipy/_lib/_uarray/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/_uarray/__pycache__/_backend.cpython-312.pyc,,
+scipy/_lib/_uarray/_backend.py,sha256=LZnSLJ2UK209jrMtocOMoc5grlNoob3tbb1HbW0XlAQ,20531
+scipy/_lib/_uarray/_uarray.cpython-312-darwin.so,sha256=kEfb14LU06lcM3pFlR6_oU38EVrhSzZrAo_gZ7hUmWE,120656
+scipy/_lib/_util.py,sha256=qf77wE1gX4irt7kFpyouUQrUIiP9z-BJpOoSyUVbiaI,48730
+scipy/_lib/array_api_compat/__init__.py,sha256=XbhBzRpMRAKRuPnzAfZD4kITuXxjgafIDX4veTHtO-U,992
+scipy/_lib/array_api_compat/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/__pycache__/_internal.cpython-312.pyc,,
+scipy/_lib/array_api_compat/_internal.py,sha256=tYJkaxIxVxELYvo9JK2UgCCJBMw01JiVmomTIjVpM5U,2072
+scipy/_lib/array_api_compat/common/__init__.py,sha256=4IcMWP5rARLYe2_pgXDWEuj2YpM0c1G6Pb5pkbQ0QS8,38
+scipy/_lib/array_api_compat/common/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/__pycache__/_aliases.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/__pycache__/_fft.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/__pycache__/_helpers.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/__pycache__/_linalg.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/__pycache__/_typing.cpython-312.pyc,,
+scipy/_lib/array_api_compat/common/_aliases.py,sha256=0fYL3vEwX0kRdpscJY3l7Q37kHfAlzmxUulkI-e9Sws,18988
+scipy/_lib/array_api_compat/common/_fft.py,sha256=ckCR2uHtz0iaOkcuvqVunhz1khIdxQNKuVU0x1bfrq8,4669
+scipy/_lib/array_api_compat/common/_helpers.py,sha256=1WFBA38HVEQCm9yiy3RtpxP0wIxmi2sfmYhyqgxMNBE,32556
+scipy/_lib/array_api_compat/common/_linalg.py,sha256=jsz7PpwAD2QeqJQCnYd3LwcTLm6YMjyla9_Ol70ifF4,6805
+scipy/_lib/array_api_compat/common/_typing.py,sha256=gFg3AvkvXQ0VVeiZtjejpaU5V4oCXnRlbGzNmHpLPFs,4498
+scipy/_lib/array_api_compat/cupy/__init__.py,sha256=u_lgOQrp7-pI24bZp8fNm4QfrlmcocpFL2fWX-2Tv_4,736
+scipy/_lib/array_api_compat/cupy/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/__pycache__/_aliases.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/__pycache__/_info.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/__pycache__/_typing.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/__pycache__/fft.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/__pycache__/linalg.cpython-312.pyc,,
+scipy/_lib/array_api_compat/cupy/_aliases.py,sha256=eoR2lVB45fCMsLtGm3PnczOivUxISxlFJ2K4yV_aiZM,5122
+scipy/_lib/array_api_compat/cupy/_info.py,sha256=g3DwO5ps4bSlFU2pc_f4XTaLrkCYuSDlCw0Ql2wuqM8,10125
+scipy/_lib/array_api_compat/cupy/_typing.py,sha256=L6RUNFoy-ZwLizEqCSqHN-6GC5chKYfQL8xW4FVksKA,607
+scipy/_lib/array_api_compat/cupy/fft.py,sha256=D5HJ6rclFA7-CO_NleuCZQy2Lz7InkFuE8CHTrxrXc0,872
+scipy/_lib/array_api_compat/cupy/linalg.py,sha256=G5zEzcmqVRv8Bs_LaOXd_1QkOvSQn4c3giYvCEtt3w4,1465
+scipy/_lib/array_api_compat/dask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/_lib/array_api_compat/dask/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/__init__.py,sha256=2hRAArKNn6Zh67QpQ5yCjb3cTnJsom_85ShCFDZdz9A,677
+scipy/_lib/array_api_compat/dask/array/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/__pycache__/_aliases.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/__pycache__/_info.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/__pycache__/fft.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/__pycache__/linalg.cpython-312.pyc,,
+scipy/_lib/array_api_compat/dask/array/_aliases.py,sha256=eJkzntr9_0ew0SFBeAEe3zd1vjdsXb7wpP_HOqVl_GM,10432
+scipy/_lib/array_api_compat/dask/array/_info.py,sha256=SSClqGR_1AeTOhUPvryTpUJb4ke5jykHB-LeXw9gQmA,12241
+scipy/_lib/array_api_compat/dask/array/fft.py,sha256=dJEAXxGtfP5Z_-oR8GNuiMwHG1-Hbwax02wxmN95QjQ,333
+scipy/_lib/array_api_compat/dask/array/linalg.py,sha256=-YEIM8c0I1CUidb0DTT5QMJJRzo87N2woPSs0XI8Xh4,2139
+scipy/_lib/array_api_compat/numpy/__init__.py,sha256=S5-VzRtXS6re5bOy4xtV3RfYKk9AQwJ74vMhiiQKxJY,1064
+scipy/_lib/array_api_compat/numpy/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/__pycache__/_aliases.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/__pycache__/_info.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/__pycache__/_typing.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/__pycache__/fft.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/__pycache__/linalg.cpython-312.pyc,,
+scipy/_lib/array_api_compat/numpy/_aliases.py,sha256=3FhudS9W4PofYTtsf6vTHEtTC_T_i2ecUE4eBMLyqrg,5666
+scipy/_lib/array_api_compat/numpy/_info.py,sha256=C7iKLQU8Q8AJCkf_ADv_UWgum8UdbagewvKGL_LmQ3I,10793
+scipy/_lib/array_api_compat/numpy/_typing.py,sha256=hXWLcYHogQcHzK1tR8B9difxm3UFlHhUUaXBHydqpyE,605
+scipy/_lib/array_api_compat/numpy/fft.py,sha256=gx6R3o_ehnMWpsvBI2y0mBNxwZP9KFLTuQ9uP4eSrMk,714
+scipy/_lib/array_api_compat/numpy/linalg.py,sha256=tZHdXpZnmWbsbeGYudpDEzDw0u65tziwya2JJd9m110,3914
+scipy/_lib/array_api_compat/torch/__init__.py,sha256=8ZAu0FQ6jpm6kVlNXD6UDIigBnyM4nC_LJTaAHz9QU0,633
+scipy/_lib/array_api_compat/torch/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/__pycache__/_aliases.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/__pycache__/_info.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/__pycache__/_typing.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/__pycache__/fft.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/__pycache__/linalg.cpython-312.pyc,,
+scipy/_lib/array_api_compat/torch/_aliases.py,sha256=PRCqlNel5pCaGmfj_FxcCEr_zXvZbdBBKoagerPQObs,30503
+scipy/_lib/array_api_compat/torch/_info.py,sha256=-H2xD9z9SMf3GjIOW0jeRTUOvh4s8E9p9u_4LqawRZM,11889
+scipy/_lib/array_api_compat/torch/_typing.py,sha256=-uCkuTie1g9hb4vwPLK9eEnir9Zp67wAhrfaI_o-35E,108
+scipy/_lib/array_api_compat/torch/fft.py,sha256=ijW1aJaOys2EMkF04hu3vSMQMqd2ZLUpLvAZUQZf4Lw,1833
+scipy/_lib/array_api_compat/torch/linalg.py,sha256=x-qGeIVVbNsmk9ZLSV4JHWZE4WB8HqGeHlQrhNPMGJs,4560
+scipy/_lib/array_api_extra/__init__.py,sha256=RXDIahZUyopULk4yjXTSPrNDCuiNLIe17MQpD9jSL0c,867
+scipy/_lib/array_api_extra/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_extra/__pycache__/_delegation.cpython-312.pyc,,
+scipy/_lib/array_api_extra/__pycache__/testing.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_delegation.py,sha256=Z3r-PwaQ3jW_vTKDhENkScxedgM18B6d10BluLJdggc,33403
+scipy/_lib/array_api_extra/_lib/__init__.py,sha256=Mht4YV9Rpkzg5kORPlgjOOXk4y7bvdngowS6KGSHqNE,36
+scipy/_lib/array_api_extra/_lib/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/__pycache__/_at.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/__pycache__/_backends.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/__pycache__/_funcs.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/__pycache__/_lazy.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/__pycache__/_testing.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/_at.py,sha256=JOZX0nw6UpyRKZIZRQDb1w_YSGeJ-4v1vJFdrISGI_k,15327
+scipy/_lib/array_api_extra/_lib/_backends.py,sha256=QPZvkbtVtcwr5WDseaTcTo0z6u1HqdCVd67G5ndcPwE,2168
+scipy/_lib/array_api_extra/_lib/_funcs.py,sha256=HZq1IQMtiPe34sXWKmI-_zrBXZZU8AhNXE8uBr6zaO0,23418
+scipy/_lib/array_api_extra/_lib/_lazy.py,sha256=RE1DzMqj0j7GpY6GKSLyBuTL9vQaWkLSn7h-iZ9eVd8,13811
+scipy/_lib/array_api_extra/_lib/_testing.py,sha256=GtIc8GIDEqw90nn5g72gt71flj5-1BP29ZKzwoduoSQ,10290
+scipy/_lib/array_api_extra/_lib/_utils/__init__.py,sha256=8ICffM2MprXpWZd8ia0-5ZTnKtDfeZD0gExLveDrXZs,49
+scipy/_lib/array_api_extra/_lib/_utils/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/_utils/__pycache__/_compat.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/_utils/__pycache__/_helpers.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/_utils/__pycache__/_typing.cpython-312.pyc,,
+scipy/_lib/array_api_extra/_lib/_utils/_compat.py,sha256=4A5a_S4qo88_H8LKmQal2e_1PVQAY1eInKDZsCgPNYU,1812
+scipy/_lib/array_api_extra/_lib/_utils/_compat.pyi,sha256=6QexmJx0rPSEtvVQAt2HbS87F8njDMsD9UhyIJsen8c,1720
+scipy/_lib/array_api_extra/_lib/_utils/_helpers.py,sha256=sjeti2M-7OK-5GBdc45O_QlhwTTInnQQpSX98rgUiZc,19770
+scipy/_lib/array_api_extra/_lib/_utils/_typing.py,sha256=0NSYWpdXH58Dx9T7HsNPM0NW2iPlTZS6xOrR-5tFOYc,228
+scipy/_lib/array_api_extra/_lib/_utils/_typing.pyi,sha256=tfmj1bK5a1RWFc8qXR10FhLlXBwzyItFrN0zcXTWntM,4665
+scipy/_lib/array_api_extra/testing.py,sha256=s2BfjND8f9GxTg9eDChRsrjsfdlJ1wyNKM9RoU865WI,14653
+scipy/_lib/cobyqa/__init__.py,sha256=Uo9FFveH-XgEuhkleW5NIiBwp3YZ71r-Ybv3t2JnqE8,578
+scipy/_lib/cobyqa/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/cobyqa/__pycache__/framework.cpython-312.pyc,,
+scipy/_lib/cobyqa/__pycache__/main.cpython-312.pyc,,
+scipy/_lib/cobyqa/__pycache__/models.cpython-312.pyc,,
+scipy/_lib/cobyqa/__pycache__/problem.cpython-312.pyc,,
+scipy/_lib/cobyqa/__pycache__/settings.cpython-312.pyc,,
+scipy/_lib/cobyqa/framework.py,sha256=lIeKCkDLxHbMmSTiMcyasvVe77jVvh_YTOYX0HnK4Qk,38900
+scipy/_lib/cobyqa/main.py,sha256=wz0M2iqFfzeTaZUq_j1TkF_9V_SJ1t73A-0fdH0eSs4,57527
+scipy/_lib/cobyqa/models.py,sha256=LGPk0teoVBse25bkIePklFgOUHo63VnbKLXh4gxZhSA,50694
+scipy/_lib/cobyqa/problem.py,sha256=SiPgmiFTxiW5yJ_FVf37Z9GQGo6Gx_fJ3RXMzhsrn40,40203
+scipy/_lib/cobyqa/settings.py,sha256=ogfiShxuPHsMfW16OGSwB9-mIPRiuWZSGXBOCO2HDvw,3826
+scipy/_lib/cobyqa/subsolvers/__init__.py,sha256=VmFBpi-_tNa8yzNmu_fufewmPTnCU6ycNCGcN34UBcc,341
+scipy/_lib/cobyqa/subsolvers/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/cobyqa/subsolvers/__pycache__/geometry.cpython-312.pyc,,
+scipy/_lib/cobyqa/subsolvers/__pycache__/optim.cpython-312.pyc,,
+scipy/_lib/cobyqa/subsolvers/geometry.py,sha256=dgS-C0QBUhkzPhHULFIRbnbFOIEB005GyPYE-i-cuFY,14173
+scipy/_lib/cobyqa/subsolvers/optim.py,sha256=hIseVqrPyI3ezICGNXkCtKlpqvAO2W6ZQe0n7sxfkss,45512
+scipy/_lib/cobyqa/utils/__init__.py,sha256=sw6g402vXaXwX7rMhxrNl5PD5OBs89l5f3XNcYApRHs,359
+scipy/_lib/cobyqa/utils/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/cobyqa/utils/__pycache__/exceptions.cpython-312.pyc,,
+scipy/_lib/cobyqa/utils/__pycache__/math.cpython-312.pyc,,
+scipy/_lib/cobyqa/utils/__pycache__/versions.cpython-312.pyc,,
+scipy/_lib/cobyqa/utils/exceptions.py,sha256=N1JdmUxHnME95wEZHyeeF_M6GXPEqH5t3qzuXig49YE,483
+scipy/_lib/cobyqa/utils/math.py,sha256=beT-Tib41TJWZecjnKhSfu4foOLLaHlWj5CcyRhdSl4,1611
+scipy/_lib/cobyqa/utils/versions.py,sha256=eBOlEGAKFCfjFqVprdali3M1G7l0k_kxb7ku-Lz2bU0,1465
+scipy/_lib/deprecation.py,sha256=2KeqTdCUmSAcv3QLoTzCK5vkBWcmJl5Wawz1FVxuJ3Q,9854
+scipy/_lib/doccer.py,sha256=W1HgV3SpTFpZJ0oyiN9Yn4vuX5pwxx27anH-sGNv19Y,10721
+scipy/_lib/messagestream.cpython-312-darwin.so,sha256=uJderxyApJRzxH2Wv_SqHhgIro1un3Snq4RYFMxG2rE,96880
+scipy/_lib/pyprima/__init__.py,sha256=YakFMfftDrq3fBu2-_O3FWjeu41511VEPDTtzJ0IKX0,8461
+scipy/_lib/pyprima/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/_lib/pyprima/cobyla/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/cobyla.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/cobylb.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/geometry.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/initialize.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/trustregion.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/__pycache__/update.cpython-312.pyc,,
+scipy/_lib/pyprima/cobyla/cobyla.py,sha256=YiuAhtZ5u13uDciL7sc0qxVVpH5t5IKJ2R0X7qTFMwo,22146
+scipy/_lib/pyprima/cobyla/cobylb.py,sha256=T9ZRYBYZdAYvRLJ9sjAYyQb3vdcRxMmj3AukIidw9L0,40764
+scipy/_lib/pyprima/cobyla/geometry.py,sha256=84zrSvKNCr-WnXqFrnnb-nE11yVAI_CME79nhVc4ZvM,10645
+scipy/_lib/pyprima/cobyla/initialize.py,sha256=ft98aJ03PvUUvIXluk-4IUZLbDQPF3ZLdFUhfpRh5Zg,9409
+scipy/_lib/pyprima/cobyla/trustregion.py,sha256=6UNiTytfEyxW1-qHpqBGzcegRyrnx0A82XwLS5b9N_U,25200
+scipy/_lib/pyprima/cobyla/update.py,sha256=PwDRKMY_VAhBKVSOkMUCOSMhGezpfiafIansW1vqI4I,13882
+scipy/_lib/pyprima/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/_lib/pyprima/common/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/_bounds.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/_linear_constraints.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/_nonlinear_constraints.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/_project.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/checkbreak.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/consts.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/evaluate.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/history.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/infos.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/linalg.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/message.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/powalg.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/preproc.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/present.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/ratio.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/redrho.cpython-312.pyc,,
+scipy/_lib/pyprima/common/__pycache__/selectx.cpython-312.pyc,,
+scipy/_lib/pyprima/common/_bounds.py,sha256=ZzvGVDJigjFkxb4Qkct89SRta7VPS7C_XFm0qKSy090,1636
+scipy/_lib/pyprima/common/_linear_constraints.py,sha256=SZHsoLLWFVtJ1TPPamd0CPXmKmVlnrgT-qCyYZo2CkQ,2162
+scipy/_lib/pyprima/common/_nonlinear_constraints.py,sha256=0OGZwFpa8JqtTm4rZKb2LL8oxx1Sld4ANwfH-00Qy4A,2150
+scipy/_lib/pyprima/common/_project.py,sha256=oX1l_vGwYod1knQ08t_j2MZ1hBOT_szT621GXfk67nE,7863
+scipy/_lib/pyprima/common/checkbreak.py,sha256=kDbwy_CG-0ZUlrfrQ_SKwlxyPjqZHH1-z0HTvXJq7G0,3451
+scipy/_lib/pyprima/common/consts.py,sha256=gw-JKckLhBHPXZLLp1qMrVsqNP9PJ-kcgtBvfCajk-g,1310
+scipy/_lib/pyprima/common/evaluate.py,sha256=aKVctlTqacdI_n329ipEH-ZTpQNwAX-01UavdsXlUeY,3150
+scipy/_lib/pyprima/common/history.py,sha256=c6vWe7XJ5JMzRm7TzaPfYhmHlaZGoUDZzEvLdfZNbAA,1361
+scipy/_lib/pyprima/common/infos.py,sha256=fcIk6zFWQrtUhtvOHYcYUzZCDmgEAY39fjRshjOb9M4,704
+scipy/_lib/pyprima/common/linalg.py,sha256=QwbXquUpao34qwFoQreJ7ocxacCs5pO_7p9Gn9TbB78,14280
+scipy/_lib/pyprima/common/message.py,sha256=D1UwykQhQ16hekF4-wxC1Xw1Qs9gsm_0hXG-yf3VK20,9663
+scipy/_lib/pyprima/common/powalg.py,sha256=BWD8urM3sF_T0e47iHZCKvjIZgcDxsDrLHMtDMcQoUE,6785
+scipy/_lib/pyprima/common/preproc.py,sha256=Ge0SyRxy3f47uf1anX8WmFjfkOdw82czkMgC8FlDiJs,13820
+scipy/_lib/pyprima/common/present.py,sha256=TvFOVG53WvXwjsTqz2tfZzgmV0Uv7dlX0DQ1e2IO92M,146
+scipy/_lib/pyprima/common/ratio.py,sha256=ePcZVLwu4NB29FgVx-qYr3Yvgf_9Wx16Lyz9qbjJDyM,1823
+scipy/_lib/pyprima/common/redrho.py,sha256=ES_D2yucGa_uMGcvlSL8-z4ZxPv2BKoK8mCMw1DZqvE,1258
+scipy/_lib/pyprima/common/selectx.py,sha256=8IYf6BB-OnOOnuxn8_9YsrllaLFLtIKQY5NqTHRc61Q,14120
+scipy/_lib/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/_lib/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test__gcutils.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test__pep440.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test__testutils.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test__util.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_array_api.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_bunch.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_ccallback.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_config.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_deprecation.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_doccer.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_import_cycles.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_public_api.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_scipy_version.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_tmpdirs.cpython-312.pyc,,
+scipy/_lib/tests/__pycache__/test_warnings.cpython-312.pyc,,
+scipy/_lib/tests/test__gcutils.py,sha256=Uadt4yXwuLDMCSbf4cpMszR_5NOeVQC1E_v4NZAeJR4,3729
+scipy/_lib/tests/test__pep440.py,sha256=u9hPoolK4AoIIS-Rq74Du5SJu5og2RxMwgaAvGgWvRo,2277
+scipy/_lib/tests/test__testutils.py,sha256=P4WDJpUgy19wD9tknQSjIivuQvZF7YUBGSBWlur2QRA,800
+scipy/_lib/tests/test__util.py,sha256=9zybOhYxYvQc81PLe_HIFNxHsT0C9oe-rV2Cr-fgBNk,23719
+scipy/_lib/tests/test_array_api.py,sha256=15tPmoYPl9eALgQGG0FsjgWsNcYES2kiXDva04dHlvc,16566
+scipy/_lib/tests/test_bunch.py,sha256=USL2wl6PT4gAuuNk5CipnNrG45GZPZ8y1B7BqtIDqKM,6389
+scipy/_lib/tests/test_ccallback.py,sha256=wQ0Bwewx7KWJWspmdTYTPjRgm8A3A5mZ1ssLIig5wfE,6040
+scipy/_lib/tests/test_config.py,sha256=j1Ppp6DCZy9wMxTmBEGxq4MScvsQXTQk7268EnNnPFQ,1244
+scipy/_lib/tests/test_deprecation.py,sha256=-7bcTKJauUjBjMpeiFtt5iGwIWlAVu-wZq81iqCePMQ,440
+scipy/_lib/tests/test_doccer.py,sha256=vhmDDKE2ZtfSYGBlF3hd5qL3YU9xqc4FgfgLoEL5qbI,4150
+scipy/_lib/tests/test_import_cycles.py,sha256=B9BwSx-9po3YQBeEjn7f1l4ytddO7W6ykC0Oo5_vFv8,843
+scipy/_lib/tests/test_public_api.py,sha256=isTpcGRdWlKU8uoR2olr8SDQJXsBfzMeVznOHPKhALc,17567
+scipy/_lib/tests/test_scipy_version.py,sha256=kVoxuBUidCHsVpvybRPoVJzkv2hUixRwuDAEAqPgpaA,918
+scipy/_lib/tests/test_tmpdirs.py,sha256=EQ4i2N4jzmkH_dxfra9zrXYk6Xzh2q1zhaHpWkBlXGM,1450
+scipy/_lib/tests/test_warnings.py,sha256=TMjFMSHiulDDrSEjXIjNwgaiRAa_2Qh3SJzsJVsBW14,5006
+scipy/_lib/uarray.py,sha256=4X0D3FBQR6HOYcwMftjH-38Kt1nkrS-eD4c5lWL5DGo,815
+scipy/cluster/__init__.py,sha256=pgzWiWR5smQ3rwud2dhnLn6dpkD5lju_moElQp_zhoE,880
+scipy/cluster/__pycache__/__init__.cpython-312.pyc,,
+scipy/cluster/__pycache__/hierarchy.cpython-312.pyc,,
+scipy/cluster/__pycache__/vq.cpython-312.pyc,,
+scipy/cluster/_hierarchy.cpython-312-darwin.so,sha256=z0CSWFAPCmUWzyLTUl6Qid9h-fAH1z9NW5Hsdd5UIkE,220624
+scipy/cluster/_optimal_leaf_ordering.cpython-312-darwin.so,sha256=7YxLiyKdl95bqNUakZqRkVvRcYWWd8Y_VSOrNld4dL8,151904
+scipy/cluster/_vq.cpython-312-darwin.so,sha256=ei4rakpYRp9X6NPHe3v8i_4a7Y9MmMTwhm5lREyD7hs,111912
+scipy/cluster/hierarchy.py,sha256=zf3tEeKWzmGSvp3eczP-J0NvawzGD9YKsCtv32wsgcw,156594
+scipy/cluster/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/cluster/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/cluster/tests/__pycache__/hierarchy_test_data.cpython-312.pyc,,
+scipy/cluster/tests/__pycache__/test_disjoint_set.cpython-312.pyc,,
+scipy/cluster/tests/__pycache__/test_hierarchy.cpython-312.pyc,,
+scipy/cluster/tests/__pycache__/test_vq.cpython-312.pyc,,
+scipy/cluster/tests/hierarchy_test_data.py,sha256=7syUYdIaDVr7hgvMliX0CW4386utjBJn1DOgX0USXls,6850
+scipy/cluster/tests/test_disjoint_set.py,sha256=EuHGBE3ZVEMnWFbCn8tjI-_6CWrNXfpnv5bUBa9qhWI,5525
+scipy/cluster/tests/test_hierarchy.py,sha256=zvtgsxBksJSrVrP6LGB8uUP257hiKgP-xT0RuCxzJMk,50225
+scipy/cluster/tests/test_vq.py,sha256=qZ26WI32gKbvYFyR70keKYoaHz0HSd4Yb8uqEP0H2Xo,18258
+scipy/cluster/vq.py,sha256=HKFZDBazq35WOj8_1Ofg875dG2mHioCDmQAB82sR6GY,30899
+scipy/conftest.py,sha256=MNicQEsguyB3ehyLIRi3Os_XTePqT3g6kAlWTOpqlyw,28827
+scipy/constants/__init__.py,sha256=1Iqylk8TvAxegNKIcFIUVXwiH5ItKpdKtCcVPhEBvPQ,14839
+scipy/constants/__pycache__/__init__.cpython-312.pyc,,
+scipy/constants/__pycache__/_codata.cpython-312.pyc,,
+scipy/constants/__pycache__/_constants.cpython-312.pyc,,
+scipy/constants/__pycache__/codata.cpython-312.pyc,,
+scipy/constants/__pycache__/constants.cpython-312.pyc,,
+scipy/constants/_codata.py,sha256=AFMXvNXhGnz1xRQgoAJzmaXG45FJ86Ek4iOC3DhM0QI,202549
+scipy/constants/_constants.py,sha256=1BiP8rT7BdaAwCpLbpXQzrCVCcIJPmmc4oh1fg5WHOo,10571
+scipy/constants/codata.py,sha256=ThmW8ohzndi-4-WtyVXxSrW40MnLIz1XoqRcm2RgSHw,614
+scipy/constants/constants.py,sha256=w7sGxSidD2Q9Ged0Sn1pnL-qqD1ssEP1A8sZWeLWBeI,2250
+scipy/constants/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/constants/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/constants/tests/__pycache__/test_codata.cpython-312.pyc,,
+scipy/constants/tests/__pycache__/test_constants.cpython-312.pyc,,
+scipy/constants/tests/test_codata.py,sha256=gxakBdJjXuXFPPgJvJAj50s4IXCJH3whaeXZjEcso-g,2854
+scipy/constants/tests/test_constants.py,sha256=Gz5YfzcqFnZsHuuZDZ4QOcegWL-2IGIZwZ9cNp-ubTM,4247
+scipy/datasets/__init__.py,sha256=X_9AbefPK1_pg-eG7g3nn--JhoHeDsrEFbJfbI5Hyak,2802
+scipy/datasets/__pycache__/__init__.cpython-312.pyc,,
+scipy/datasets/__pycache__/_download_all.cpython-312.pyc,,
+scipy/datasets/__pycache__/_fetchers.cpython-312.pyc,,
+scipy/datasets/__pycache__/_registry.cpython-312.pyc,,
+scipy/datasets/__pycache__/_utils.cpython-312.pyc,,
+scipy/datasets/_download_all.py,sha256=0EcULBirC2swuv5lyb5NcuSOkdE_ye-BW86tYNPb6Mw,2174
+scipy/datasets/_fetchers.py,sha256=pkPYiP2slFv-4XYbKDLdca74ScE7Z-IR9O7jmXQNEDA,7092
+scipy/datasets/_registry.py,sha256=br0KfyalEbh5yrQLznQ_QvBtmN4rMsm0UxOjnsJp4OQ,1072
+scipy/datasets/_utils.py,sha256=-g2ZHfgwk0_U6NdouBgZAUjy3ByTxmGR1uZ0QIEcyjI,3053
+scipy/datasets/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/datasets/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/datasets/tests/__pycache__/test_data.cpython-312.pyc,,
+scipy/datasets/tests/test_data.py,sha256=6DJtyMDmwi_ghOrDuryVakZQExFq-MIKiuJi_Cr7kdM,4213
+scipy/differentiate/__init__.py,sha256=nZ3imDWtf1QzImE-xsrYHE4kuOa8tEuc99Hl0zAFqzI,621
+scipy/differentiate/__pycache__/__init__.cpython-312.pyc,,
+scipy/differentiate/__pycache__/_differentiate.cpython-312.pyc,,
+scipy/differentiate/_differentiate.py,sha256=PLdwWwhQ3Ec5kKGruwtuhNxBrXV5xwHEuEpFYUMST8w,51458
+scipy/differentiate/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/differentiate/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/differentiate/tests/__pycache__/test_differentiate.cpython-312.pyc,,
+scipy/differentiate/tests/test_differentiate.py,sha256=6rE4bDGNyOPpVQa9DRExwXA4Zg3By3tLNW6KYfJAdtc,27724
+scipy/fft/__init__.py,sha256=0cjHIwyHnjoz1XUUe3OB70vrQR0-pFp8Uv34-U-FGRg,3632
+scipy/fft/__pycache__/__init__.cpython-312.pyc,,
+scipy/fft/__pycache__/_backend.cpython-312.pyc,,
+scipy/fft/__pycache__/_basic.cpython-312.pyc,,
+scipy/fft/__pycache__/_basic_backend.cpython-312.pyc,,
+scipy/fft/__pycache__/_debug_backends.cpython-312.pyc,,
+scipy/fft/__pycache__/_fftlog.cpython-312.pyc,,
+scipy/fft/__pycache__/_fftlog_backend.cpython-312.pyc,,
+scipy/fft/__pycache__/_helper.cpython-312.pyc,,
+scipy/fft/__pycache__/_realtransforms.cpython-312.pyc,,
+scipy/fft/__pycache__/_realtransforms_backend.cpython-312.pyc,,
+scipy/fft/_backend.py,sha256=QmcIF8mRvg13Hht5Rq_PKklnMwqdFcCbQkbrMJevd2E,6738
+scipy/fft/_basic.py,sha256=Cn3UMMIEvyllWsaP5yApNJrQgkCr-RxEhznDsiBZIR0,64353
+scipy/fft/_basic_backend.py,sha256=JLolZzpiiDT0CoKLrcvyQA1fEdLSSx1XDQZL_oF7boA,7443
+scipy/fft/_debug_backends.py,sha256=RlvyunZNqaDDsI3-I6QH6GSBz_faT6EN4OONWsvMtR8,598
+scipy/fft/_fftlog.py,sha256=Cth8ohZNXtZ8QurKG-OZbI5VxeJThcrPPOjKNczEIsM,7999
+scipy/fft/_fftlog_backend.py,sha256=n1QNDL1P8R4Q_jeuFezvnjYNFojRvxCWeH6vlE5b1Ao,5357
+scipy/fft/_helper.py,sha256=TFg6LmEt4kwkCgll5_uHB6q8uyW2TZZJ0fMOSdpeFtA,11514
+scipy/fft/_pocketfft/LICENSE.md,sha256=wlSytf0wrjyJ02ugYXMFY7l2D8oE8bdGobLDFX2ix4k,1498
+scipy/fft/_pocketfft/__init__.py,sha256=dROVDi9kRvkbSdynd3L09tp9_exzQ4QqG3xnNx78JeU,207
+scipy/fft/_pocketfft/__pycache__/__init__.cpython-312.pyc,,
+scipy/fft/_pocketfft/__pycache__/basic.cpython-312.pyc,,
+scipy/fft/_pocketfft/__pycache__/helper.cpython-312.pyc,,
+scipy/fft/_pocketfft/__pycache__/realtransforms.cpython-312.pyc,,
+scipy/fft/_pocketfft/basic.py,sha256=4HR-eRDb6j4YR4sqKnTikFmG0tnUIXxa0uImnB6_JVs,8138
+scipy/fft/_pocketfft/helper.py,sha256=DFmGP6euSFWiRGUQota_tHtqbSpKWVDirEiPK_na33c,6959
+scipy/fft/_pocketfft/pypocketfft.cpython-312-darwin.so,sha256=yGMGZ7hn9SX-584nKyXPWTCxeAjYA9Uc97bpxTe6Buk,946368
+scipy/fft/_pocketfft/realtransforms.py,sha256=4TmqAkCDQK3gs1ddxXY4rOrVfvQqO8NyVtOzziUGw6E,3344
+scipy/fft/_pocketfft/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/fft/_pocketfft/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/fft/_pocketfft/tests/__pycache__/test_basic.cpython-312.pyc,,
+scipy/fft/_pocketfft/tests/__pycache__/test_real_transforms.cpython-312.pyc,,
+scipy/fft/_pocketfft/tests/test_basic.py,sha256=jsqSZLy8m3mJsFT39EonX7a0iKMjDzApyZTvowcKAuw,35633
+scipy/fft/_pocketfft/tests/test_real_transforms.py,sha256=rlDsGFXc9h2Z8_WCwd0nsKgaDWdeOOE4M-j-wHR2gXk,16864
+scipy/fft/_realtransforms.py,sha256=W1aqqoRdI6rFgipBXmAXsDZURiGQ3wTj9Xx6s89jylM,26450
+scipy/fft/_realtransforms_backend.py,sha256=u4y4nBGCxpTLVqxK1J7xV6tcpeC3-8iiSEXLOcRM9wI,2389
+scipy/fft/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/fft/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/mock_backend.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_backend.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_basic.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_fftlog.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_helper.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_multithreading.cpython-312.pyc,,
+scipy/fft/tests/__pycache__/test_real_transforms.cpython-312.pyc,,
+scipy/fft/tests/mock_backend.py,sha256=p17Hfg6xuoF6Ldxwe1PZ-79Lf_r9FyJUR00N4TokM8k,2685
+scipy/fft/tests/test_backend.py,sha256=DFJ6OKV6gRw4p9OuVfy1ENTeLJCbYS2GuppwpJnwQGQ,4285
+scipy/fft/tests/test_basic.py,sha256=kMHssdoGQcHlcAKPgYWovjNf8ferb37JAf2Igi3U7zY,23050
+scipy/fft/tests/test_fftlog.py,sha256=xxi01Q2gQEozFBgy-A5714FccESVWWvRF1M-hOeB-qs,7616
+scipy/fft/tests/test_helper.py,sha256=KaJHU9jEbFhQ0AYf6GzqZrTeReJrPzSaEA45WM4-tBI,19275
+scipy/fft/tests/test_multithreading.py,sha256=JMSXQocScFghpsy47zov03R5MbEY0Z3ROGt6GxFeWzo,2150
+scipy/fft/tests/test_real_transforms.py,sha256=5TT3lX9ZwqcIOmCxOXQNAyggIh0-5sgxfqGbjPQinBg,9705
+scipy/fftpack/__init__.py,sha256=rLCBFC5Dx5ij_wmL7ChiGmScYlgu0mhaWtrJaz_rBt0,3155
+scipy/fftpack/__pycache__/__init__.cpython-312.pyc,,
+scipy/fftpack/__pycache__/_basic.cpython-312.pyc,,
+scipy/fftpack/__pycache__/_helper.cpython-312.pyc,,
+scipy/fftpack/__pycache__/_pseudo_diffs.cpython-312.pyc,,
+scipy/fftpack/__pycache__/_realtransforms.cpython-312.pyc,,
+scipy/fftpack/__pycache__/basic.cpython-312.pyc,,
+scipy/fftpack/__pycache__/helper.cpython-312.pyc,,
+scipy/fftpack/__pycache__/pseudo_diffs.cpython-312.pyc,,
+scipy/fftpack/__pycache__/realtransforms.cpython-312.pyc,,
+scipy/fftpack/_basic.py,sha256=Sk_gfswmWKb3za6wrU_mIrRVBl69qjzAu9ltznbDCKs,13098
+scipy/fftpack/_helper.py,sha256=8r6Hh2FA5qTzYyn8y4jfaG41FXMfqQyK6SN8x1dIbaE,3348
+scipy/fftpack/_pseudo_diffs.py,sha256=T39Owz8EgL4oqmViBT0ggen9DXOtNHWRxh-n6I7pLyw,15936
+scipy/fftpack/_realtransforms.py,sha256=2k91B3tSnFm6gKsQn-hRGx4J238CKvqwvQevKgDMuaQ,19222
+scipy/fftpack/basic.py,sha256=i2CMMS__L3UtFFqe57E0cs7AZ4U6VO-Ted1KhU7_wNc,577
+scipy/fftpack/convolve.cpython-312-darwin.so,sha256=gSNfD3kyfWQzZrZbUHRSbIPYPPM5P9H-2McHZiFGVO0,114288
+scipy/fftpack/helper.py,sha256=M7jTN4gQIRWpkArQR13bI7WN6WcW-AabxKgrOHRvfeQ,580
+scipy/fftpack/pseudo_diffs.py,sha256=h0vkjsSqAThy7OdTkYWVxQqZ3rILohg7MXJqf5CGMTE,658
+scipy/fftpack/realtransforms.py,sha256=9-mR-VV3W14oTaD6pB5-RIDV3vkTBQmGCcxfbA8GYH0,595
+scipy/fftpack/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/fftpack/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/fftpack/tests/__pycache__/test_basic.cpython-312.pyc,,
+scipy/fftpack/tests/__pycache__/test_helper.cpython-312.pyc,,
+scipy/fftpack/tests/__pycache__/test_import.cpython-312.pyc,,
+scipy/fftpack/tests/__pycache__/test_pseudo_diffs.cpython-312.pyc,,
+scipy/fftpack/tests/__pycache__/test_real_transforms.cpython-312.pyc,,
+scipy/fftpack/tests/fftw_double_ref.npz,sha256=pgxklBW2RSI5JNg0LMxcCXgByGkBKHo2nlP8kln17E4,162120
+scipy/fftpack/tests/fftw_longdouble_ref.npz,sha256=pAbL1NrQTQxZ3Tj1RBb7SUJMgiKcGgdLakTsDN4gAOM,296072
+scipy/fftpack/tests/fftw_single_ref.npz,sha256=J2qRQTGOb8NuSrb_VKYbZAVO-ISbZg8XNZ5fVBtDxSY,95144
+scipy/fftpack/tests/test.npz,sha256=Nt6ASiLY_eoFRZDOSd3zyFmDi32JGTxWs7y2YMv0N5c,11968
+scipy/fftpack/tests/test_basic.py,sha256=xq92TCdPbZbh6DStQ2dTc958GYSe453goeijDJoDGrQ,30472
+scipy/fftpack/tests/test_helper.py,sha256=8JaPSJOwsk5XXOf1zFahJ_ktUTfNGSk2-k3R6e420XI,1675
+scipy/fftpack/tests/test_import.py,sha256=dzyXQHtsdW2WL5ruVp_-MsqSQd_n-tuyq22okrzXlGw,1156
+scipy/fftpack/tests/test_pseudo_diffs.py,sha256=ZJU6AkkH6jKjebu_-Ant-dT6tUGwo1Jx9c5kou1floU,13733
+scipy/fftpack/tests/test_real_transforms.py,sha256=KxSsIxsMzdeif5Jej3MuERF3lC8Cyv_UZnJhLPuKpIU,24460
+scipy/integrate/LICENSE_DOP,sha256=7Zv1jG100_rZ2S0dZ9m_-BQdirYN54RRawcRNk_UM1c,3572
+scipy/integrate/__init__.py,sha256=CmPLfkF66jXhHsKyQPOsvFEc9nxicRYwl6WDAa7cfJk,4373
+scipy/integrate/__pycache__/__init__.cpython-312.pyc,,
+scipy/integrate/__pycache__/_bvp.cpython-312.pyc,,
+scipy/integrate/__pycache__/_cubature.cpython-312.pyc,,
+scipy/integrate/__pycache__/_lebedev.cpython-312.pyc,,
+scipy/integrate/__pycache__/_ode.cpython-312.pyc,,
+scipy/integrate/__pycache__/_odepack_py.cpython-312.pyc,,
+scipy/integrate/__pycache__/_quad_vec.cpython-312.pyc,,
+scipy/integrate/__pycache__/_quadpack_py.cpython-312.pyc,,
+scipy/integrate/__pycache__/_quadrature.cpython-312.pyc,,
+scipy/integrate/__pycache__/_tanhsinh.cpython-312.pyc,,
+scipy/integrate/__pycache__/dop.cpython-312.pyc,,
+scipy/integrate/__pycache__/lsoda.cpython-312.pyc,,
+scipy/integrate/__pycache__/odepack.cpython-312.pyc,,
+scipy/integrate/__pycache__/quadpack.cpython-312.pyc,,
+scipy/integrate/__pycache__/vode.cpython-312.pyc,,
+scipy/integrate/_bvp.py,sha256=Wa__s2B7JyrnfzRthkKOQ-yjWf6Q8mBdpgqVceYJcNI,41294
+scipy/integrate/_cubature.py,sha256=DotC8hiRaXTpml88iHQjqMvFZ4OSGpviPYQ1wmPhi84,25783
+scipy/integrate/_dop.cpython-312-darwin.so,sha256=BZSGSoL-mGYxj8-zY6Hl4PmP8JOEvvTIolRPFXNL4b8,85368
+scipy/integrate/_ivp/__init__.py,sha256=gKFR_pPjr8fRLgAGY5sOzYKGUFu2nGX8x1RrXT-GZZc,256
+scipy/integrate/_ivp/__pycache__/__init__.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/base.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/bdf.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/common.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/dop853_coefficients.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/ivp.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/lsoda.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/radau.cpython-312.pyc,,
+scipy/integrate/_ivp/__pycache__/rk.cpython-312.pyc,,
+scipy/integrate/_ivp/base.py,sha256=TnBAK0wJLgpQLboH4z-ReE4ebTZFcQzIqRb9bj6tdUg,10529
+scipy/integrate/_ivp/bdf.py,sha256=pbdaKuisouZsw17SaK9R2KloWHggnVz3ekTIzO87duY,17501
+scipy/integrate/_ivp/common.py,sha256=GVKTcx-QO7WPr2ejNAi94aEdMv03zFVOr24Q1w2rZ2I,15745
+scipy/integrate/_ivp/dop853_coefficients.py,sha256=OrYvW0Hu6X7sOh37FU58gNkgC77KVpYclewv_ARGMAE,7237
+scipy/integrate/_ivp/ivp.py,sha256=qhb0LMhfoCdp_wC_k7zbSLa_Vo4tn4zkj583jnbPjwk,31824
+scipy/integrate/_ivp/lsoda.py,sha256=WNQ_nNxLf8FbCT-EMcS-3gsMLq9Gvy4B5n_G4hie9KU,10162
+scipy/integrate/_ivp/radau.py,sha256=0KpFk0Me857geCXbbvAyTkqbrO8OI_2kLTdzGLpqYlY,19676
+scipy/integrate/_ivp/rk.py,sha256=-l1jAJF_T5SeaZsRb1muFHFZ1cYUfVXZQNydMwOJEFY,22800
+scipy/integrate/_ivp/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/integrate/_ivp/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/integrate/_ivp/tests/__pycache__/test_ivp.cpython-312.pyc,,
+scipy/integrate/_ivp/tests/__pycache__/test_rk.cpython-312.pyc,,
+scipy/integrate/_ivp/tests/test_ivp.py,sha256=OaUmXnr2t7mAOsNd1cFOeDlc94U-wuZyN1JyKHGdtDI,42961
+scipy/integrate/_ivp/tests/test_rk.py,sha256=K9UxZghBzSL2BzmgLndPJcWOWV4Nr530TGKWakpsoeM,1326
+scipy/integrate/_lebedev.py,sha256=nf4kdsPOziZyaUu_navuh6MijsyvEjy-FfjRhBmNxNw,262106
+scipy/integrate/_ode.py,sha256=xTCs9IUtbtFcEsLa5n6kon-164nE6kbizgfj89yXAZc,50612
+scipy/integrate/_odepack.cpython-312-darwin.so,sha256=E9KnPzkEN6XqIFlGG8FeZnoK1nu3LSLMzMAlMxq7cgU,86624
+scipy/integrate/_odepack_py.py,sha256=9KMWur0vrdVrBsmPQRmkiC1U6HsUvEdZakGvxUjQoOE,11236
+scipy/integrate/_quad_vec.py,sha256=04YU451OTscxe1x2GNFa7WN-NXftT6oQl71VaOr2_6w,21663
+scipy/integrate/_quadpack.cpython-312-darwin.so,sha256=IZOeydNRTZJH--UPm-K8bqqMhGR9eooDNdGI5r1xs6I,104240
+scipy/integrate/_quadpack_py.py,sha256=hZW9ex9x82eAF-6vML56FkppXXz4h9IVi4fKyAqK6SM,54607
+scipy/integrate/_quadrature.py,sha256=xIOz961GKmYlq4yRavQ-RXy1IXyeiEGVTw1IFR6ReD0,49749
+scipy/integrate/_rules/__init__.py,sha256=JNlDLTPYR-FVDeWbm9BHOot47OA8tvOj22g2iJlEsBg,328
+scipy/integrate/_rules/__pycache__/__init__.cpython-312.pyc,,
+scipy/integrate/_rules/__pycache__/_base.cpython-312.pyc,,
+scipy/integrate/_rules/__pycache__/_gauss_kronrod.cpython-312.pyc,,
+scipy/integrate/_rules/__pycache__/_gauss_legendre.cpython-312.pyc,,
+scipy/integrate/_rules/__pycache__/_genz_malik.cpython-312.pyc,,
+scipy/integrate/_rules/_base.py,sha256=iwb872yqwq2Y9LbCTujUKI1CvwZurApCeJAlOR4wrnE,17927
+scipy/integrate/_rules/_gauss_kronrod.py,sha256=ULpHMJRd0J99IFwNufur9BYG8EQhxlGj-OdCBgnE8yk,8473
+scipy/integrate/_rules/_gauss_legendre.py,sha256=KJSMmztXRqTvpmkB-ky-WSVIqAMg_GcWoewTcRxJ1Cw,1733
+scipy/integrate/_rules/_genz_malik.py,sha256=104fosqAnmCI992oY-Z9V_QiuG2ruWLmGS2U_EdshEw,7308
+scipy/integrate/_tanhsinh.py,sha256=2PpDKsfAYbDhAipgbYOquA3By3bF_huijKWk1SKD8SY,61994
+scipy/integrate/_test_multivariate.cpython-312-darwin.so,sha256=wnWvm10C51M8H31OtK1C4rdaCMqu5CQHZ601INOWt14,50664
+scipy/integrate/_vode.cpython-312-darwin.so,sha256=WuH7POVUitZTlsAO6tk99kMIDydT4cbt3U8bTr-IQsg,120840
+scipy/integrate/dop.py,sha256=Kx5Ed_Te81X09bvGmBUq3-_kQNdTIsOdO7ykjEpEG9c,422
+scipy/integrate/lsoda.py,sha256=sDSCG4ZCdIZqraaFTAuwY21-dKGR5JK1kWBpZoaQ0Hk,438
+scipy/integrate/odepack.py,sha256=G5KiKninKFyYgF756_LtDGB68BGk7IwPidUOywFpLQo,545
+scipy/integrate/quadpack.py,sha256=vQNE5jQ-dFpH26er1i8LJSkylFVbeSgVGLwSRQawfYg,604
+scipy/integrate/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/integrate/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test__quad_vec.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_banded_ode_solvers.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_bvp.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_cubature.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_integrate.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_quadpack.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_quadrature.cpython-312.pyc,,
+scipy/integrate/tests/__pycache__/test_tanhsinh.cpython-312.pyc,,
+scipy/integrate/tests/test__quad_vec.py,sha256=j0vhUf6x2lPWWVn8h9hG02W9ZOzU_C9w8ZpJ9-ES5aI,7157
+scipy/integrate/tests/test_banded_ode_solvers.py,sha256=6XDqthVuZzB1tzMF610nBbsN-ylf77AzKl6eIesx4hw,9403
+scipy/integrate/tests/test_bvp.py,sha256=4hxpKpf03EVqxbFXkW5dgTynODyBLf1p9cICLo15hb0,20221
+scipy/integrate/tests/test_cubature.py,sha256=IM4bDXNfTDCujv7Bb25pUIgR4GPUxcTDl1Kt7zCOM1c,37039
+scipy/integrate/tests/test_integrate.py,sha256=U8xGoJdn12hTg5ChjHtKNJ_Za4XizUbAeAqIgMXFMCc,24823
+scipy/integrate/tests/test_quadpack.py,sha256=69NSMQWbVeIdFNgluwHzWODgqMsqJ94nrgv2OfRD7OI,29837
+scipy/integrate/tests/test_quadrature.py,sha256=zcZLRmUO5Zh97Bqlz5WQke_ncUBRx88qcBgOhHjU6UI,29681
+scipy/integrate/tests/test_tanhsinh.py,sha256=ugdJH-kNA4OvEmH5-c3ZaFC0OPl_MjaHYjndU_lZKc8,44339
+scipy/integrate/vode.py,sha256=DPRqm2oBQx6KKi5tl9dDVpXEdAO--W0WpRQEyLeQpf4,424
+scipy/interpolate/__init__.py,sha256=i0mcQWXv0KbAn44vld8w-9NrRy-z_w0xf5_kQnBTtK8,4073
+scipy/interpolate/__pycache__/__init__.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_bary_rational.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_bsplines.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_cubic.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_fitpack2.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_fitpack_impl.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_fitpack_py.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_fitpack_repro.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_interpolate.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_ndbspline.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_ndgriddata.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_pade.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_polyint.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rbf.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rbfinterp.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rbfinterp_common.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rbfinterp_np.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rbfinterp_xp.cpython-312.pyc,,
+scipy/interpolate/__pycache__/_rgi.cpython-312.pyc,,
+scipy/interpolate/__pycache__/dfitpack.cpython-312.pyc,,
+scipy/interpolate/__pycache__/fitpack.cpython-312.pyc,,
+scipy/interpolate/__pycache__/fitpack2.cpython-312.pyc,,
+scipy/interpolate/__pycache__/interpnd.cpython-312.pyc,,
+scipy/interpolate/__pycache__/interpolate.cpython-312.pyc,,
+scipy/interpolate/__pycache__/ndgriddata.cpython-312.pyc,,
+scipy/interpolate/__pycache__/polyint.cpython-312.pyc,,
+scipy/interpolate/__pycache__/rbf.cpython-312.pyc,,
+scipy/interpolate/_bary_rational.py,sha256=7fXt48Jnqjpm1SxXMVa4Em7DwMG20ztDqhpLLDnLqec,29413
+scipy/interpolate/_bsplines.py,sha256=Grc2RwSO2a39bgDLUnWgmjLtw69FIgPlkttnkHuwkag,90686
+scipy/interpolate/_cubic.py,sha256=43ZTzXx8y814x9ENHkm-CoBj_EZvRlPjYMdMjVm9T60,40394
+scipy/interpolate/_dfitpack.cpython-312-darwin.so,sha256=qNJ34CqMeMSZnaA5FawyyIN7u8y53BA3x4zPjzihv-c,312368
+scipy/interpolate/_dierckx.cpython-312-darwin.so,sha256=0t67xIKypMigWcbGzRTvb7orNV_CsuZXwXLYkTxTpC4,109376
+scipy/interpolate/_fitpack.cpython-312-darwin.so,sha256=gYscXkozt-JjUclYkGI2rmLQAKZw690NdmH2OiFrIZc,121088
+scipy/interpolate/_fitpack2.py,sha256=JhjnBItSNgIwQxwEYFrRnLaOB-4RpzZlONM9Z-XiS6U,90341
+scipy/interpolate/_fitpack_impl.py,sha256=hILtqHWDVZLHMtn733teZhVQmB8JJTuSsG7Zatdtc7k,28887
+scipy/interpolate/_fitpack_py.py,sha256=XjU-kc64_r2sMqEKa83kVTz6yu4tVuYYNamd16FzWCA,32531
+scipy/interpolate/_fitpack_repro.py,sha256=sBfZSJbpVy9BfSDdwjxX1670WF9CSPXPcaLqiLgYhNc,52250
+scipy/interpolate/_interpnd.cpython-312-darwin.so,sha256=RD_bGdfKsaT6jcNliZBPi44d5bQ-rcvELZiKB_NLLm8,204672
+scipy/interpolate/_interpolate.py,sha256=qgtZ-9PzD3DRj2ouFbCvUXe0KU4z-A7MI4x4aLkm4oc,81898
+scipy/interpolate/_ndbspline.py,sha256=Cn59KG-OyS7dbf20aEkc9lhjmTivvAA5yeuYpdm1oOE,17831
+scipy/interpolate/_ndgriddata.py,sha256=EQO3oNjAUukmWOte4vV_4UiUvabNvk10qqP0oVqWPlg,12154
+scipy/interpolate/_pade.py,sha256=OBorKWc3vCSGlsWrajoF1_7WeNd9QtdbX0wOHLdRI2A,1827
+scipy/interpolate/_polyint.py,sha256=I7iJfOAgVlxazOAwVRRwg01nnT8xJwngdh6D1pGsEvI,39078
+scipy/interpolate/_ppoly.cpython-312-darwin.so,sha256=cIhml8muS_mO0e8P4begW48kGrcvIbDbTU5pjVvfHsQ,200208
+scipy/interpolate/_rbf.py,sha256=rKLmfGuZTVDJ3qWIyy_mqI7u5EYijMnFGJ9EUFqnT0g,11767
+scipy/interpolate/_rbfinterp.py,sha256=sk9PvSsWKmTtlpAzorTpZj0VjBGHIdrAiq-DiKF1T7c,19504
+scipy/interpolate/_rbfinterp_common.py,sha256=YSKWb68Lb9CXfwoCm1u71tq2il-0lxknFfwgufdkHKE,973
+scipy/interpolate/_rbfinterp_np.py,sha256=-N02r-8uoZ5I15YF2C4UvCJoA841SUtN8spyxpo22JE,3003
+scipy/interpolate/_rbfinterp_pythran.cpython-312-darwin.so,sha256=rYFfSwzdAVWwqnCPMwlAOUXCDWfB_JeLb3fSrDX7Z_o,303000
+scipy/interpolate/_rbfinterp_xp.py,sha256=A4r4GkCe7LJD4FzZl69FcuIgmrYr1tPlrO6I8dO0TFs,7654
+scipy/interpolate/_rgi.py,sha256=PCTaU97SQz6hdzvOlBLRu8dOhiWizTXkYBi_e8XSqfU,32343
+scipy/interpolate/_rgi_cython.cpython-312-darwin.so,sha256=nzqylQFhItAcWQmw-Ea3nVAbWuuazVk86xHU4LnMPro,116240
+scipy/interpolate/dfitpack.py,sha256=lRSKk1GcuWHJCyBXjRlg5lupLzugQHrR47tWL0vYvzc,594
+scipy/interpolate/fitpack.py,sha256=aCH6A3dRouuXW47tK5lEdd2pJa39LCkewY-1zTlI8Hc,702
+scipy/interpolate/fitpack2.py,sha256=P15_3gM5eZQYb_-K3c70xKdeIGM81u5WAkVhY8ei4N0,817
+scipy/interpolate/interpnd.py,sha256=3jlLsX7kgW7s2YPBkT-W-iA_qxTbbpm72YCIzZ_B4go,609
+scipy/interpolate/interpolate.py,sha256=Aiu_dJ_oxq-Y1VXns5N5u5K1Wng2hzCgRgRiDhTAiVI,754
+scipy/interpolate/ndgriddata.py,sha256=VbvvoDPdWmrk8871y5olPS9StX0S_B27j_oGMAyj8QQ,636
+scipy/interpolate/polyint.py,sha256=ek1EtbIbLLwehb8XDSKeNvIdjTfDQoQ9CSu4TbY8Vbo,672
+scipy/interpolate/rbf.py,sha256=6oBxdpsKY8bH36nQnRNiLB9C1bNri8b2PHz9IsUIr-w,519
+scipy/interpolate/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/interpolate/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_bary_rational.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_bsplines.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_fitpack.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_fitpack2.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_gil.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_interpnd.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_interpolate.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_ndgriddata.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_pade.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_polyint.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_rbf.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_rbfinterp.cpython-312.pyc,,
+scipy/interpolate/tests/__pycache__/test_rgi.cpython-312.pyc,,
+scipy/interpolate/tests/data/bug-1310.npz,sha256=jWgDwLOY8nBMI28dG56OXt4GvRZaCrsPIoKBq71FWuk,2648
+scipy/interpolate/tests/data/estimate_gradients_hang.npy,sha256=QGwQhXQX_16pjYzSiUXJ0OT1wk-SpIrQ6Pq5Vb8kd_E,35680
+scipy/interpolate/tests/data/gcvspl.npz,sha256=A86BVabLoMG_CiRBoQwigZH5Ft7DbLggcjQpgRKWu6g,3138
+scipy/interpolate/tests/test_bary_rational.py,sha256=FAVnCJp47GqLiyFvAwxdbTJ19tGtU5zlMn6Qe4Ce9zI,16910
+scipy/interpolate/tests/test_bsplines.py,sha256=rdOVoAnRO_uSxmvqNGrD3drg1yDzFXVFjHhGWUYbJM0,153446
+scipy/interpolate/tests/test_fitpack.py,sha256=acG5xw_5Aqq8nMsvIoZ1KPz7vRxMqcfB0WBcBkCgpkg,17399
+scipy/interpolate/tests/test_fitpack2.py,sha256=QjYhewXBSGk6HNwicBRz6kKgvuD9KneyYlg4Y1EMfyc,62605
+scipy/interpolate/tests/test_gil.py,sha256=BPC_Ig9lRg28mVHIqdSqWnwBKLukTXFkbrdqUYuskq4,1831
+scipy/interpolate/tests/test_interpnd.py,sha256=c9zFLhOMViZnMji86zTr6FYj-nAPixvKzT2weEMP6_Y,15527
+scipy/interpolate/tests/test_interpolate.py,sha256=SQjJ-Veo1RsFd7nMBbGgzgCSFSkVoGEoY69SCSf7JjY,102263
+scipy/interpolate/tests/test_ndgriddata.py,sha256=MqDsDmIoqT3dxQN-NN830zKwb8dPsmt6goT0AyOxRRk,10994
+scipy/interpolate/tests/test_pade.py,sha256=5gmdgTBoJGsY-d813it9JP5Uh8Wc88dz3vPQ2pRZdNk,3868
+scipy/interpolate/tests/test_polyint.py,sha256=cEV25IpJAnJIAL82EzTQSGse79D7qDR_fV4dOk62qvg,37482
+scipy/interpolate/tests/test_rbf.py,sha256=cg3vMfbKsBZDLCfVe7atEXHbhtaAfk_ks02vioLq3DE,7004
+scipy/interpolate/tests/test_rbfinterp.py,sha256=eZPUOhIfoPrB3_9Onje7bvE-_iuz9fb8r6n1sn2l1l8,20714
+scipy/interpolate/tests/test_rgi.py,sha256=le3DUXU6C3JcWKUViRUq9s5gRzhnIkiLoLjYdDu54kg,49988
+scipy/io/__init__.py,sha256=V7XGFwDG6dzpq6Yamyz82M6abAtHQ-XciEyNF8Rga-w,2775
+scipy/io/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/__pycache__/_fortran.cpython-312.pyc,,
+scipy/io/__pycache__/_idl.cpython-312.pyc,,
+scipy/io/__pycache__/_mmio.cpython-312.pyc,,
+scipy/io/__pycache__/_netcdf.cpython-312.pyc,,
+scipy/io/__pycache__/harwell_boeing.cpython-312.pyc,,
+scipy/io/__pycache__/idl.cpython-312.pyc,,
+scipy/io/__pycache__/mmio.cpython-312.pyc,,
+scipy/io/__pycache__/netcdf.cpython-312.pyc,,
+scipy/io/__pycache__/wavfile.cpython-312.pyc,,
+scipy/io/_fast_matrix_market/__init__.py,sha256=jKXsxc05BZCedYkHhoqrSp3z6VSQ0VrFqeRvb8U1-eA,17238
+scipy/io/_fast_matrix_market/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/_fast_matrix_market/_fmm_core.cpython-312-darwin.so,sha256=Y8LKej8ue1fF6n8y06S78gp6QVXsjNwf6ekUZDZHG3Q,2178496
+scipy/io/_fortran.py,sha256=pgbB0LbOKEfPk07y-9IQXUyT7Kx_wHP0AyGPLtC53yM,10893
+scipy/io/_harwell_boeing/__init__.py,sha256=90qYbBzDEoTMG8ouVLGnTU2GMsY4BYOOtwJdoKT3Zz8,164
+scipy/io/_harwell_boeing/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/_harwell_boeing/__pycache__/_fortran_format_parser.cpython-312.pyc,,
+scipy/io/_harwell_boeing/__pycache__/hb.cpython-312.pyc,,
+scipy/io/_harwell_boeing/_fortran_format_parser.py,sha256=qvHmXonHRYMYTc-sV7TxRwxdrt4WRZk4rgawnwcleQ0,9003
+scipy/io/_harwell_boeing/hb.py,sha256=JM1Jh2EnA9zZsE7P3CcYmIc7n3hPzJ8yRKNWARGcSx4,19395
+scipy/io/_harwell_boeing/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/io/_harwell_boeing/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/_harwell_boeing/tests/__pycache__/test_fortran_format.cpython-312.pyc,,
+scipy/io/_harwell_boeing/tests/__pycache__/test_hb.cpython-312.pyc,,
+scipy/io/_harwell_boeing/tests/test_fortran_format.py,sha256=hPH4AmfUmyBrDU3C_Rx3j7yaGEjefQJOai4rfxMHuV0,2383
+scipy/io/_harwell_boeing/tests/test_hb.py,sha256=jYbRWktqO5bgXDh8i9O_u_KDTpYQcMx_blw7Pn66Nd0,2516
+scipy/io/_idl.py,sha256=sgL0II6EcAe6Mtp_SdqmAIvvMGq9UFsWeH7M8RTGvIY,27000
+scipy/io/_mmio.py,sha256=Z5aX35ByVM6wBw4V42v4DInsc9KPyY8yck9V0FnzkKk,32076
+scipy/io/_netcdf.py,sha256=YCXUusfyVs5f7sq-_xYCZS2HBYXs_1X1NAD8darpgFw,39676
+scipy/io/arff/__init__.py,sha256=czaV8hvY6JnmEn2qyU3_fzcy_P55aXVT09OzGnhJT9I,805
+scipy/io/arff/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/arff/__pycache__/_arffread.cpython-312.pyc,,
+scipy/io/arff/__pycache__/arffread.cpython-312.pyc,,
+scipy/io/arff/_arffread.py,sha256=RL7qcF1oAVhsVsJHsgo8zQdP8_7JFjl2y5u981xU_80,26143
+scipy/io/arff/arffread.py,sha256=KW6mASZrW2J1wmC3GYucy1EO7y-rg5MgcGDMyMTpfw4,575
+scipy/io/arff/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/io/arff/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/arff/tests/__pycache__/test_arffread.cpython-312.pyc,,
+scipy/io/arff/tests/data/iris.arff,sha256=fTS6VWSX6dwoM16mYoo30dvLoJChriDcLenHAy0ZkVM,7486
+scipy/io/arff/tests/data/missing.arff,sha256=ga__Te95i1Yf-yu2kmYDBVTz0xpSTemz7jS74_OfI4I,120
+scipy/io/arff/tests/data/nodata.arff,sha256=DBXdnIe28vrbf4C-ar7ZgeFIa0kGD4pDBJ4YP-z4QHQ,229
+scipy/io/arff/tests/data/quoted_nominal.arff,sha256=01mPSc-_OpcjXFy3EoIzKdHCmzWSag4oK1Ek2tUc6_U,286
+scipy/io/arff/tests/data/quoted_nominal_spaces.arff,sha256=bcMOl-E0I5uTT27E7bDTbW2mYOp9jS8Yrj0NfFjQdKU,292
+scipy/io/arff/tests/data/test1.arff,sha256=nUFDXUbV3sIkur55rL4qvvBdqUTbzSRrTiIPwmtmG8I,191
+scipy/io/arff/tests/data/test10.arff,sha256=va7cXiWX_AnHf-_yz25ychD8hOgf7-sEMJITGwQla30,199009
+scipy/io/arff/tests/data/test11.arff,sha256=G-cbOUUxuc3859vVkRDNjcLRSnUu8-T-Y8n0dSpvweo,241
+scipy/io/arff/tests/data/test2.arff,sha256=COGWCYV9peOGLqlYWhqG4ANT2UqlAtoVehbJLW6fxHw,300
+scipy/io/arff/tests/data/test3.arff,sha256=jUTWGaZbzoeGBneCmKu6V6RwsRPp9_0sJaSCdBg6tyI,72
+scipy/io/arff/tests/data/test4.arff,sha256=mtyuSFKUeiRR2o3mNlwvDCxWq4DsHEBHj_8IthNzp-M,238
+scipy/io/arff/tests/data/test5.arff,sha256=2Q_prOBCfM_ggsGRavlOaJ_qnWPFf2akFXJFz0NtTIE,365
+scipy/io/arff/tests/data/test6.arff,sha256=V8FNv-WUdurutFXKTOq8DADtNDrzfW65gyOlv-lquOU,195
+scipy/io/arff/tests/data/test7.arff,sha256=rxsqdev8WeqC_nKJNwetjVYXA1-qCzWmaHlMvSaVRGk,559
+scipy/io/arff/tests/data/test8.arff,sha256=c34srlkU8hkXYpdKXVozEutiPryR8bf_5qEmiGQBoG4,429
+scipy/io/arff/tests/data/test9.arff,sha256=ZuXQQzprgmTXxENW7we3wBJTpByBlpakrvRgG8n7fUk,311
+scipy/io/arff/tests/test_arffread.py,sha256=bWB6uAqr6Iadm3fWhhlo6M2fM0WTKrLTC1BmXYKidJ4,13094
+scipy/io/harwell_boeing.py,sha256=BzISbfgVnrO3vYx-mP2xkLqh9r3oq64NNPbEY03P6v0,538
+scipy/io/idl.py,sha256=A1QV5h6xBa1cTIejjsc1NfjG0MqMbxqFqXicC2OLNrM,504
+scipy/io/matlab/__init__.py,sha256=PMqq8WBOEOPH_v5IVpuxrBTqXOFBJVuegOCml76pr1s,2247
+scipy/io/matlab/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_byteordercodes.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_mio.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_mio4.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_mio5.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_mio5_params.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/_miobase.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/byteordercodes.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio4.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio5.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio5_params.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio5_utils.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/mio_utils.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/miobase.cpython-312.pyc,,
+scipy/io/matlab/__pycache__/streams.cpython-312.pyc,,
+scipy/io/matlab/_byteordercodes.py,sha256=AUMjfdIARtCGqyMgDDJBGa_EncP5ioYrEzyZqXOLRxU,1983
+scipy/io/matlab/_mio.py,sha256=uKitl4DrzKwzk1mDXFFIZMHTZACww6zYGBqMZjwqHQc,13955
+scipy/io/matlab/_mio4.py,sha256=W9FaF7ryhbT10TEgHcuovZkm7w2zIU3tDtnb5gIlYlQ,20993
+scipy/io/matlab/_mio5.py,sha256=hBvVcnAUZX2hLZzQDfSnlUQVWtQlD53ur8w7VkpT9Qs,33989
+scipy/io/matlab/_mio5_params.py,sha256=skRcKG70vOlVMSb1TO67LB5312zuOUSrcOK7mOCcUss,8201
+scipy/io/matlab/_mio5_utils.cpython-312-darwin.so,sha256=6olBAHcf5w4oTYlOiyvHtWcsGegU4EHFxYphmY6edyo,206176
+scipy/io/matlab/_mio_utils.cpython-312-darwin.so,sha256=y1K5ZaHCrmzSLBcwEROLQKvt3e27G4MrJ3vVAugjG20,94544
+scipy/io/matlab/_miobase.py,sha256=AmMxD5puIqxYYv8MCSdF2wUDqwOTSoyo9I6hh51myaQ,13102
+scipy/io/matlab/_streams.cpython-312-darwin.so,sha256=DBJZ4wttU3CIBHD9P4J7Zz4keeIGbF69e-1RnSzEvCI,132992
+scipy/io/matlab/byteordercodes.py,sha256=fHZVESDgIeYzGYtRlknPQ2nUqscQQ_4FhQc_ClkjBvQ,528
+scipy/io/matlab/mio.py,sha256=2b0WwgQ0rBkoJ4X0hgPl889PpR7Q0i7ibSLtTQVuTto,539
+scipy/io/matlab/mio4.py,sha256=hkhpBa4p0euf2rUjJviBWJ4TJs1wkUads3mX1fgDYMc,508
+scipy/io/matlab/mio5.py,sha256=jEFeEEkXWOhziPreDt0SqfAtOo9JMauxoODAbbXHmoQ,638
+scipy/io/matlab/mio5_params.py,sha256=2RWROlfc8RmXmcXGyM-be107Tm55ibc_U7DztJ2b4fc,593
+scipy/io/matlab/mio5_utils.py,sha256=DYiQfx5BkyDVnK4nZ3xPa-5tbpZE7WRx4SIdBmPVfSI,520
+scipy/io/matlab/mio_utils.py,sha256=VZPx03BNFbrQjB1CNbDCvvXUuP0_VoNRFV1R0YoB2iw,518
+scipy/io/matlab/miobase.py,sha256=3qQoq8Y7ZQpHIufUCzg6RAeaLqU3qTAozmuYbaOd7BI,565
+scipy/io/matlab/streams.py,sha256=0Aww9GRGGnRmiAMBAzIAXsFGySu5YCUNG-cHP1omYjI,513
+scipy/io/matlab/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/io/matlab/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_byteordercodes.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_mio.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_mio5_utils.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_mio_funcs.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_mio_utils.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_miobase.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_pathological.cpython-312.pyc,,
+scipy/io/matlab/tests/__pycache__/test_streams.cpython-312.pyc,,
+scipy/io/matlab/tests/data/bad_miuint32.mat,sha256=CVkYHp_U4jxYKRRHSuZ5fREop4tJjnZcQ02DKfObkRA,272
+scipy/io/matlab/tests/data/bad_miutf8_array_name.mat,sha256=V-jfVMkYyy8qRGcOIsNGcoO0GCgTxchrsQUBGBnfWHE,208
+scipy/io/matlab/tests/data/big_endian.mat,sha256=2ttpiaH2B6nmHnq-gsFeMvZ2ZSLOlpzt0IJiqBTcc8M,273
+scipy/io/matlab/tests/data/broken_utf8.mat,sha256=nm8aotRl6NIxlM3IgPegKR3EeevYZoJCrYpV4Sa1T5I,216
+scipy/io/matlab/tests/data/corrupted_zlib_checksum.mat,sha256=X4dvE7K9DmGEF3D6I-48hC86W41jB54H7bD8KTXjtYA,276
+scipy/io/matlab/tests/data/corrupted_zlib_data.mat,sha256=DfE1YBH-pYw-dAaEeKA6wZcyKeo9GlEfrzZtql-fO_w,3451
+scipy/io/matlab/tests/data/debigged_m4.mat,sha256=8QbD-LzoYbKSfOYPRRw-oelDJscwufYp5cqLfZ1hB0c,1024
+scipy/io/matlab/tests/data/japanese_utf8.txt,sha256=rgxiBH7xmEKF91ZkB3oMLrqABBXINEMHPXDKdZXNBEY,270
+scipy/io/matlab/tests/data/little_endian.mat,sha256=FQP_2MNod-FFF-JefN7ZxovQ6QLCdHQ0DPL_qBCP44Y,265
+scipy/io/matlab/tests/data/logical_sparse.mat,sha256=qujUUpYewaNsFKAwGpYS05z7kdUv9TQZTHV5_lWhRrs,208
+scipy/io/matlab/tests/data/malformed1.mat,sha256=DTuTr1-IzpLMBf8u5DPb3HXmw9xJo1aWfayA5S_3zUI,2208
+scipy/io/matlab/tests/data/miuint32_for_miint32.mat,sha256=romrBP_BS46Sl2-pKWsUnxYDad2wehyjq4wwLaVqums,272
+scipy/io/matlab/tests/data/miutf8_array_name.mat,sha256=Vo8JptFr-Kg2f2cEoDg8LtELSjVNyccdJY74WP_kqtc,208
+scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat,sha256=bvdmj6zDDUIpOfIP8J4Klo107RYCDd5VK5gtOYx3GsU,8168
+scipy/io/matlab/tests/data/one_by_zero_char.mat,sha256=Z3QdZjTlOojjUpS0cfBP4XfNQI3GTjqU0n_pnAzgQhU,184
+scipy/io/matlab/tests/data/parabola.mat,sha256=ENWuWX_uwo4Av16dIGOwnbMReAMrShDhalkq8QUI8Rg,729
+scipy/io/matlab/tests/data/single_empty_string.mat,sha256=4uTmX0oydTjmtnhxqi9SyPWCG2I24gj_5LarS80bPik,171
+scipy/io/matlab/tests/data/some_functions.mat,sha256=JA736oG3s8PPdKhdsYK-BndLUsGrJCJAIRBseSIEZtM,1397
+scipy/io/matlab/tests/data/sqr.mat,sha256=3DtGl_V4wABKCDQ0P3He5qfOzpUTC-mINdK73MKS7AM,679
+scipy/io/matlab/tests/data/test3dmatrix_6.1_SOL2.mat,sha256=-odiBIQAbOLERg0Vg682QHGfs7C8MaA_gY77OWR8x78,232
+scipy/io/matlab/tests/data/test3dmatrix_6.5.1_GLNX86.mat,sha256=G5siwvZ-7Uv5KJ6h7AA3OHL6eiFsd8Lnjx4IcoByzCU,232
+scipy/io/matlab/tests/data/test3dmatrix_7.1_GLNX86.mat,sha256=EVj1wPnoyWGIdTpkSj3YAwqzTAm27eqZNxCaJAs3pwU,213
+scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat,sha256=S_Sd3sxorDd8tZ5CxD5_J8vXbfcksLWzhUQY5b82L9g,213
+scipy/io/matlab/tests/data/test_empty_struct.mat,sha256=WoC7g7TyXqNr2T0d5xE3IUq5PRzatE0mxXjqoHX5Xec,173
+scipy/io/matlab/tests/data/test_mat4_le_floats.mat,sha256=2xvn3Cg4039shJl62T-bH-VeVP_bKtwdqvGfIxv8FJ4,38
+scipy/io/matlab/tests/data/test_skip_variable.mat,sha256=pJLVpdrdEb-9SMZxaDu-uryShlIi90l5LfXhvpVipJ0,20225
+scipy/io/matlab/tests/data/testbool_8_WIN64.mat,sha256=_xBw_2oZA7u9Xs6GJItUpSIEV4jVdfdcwzmLNFWM6ow,185
+scipy/io/matlab/tests/data/testcell_6.1_SOL2.mat,sha256=OWOBzNpWTyAHIcZABRytVMcABiRYgEoMyF9gDaIkFe4,536
+scipy/io/matlab/tests/data/testcell_6.5.1_GLNX86.mat,sha256=7111TN_sh1uMHmYx-bjd_v9uaAnWhJMhrQFAtAw6Nvk,536
+scipy/io/matlab/tests/data/testcell_7.1_GLNX86.mat,sha256=62p6LRW6PbM-Y16aUeGVhclTVqS5IxPUtsohe7MjrYo,283
+scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat,sha256=NkTA8UW98hIQ0t5hGx_leG-MzNroDelYwqx8MPnO63Q,283
+scipy/io/matlab/tests/data/testcellnest_6.1_SOL2.mat,sha256=AeNaog8HUDCVrIuGICAXYu9SGDsvV6qeGjgvWHrVQho,568
+scipy/io/matlab/tests/data/testcellnest_6.5.1_GLNX86.mat,sha256=Gl4QA0yYwGxjiajjgWS939WVAM-W2ahNIm9wwMaT5oc,568
+scipy/io/matlab/tests/data/testcellnest_7.1_GLNX86.mat,sha256=CUGtkwIU9CBa0Slx13mbaM67_ec0p-unZdu8Z4YYM3c,228
+scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat,sha256=TeTk5yjl5j_bcnmIkpzuYHxGGQXNu-rK6xOsN4t6lX8,228
+scipy/io/matlab/tests/data/testcomplex_4.2c_SOL2.mat,sha256=WOwauWInSVUFBuOJ1Bo3spmUQ3UWUIlsIe4tYGlrU7o,176
+scipy/io/matlab/tests/data/testcomplex_6.1_SOL2.mat,sha256=GpAEccizI8WvlrBPdvlKUv6uKbZOo_cjUK3WVVb2lo4,352
+scipy/io/matlab/tests/data/testcomplex_6.5.1_GLNX86.mat,sha256=3MEbf0zJdQGAO7x-pzFCup2QptfYJHQG59z0vVOdxl4,352
+scipy/io/matlab/tests/data/testcomplex_7.1_GLNX86.mat,sha256=VNHV2AIEkvPuhae1kKIqt5t8AMgUyr0L_CAp-ykLxt4,247
+scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat,sha256=8rWGf5bqY7_2mcd5w5gTYgMkXVePlLL8qT7lh8kApn0,247
+scipy/io/matlab/tests/data/testdouble_4.2c_SOL2.mat,sha256=MzT7OYPEUXHYNPBrVkyKEaG5Cas2aOA0xvrO7l4YTrQ,103
+scipy/io/matlab/tests/data/testdouble_6.1_SOL2.mat,sha256=DpB-mVKx1gsjl-3IbxfxHNuzU5dnuku-MDQCA8kALVI,272
+scipy/io/matlab/tests/data/testdouble_6.5.1_GLNX86.mat,sha256=4hY5VEubavNEv5KvcqQnd7MWWvFUzHXXpYIqUuUt-50,272
+scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat,sha256=N2QOOIXPyy0zPZZ_qY7xIDaodMGrTq3oXNBEHZEscw0,232
+scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat,sha256=TrkJ4Xx_dC9YrPdewlsOvYs_xag7gT3cN4HkDsJmT8I,232
+scipy/io/matlab/tests/data/testemptycell_5.3_SOL2.mat,sha256=g96Vh9FpNhkiWKsRm4U6KqeKd1hNAEyYSD7IVzdzwsU,472
+scipy/io/matlab/tests/data/testemptycell_6.5.1_GLNX86.mat,sha256=2Zw-cMv-Mjbs2HkSl0ubmh_htFUEpkn7XVHG8iM32o0,472
+scipy/io/matlab/tests/data/testemptycell_7.1_GLNX86.mat,sha256=t5Ar8EgjZ7fkTUHIVpdXg-yYWo_MBaigMDJUGWEIrmU,218
+scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat,sha256=5PPvfOoL-_Q5ou_2nIzIrHgeaOZGFXGxAFdYzCQuwEQ,218
+scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat,sha256=ScTKftENe78imbMc0I5ouBlIMcEEmZgu8HVKWAMNr58,381
+scipy/io/matlab/tests/data/testhdf5_7.4_GLNX86.mat,sha256=ZoVbGk38_MCppZ0LRr6OE07HL8ZB4rHXgMj9LwUBgGg,4168
+scipy/io/matlab/tests/data/testmatrix_4.2c_SOL2.mat,sha256=14YMiKAN9JCPTqSDXxa58BK6Un7EM4hEoSGAUuwKWGQ,151
+scipy/io/matlab/tests/data/testmatrix_6.1_SOL2.mat,sha256=ZdjNbcIE75V5Aht5EVBvJX26aabvNqbUH0Q9VBnxBS4,216
+scipy/io/matlab/tests/data/testmatrix_6.5.1_GLNX86.mat,sha256=OB82QgB6SwtsxT4t453OVSj-B777XrHGEGOMgMD1XGc,216
+scipy/io/matlab/tests/data/testmatrix_7.1_GLNX86.mat,sha256=-TYB0kREY7i7gt5x15fOYjXi410pXuDWUFxPYuMwywI,193
+scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat,sha256=l9psDc5K1bpxNeuFlyYIYauswLnOB6dTX6-jvelW0kU,193
+scipy/io/matlab/tests/data/testminus_4.2c_SOL2.mat,sha256=2914WYQajPc9-Guy3jDOLU3YkuE4OXC_63FUSDzJzX0,38
+scipy/io/matlab/tests/data/testminus_6.1_SOL2.mat,sha256=2X2fZKomz0ktBvibj7jvHbEvt2HRA8D6hN9qA1IDicw,200
+scipy/io/matlab/tests/data/testminus_6.5.1_GLNX86.mat,sha256=i364SgUCLSYRjQsyygvY1ArjEaO5uLip3HyU-R7zaLo,200
+scipy/io/matlab/tests/data/testminus_7.1_GLNX86.mat,sha256=gtYNC9_TciYdq8X9IwyGEjiw2f1uCVTGgiOPFOiQbJc,184
+scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat,sha256=eXcoTM8vKuh4tQnl92lwdDaqssGB6G9boSHh3FOCkng,184
+scipy/io/matlab/tests/data/testmulti_4.2c_SOL2.mat,sha256=Zhyu2KCsseSJ5NARdS00uwddCs4wmjcWNP2LJFns2-Q,240
+scipy/io/matlab/tests/data/testmulti_7.1_GLNX86.mat,sha256=KI3H58BVj6k6MFsj8icSbjy_0Z-jOesWN5cafStLPG8,276
+scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat,sha256=Yr4YKCP27yMWlK5UOK3BAEOAyMr-m0yYGcj8v1tCx-I,276
+scipy/io/matlab/tests/data/testobject_6.1_SOL2.mat,sha256=kzLxy_1o1HclPXWyA-SX5gl6LsG1ioHuN4eS6x5iZio,800
+scipy/io/matlab/tests/data/testobject_6.5.1_GLNX86.mat,sha256=dq_6_n0v7cUz9YziXn-gZFNc9xYtNxZ8exTsziWIM7s,672
+scipy/io/matlab/tests/data/testobject_7.1_GLNX86.mat,sha256=3z-boFw0SC5142YPOLo2JqdusPItVzjCFMhXAQNaQUQ,306
+scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat,sha256=5OwLTMgCBlxsDfiEUzlVjqcSbVQG-X5mIw5JfW3wQXA,306
+scipy/io/matlab/tests/data/testonechar_4.2c_SOL2.mat,sha256=BCvppGhO19-j-vxAvbdsORIiyuJqzCuQog9Ao8V1lvA,40
+scipy/io/matlab/tests/data/testonechar_6.1_SOL2.mat,sha256=ThppTHGJFrUfal5tewS70DL00dSwk1otazuVdJrTioE,200
+scipy/io/matlab/tests/data/testonechar_6.5.1_GLNX86.mat,sha256=SBfN6e7Vz1rAdi8HLguYXcHUHk1viaXTYccdEyhhob4,200
+scipy/io/matlab/tests/data/testonechar_7.1_GLNX86.mat,sha256=m8W9GqvflfAsizkhgAfT0lLcxuegZIWCLNuHVX69Jac,184
+scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat,sha256=t9ObKZOLy3vufnER8TlvQcUkd_wmXbJSdQoG4f3rVKY,184
+scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat,sha256=5LX9sLH7Y6h_N_a1XRN2GuMgp_P7ECpPsXGDOypAJg0,194
+scipy/io/matlab/tests/data/testsimplecell.mat,sha256=Aoeh0PX2yiLDTwkxMEyZ_CNX2mJHZvyfuFJl817pA1c,220
+scipy/io/matlab/tests/data/testsparse_4.2c_SOL2.mat,sha256=dFUcB1gunfWqexgR4YDZ_Ec0w0HffM1DUE1C5PVfDDc,223
+scipy/io/matlab/tests/data/testsparse_6.1_SOL2.mat,sha256=9Sgd_SPkGNim7ZL0xgD71qml3DK0yDHYC7VSNLNQEXA,280
+scipy/io/matlab/tests/data/testsparse_6.5.1_GLNX86.mat,sha256=jp1ILNxLyV6XmCCGxAz529XoZ9dhCqGEO-ExPH70_Pg,328
+scipy/io/matlab/tests/data/testsparse_7.1_GLNX86.mat,sha256=k8QuQ_4Zu7FWTzHjRnHCVZ9Yu5vwNP0WyNzu6TuiY-4,229
+scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat,sha256=QbZOCqIvnaK0XOH3kaSXBe-m_1_Rb33psq8E-WMSBTU,229
+scipy/io/matlab/tests/data/testsparsecomplex_4.2c_SOL2.mat,sha256=QMVoBXVyl9RBGvAjLoiW85kAXYJ-hHprUMegEG69A5w,294
+scipy/io/matlab/tests/data/testsparsecomplex_6.1_SOL2.mat,sha256=WfEroAT5YF4HGAKq3jTJxlFrKaTCh3rwlSlKu__VjwA,304
+scipy/io/matlab/tests/data/testsparsecomplex_6.5.1_GLNX86.mat,sha256=e0s6cyoKJeYMArdceHpnKDvtCVcw7XuB44OBDHpoa6U,400
+scipy/io/matlab/tests/data/testsparsecomplex_7.1_GLNX86.mat,sha256=kgHcuq-deI2y8hfkGwlMOkW7lntexdPHfuz0ar6b3jo,241
+scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat,sha256=rYCaWNLXK7f_jjMc6_UvZz6ZDuMCuVRmJV5RyeXiDm8,241
+scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat,sha256=hnNV6GZazEeqTXuA9vcOUo4xam_UnKRYGYH9PUGTLv8,219
+scipy/io/matlab/tests/data/teststring_4.2c_SOL2.mat,sha256=cAhec51DlqIYfDXXGaumOE3Hqb3cFWM1UsUK3K_lDP8,375
+scipy/io/matlab/tests/data/teststring_6.1_SOL2.mat,sha256=ciFzNGMO7gjYecony-E8vtOwBY4vXIUhyug6Euaz3Kg,288
+scipy/io/matlab/tests/data/teststring_6.5.1_GLNX86.mat,sha256=yrJrpLiwLvU_LI1D6rw1Pk1qJK1YlC7Cmw7lwyJVLtw,288
+scipy/io/matlab/tests/data/teststring_7.1_GLNX86.mat,sha256=zo7sh-8dMpGqhoNxLEnfz3Oc7RonxiY5j0B3lxk0e8o,224
+scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat,sha256=igL_CvtAcNEa1nxunDjQZY5wS0rJOlzsUkBiDreJssk,224
+scipy/io/matlab/tests/data/teststringarray_4.2c_SOL2.mat,sha256=pRldk-R0ig1k3ouvaR9oVtBwZsQcDW_b4RBEDYu1-Vk,156
+scipy/io/matlab/tests/data/teststringarray_6.1_SOL2.mat,sha256=B9IdaSsyb0wxjyYyHOj_GDO0laAeWDEJhoEhC9xdm1E,232
+scipy/io/matlab/tests/data/teststringarray_6.5.1_GLNX86.mat,sha256=t4tKGJg2NEg_Ar5MkOjCoQb2hVL8Q_Jdh9FF4TPL_4g,232
+scipy/io/matlab/tests/data/teststringarray_7.1_GLNX86.mat,sha256=lpYkBZX8K-c4FO5z0P9DMfYc7Y-yzyg11J6m-19uYTU,203
+scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat,sha256=lG-c7U-5Bo8j8xZLpd0JAsMYwewT6cAw4eJCZH5xf6E,203
+scipy/io/matlab/tests/data/teststruct_6.1_SOL2.mat,sha256=3GJbA4O7LP57J6IYzmJqTPeSJrEaiNSk-rg7h0ANR1w,608
+scipy/io/matlab/tests/data/teststruct_6.5.1_GLNX86.mat,sha256=fRbqAnzTeOU3dTQx7O24MfMVFr6pM5u594FRrPPkYJE,552
+scipy/io/matlab/tests/data/teststruct_7.1_GLNX86.mat,sha256=mCtI_Yot08NazvWHvehOZbTV4bW_I4-D5jBgJ6T9EbI,314
+scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat,sha256=52qaF4HRCtPl1jE6ljbkEl2mofZVAPpmBxrm-J5OTTI,314
+scipy/io/matlab/tests/data/teststructarr_6.1_SOL2.mat,sha256=vneCpWBwApBGfeKzdZcybyajxjR-ZYf64j0l08_hU84,528
+scipy/io/matlab/tests/data/teststructarr_6.5.1_GLNX86.mat,sha256=gqhRpSfNNB5SR9sCp-wWrvokr5VV_heGnvco6dmfOvY,472
+scipy/io/matlab/tests/data/teststructarr_7.1_GLNX86.mat,sha256=6VDU0mtTBEG0bBHqKP1p8xq846eMhSZ_WvBZv8MzE7M,246
+scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat,sha256=ejtyxeeX_W1a2rNrEUUiG9txPW8_UtSgt8IaDOxE2pg,246
+scipy/io/matlab/tests/data/teststructnest_6.1_SOL2.mat,sha256=sbi0wUwOrbU-gBq3lyDwhAbvchdtOJkflOR_MU7uGKA,496
+scipy/io/matlab/tests/data/teststructnest_6.5.1_GLNX86.mat,sha256=uTkKtrYBTuz4kICVisEaG7V5C2nJDKjy92mPDswTLPE,416
+scipy/io/matlab/tests/data/teststructnest_7.1_GLNX86.mat,sha256=o4F2jOhYyNpJCo-BMg6v_ITZQvjenXfXHLq94e7iwRo,252
+scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat,sha256=CNXO12O6tedEuMG0jNma4qfbTgCswAbHwh49a3uE3Yk,252
+scipy/io/matlab/tests/data/testunicode_7.1_GLNX86.mat,sha256=KV97FCW-1XZiXrwXJoZPbgyAht79oIFHa917W1KFLwE,357
+scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat,sha256=9-8xzACZleBkMjZnbr8t4Ncs9B6mbzrONDblPnteBPU,357
+scipy/io/matlab/tests/data/testvec_4_GLNX86.mat,sha256=GQzR3mBVS266_NBfrRC9X0dLgmeu8Jl4r4ZYMOrn1V0,93
+scipy/io/matlab/tests/test_byteordercodes.py,sha256=FCHBAxeQZlhvTXw-AO-ukwTWvpN7NzmncBEDJ1P4de4,938
+scipy/io/matlab/tests/test_mio.py,sha256=jCSoZtHIe__LVPFfhia66BNzCiBQg0BBJpoL53YWJaE,47184
+scipy/io/matlab/tests/test_mio5_utils.py,sha256=eacgGg0TaQXOkG7iaeYovtWyjPgYCY50mHPoPjnHMTI,5389
+scipy/io/matlab/tests/test_mio_funcs.py,sha256=2BgaB9bSwy2M-4gUBrgKsD290UxjLmyuiI3gW4SbVyo,1390
+scipy/io/matlab/tests/test_mio_utils.py,sha256=GX85RuLqr2HxS5_f7ZgrxbhswJy2GPQQoQbiQYg0s14,1594
+scipy/io/matlab/tests/test_miobase.py,sha256=CGefrU6m_GpOwaKr_Q93Z5zKp5nuv791kjxcNNP8iiE,1460
+scipy/io/matlab/tests/test_pathological.py,sha256=-Efeq2x2yAaLK28EKpai1vh4HsZTCteF_hY_vEGWndA,1055
+scipy/io/matlab/tests/test_streams.py,sha256=R8OeacqgwexmDLRHO4eWXJjynD_4VeAdnv7vv6dOJfo,7543
+scipy/io/mmio.py,sha256=Dc5HqR8BXOD0wir63VTVczuZcLjSxEjbSbeZd4y27po,526
+scipy/io/netcdf.py,sha256=RKhmlybZwbFNKA4US6xLX6O2IUDCmdkToosPt4bAUX0,533
+scipy/io/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/io/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_fortran.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_idl.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_mmio.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_netcdf.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_paths.cpython-312.pyc,,
+scipy/io/tests/__pycache__/test_wavfile.cpython-312.pyc,,
+scipy/io/tests/data/Transparent Busy.ani,sha256=vwoK3ysYo87-TwzvjerHjFjSPIGpw83jjiMDXcHPWjA,4362
+scipy/io/tests/data/array_float32_1d.sav,sha256=A_xXWkfS1sQCxP4ONezeEZvlKEXwZ1TPG2rCCFdmBNM,2628
+scipy/io/tests/data/array_float32_2d.sav,sha256=qJmN94pywXznXMHzt-L6DJgaIq_FfruVKJl_LMaI8UU,3192
+scipy/io/tests/data/array_float32_3d.sav,sha256=U7P6As7Nw6LdBY1pTOaW9C-O_NlXLXZwSgbT3H8Z8uk,13752
+scipy/io/tests/data/array_float32_4d.sav,sha256=Tl6erEw_Zq3dwVbVyPXRWqB83u_o4wkIVFOe3wQrSro,6616
+scipy/io/tests/data/array_float32_5d.sav,sha256=VmaBgCD854swYyLouDMHJf4LL6iUNgajEOQf0pUjHjg,7896
+scipy/io/tests/data/array_float32_6d.sav,sha256=lb7modI0OQDweJWbDxEV2OddffKgMgq1tvCy5EK6sOU,19416
+scipy/io/tests/data/array_float32_7d.sav,sha256=pqLWIoxev9sLCs9LLwxFlM4RCFwxHC4Q0dEEz578mpI,3288
+scipy/io/tests/data/array_float32_8d.sav,sha256=R8A004f9XLWvF6eKMNEqIrC6PGP1vLZr9sFqawqM8ZA,13656
+scipy/io/tests/data/array_float32_pointer_1d.sav,sha256=sV7qFNwHK-prG5vODa7m5HYK7HlH_lqdfsI5Y1RWDyg,2692
+scipy/io/tests/data/array_float32_pointer_2d.sav,sha256=b0brvK6xQeezoRuujmEcJNw2v6bfASLM3FSY9u5dMSg,3256
+scipy/io/tests/data/array_float32_pointer_3d.sav,sha256=a_Iyg1YjPBRh6B-N_n_BGIVjFje4K-EPibKV-bPbF7E,13816
+scipy/io/tests/data/array_float32_pointer_4d.sav,sha256=cXrkHHlPyoYstDL_OJ15-55sZOOeDNW2OJ3KWhBv-Kk,6680
+scipy/io/tests/data/array_float32_pointer_5d.sav,sha256=gRVAZ6jeqFZyIQI9JVBHed9Y0sjS-W4bLseb01rIcGs,7960
+scipy/io/tests/data/array_float32_pointer_6d.sav,sha256=9yic-CQiS0YR_ow2yUA2Nix0Nb_YCKMUsIgPhgcJT1c,19480
+scipy/io/tests/data/array_float32_pointer_7d.sav,sha256=Rp1s8RbW8eoEIRTqxba4opAyY0uhTuyy3YkwRlNspQU,3352
+scipy/io/tests/data/array_float32_pointer_8d.sav,sha256=Wk3Dd2ClAwWprXLKZon3blY7aMvMrJqz_NXzK0J5MFY,13720
+scipy/io/tests/data/example_1.nc,sha256=EkfC57dWXeljgXy5sidrJHJG12D1gmQUyPDK18WzlT4,1736
+scipy/io/tests/data/example_2.nc,sha256=wywMDspJ2QT431_sJUr_5DHqG3pt9VTvDJzfR9jeWCk,272
+scipy/io/tests/data/example_3_maskedvals.nc,sha256=P9N92jCJgKJo9VmNd7FeeJSvl4yUUFwBy6JpR4MeuME,1424
+scipy/io/tests/data/fortran-3x3d-2i.dat,sha256=oYCXgtY6qqIqLAhoh_46ob_RVQRcV4uu333pOiLKgRM,451
+scipy/io/tests/data/fortran-mixed.dat,sha256=zTi7RLEnyAat_DdC3iSEcSbyDtAu0aTKwUT-tExjasw,40
+scipy/io/tests/data/fortran-sf8-11x1x10.dat,sha256=KwaOrZOAe-wRhuxvmHIK-Wr59us40MmiA9QyWtIAUaA,888
+scipy/io/tests/data/fortran-sf8-15x10x22.dat,sha256=5ohvjjOUcIsGimSqDhpUUKwflyhVsfwKL5ElQe_SU0I,26408
+scipy/io/tests/data/fortran-sf8-1x1x1.dat,sha256=Djmoip8zn-UcxWGUPKV5wzKOYOf7pbU5L7HaR3BYlec,16
+scipy/io/tests/data/fortran-sf8-1x1x5.dat,sha256=Btgavm3w3c9md_5yFfq6Veo_5IK9KtlLF1JEPeHhZoU,48
+scipy/io/tests/data/fortran-sf8-1x1x7.dat,sha256=L0r9yAEMbfMwYQytzYsS45COqaVk-o_hi6zRY3yIiO4,64
+scipy/io/tests/data/fortran-sf8-1x3x5.dat,sha256=c2LTocHclwTIeaR1Pm3mVMyf5Pl_imfjIFwi4Lpv0Xs,128
+scipy/io/tests/data/fortran-si4-11x1x10.dat,sha256=OesvSIGsZjpKZlZsV74PNwy0Co0KH8-3gxL9-DWoa08,448
+scipy/io/tests/data/fortran-si4-15x10x22.dat,sha256=OJcKyw-GZmhHb8REXMsHDn7W5VP5bhmxgVPIAYG-Fj4,13208
+scipy/io/tests/data/fortran-si4-1x1x1.dat,sha256=1Lbx01wZPCOJHwg99MBDuc6QZKdMnccxNgICt4omfFM,12
+scipy/io/tests/data/fortran-si4-1x1x5.dat,sha256=L1St4yiHTA3v91JjnndYfUrdKfT1bWxckwnnrscEZXc,28
+scipy/io/tests/data/fortran-si4-1x1x7.dat,sha256=Dmqt-tD1v2DiPZkghGGZ9Ss-nJGfei-3yFXPO5Acpk4,36
+scipy/io/tests/data/fortran-si4-1x3x5.dat,sha256=3vl6q93m25jEcZVKD0CuKNHmhZwZKp-rv0tfHoPVP88,68
+scipy/io/tests/data/invalid_pointer.sav,sha256=JmgoISXC4r5fSmI5FqyapvmzQ4qpYLf-9N7_Et1p1HQ,1280
+scipy/io/tests/data/null_pointer.sav,sha256=P_3a_sU614F3InwM82jSMtWycSZkvqRn1apwd8XxbtE,2180
+scipy/io/tests/data/scalar_byte.sav,sha256=dNJbcE5OVDY_wHwN_UBUtfIRd13Oqu-RBEO74g5SsBA,2076
+scipy/io/tests/data/scalar_byte_descr.sav,sha256=DNTmDgDWOuzlQnrceER6YJ0NutUUwZ9tozVMBWQmuuY,2124
+scipy/io/tests/data/scalar_complex32.sav,sha256=NGd-EvmFZgt8Ko5MP3T_TLwyby6yS0BXM_OW8197hpU,2076
+scipy/io/tests/data/scalar_complex64.sav,sha256=gFBWtxuAajazupGFSbvlWUPDYK-JdWgZcEWih2-7IYU,2084
+scipy/io/tests/data/scalar_float32.sav,sha256=EwWQw2JTwq99CHVpDAh4R20R0jWaynXABaE2aTRmXrs,2072
+scipy/io/tests/data/scalar_float64.sav,sha256=iPcDlgF1t0HoabvNLWCbSiTPIa9rvVEbOGGmE_3Ilsk,2076
+scipy/io/tests/data/scalar_heap_pointer.sav,sha256=JXZbPmntXILsNOuLIKL8qdu8gDJekYrlN9DQxAWve0E,2204
+scipy/io/tests/data/scalar_int16.sav,sha256=kDBLbPYGo2pzmZDhyl8rlDv0l6TMEWLIoLtmgJXDMkk,2072
+scipy/io/tests/data/scalar_int32.sav,sha256=IzJwLvEoqWLO5JRaHp8qChfptlauU-ll3rb0TfDDM8Y,2072
+scipy/io/tests/data/scalar_int64.sav,sha256=-aSHQRiaE3wjAxINwuLX33_8qmWl4GUkTH45elTkA-8,2076
+scipy/io/tests/data/scalar_string.sav,sha256=AQ7iZ8dKk9QfnLdP9idKv1ojz0M_SwpL7XAUmbHodDQ,2124
+scipy/io/tests/data/scalar_uint16.sav,sha256=928fmxLsQM83ue4eUS3IEnsLSEzmHBklDA59JAUvGK8,2072
+scipy/io/tests/data/scalar_uint32.sav,sha256=X3RbPhS6_e-u-1S1gMyF7s9ys7oV6ZNwPrJqJ6zIJsk,2072
+scipy/io/tests/data/scalar_uint64.sav,sha256=ffVyS2oKn9PDtWjJdOjSRT2KZzy6Mscgd4u540MPHC4,2076
+scipy/io/tests/data/struct_arrays.sav,sha256=TzH-Gf0JgbP_OgeKYbV8ZbJXvWt1VetdUr6C_ziUlzg,2580
+scipy/io/tests/data/struct_arrays_byte_idl80.sav,sha256=oOmhTnmKlE60-JMJRRMv_zfFs4zqioMN8QA0ldlgQZo,1388
+scipy/io/tests/data/struct_arrays_replicated.sav,sha256=kXU8j9QI2Q8D22DVboH9fwwDQSLVvuWMJl3iIOhUAH8,2936
+scipy/io/tests/data/struct_arrays_replicated_3d.sav,sha256=s3ZUwhT6TfiVfk4AGBSyxYR4FRzo4sZQkTxFCJbIQMI,4608
+scipy/io/tests/data/struct_inherit.sav,sha256=4YajBZcIjqMQ4CI0lRUjXpYDY3rI5vzJJzOYpjWqOJk,2404
+scipy/io/tests/data/struct_pointer_arrays.sav,sha256=fkldO6-RO2uAN_AI9hM6SEaBPrBf8TfiodFGJpViaqg,2408
+scipy/io/tests/data/struct_pointer_arrays_replicated.sav,sha256=eKVerR0LoD9CuNlpwoBcn7BIdj3-8x56VNg--Qn7Hgc,2492
+scipy/io/tests/data/struct_pointer_arrays_replicated_3d.sav,sha256=vsqhGpn3YkZEYjQuI-GoX8Jg5Dv8A2uRtP0kzQkq4lg,2872
+scipy/io/tests/data/struct_pointers.sav,sha256=Zq6d5V9ZijpocxJpimrdFTQG827GADBkMB_-6AweDYI,2268
+scipy/io/tests/data/struct_pointers_replicated.sav,sha256=aIXPBIXTfPmd4IaLpYD5W_HUoIOdL5Y3Hj7WOeRM2sA,2304
+scipy/io/tests/data/struct_pointers_replicated_3d.sav,sha256=t1jhVXmhW6VotQMNZ0fv0sDO2pkN4EutGsx5No4VJQs,2456
+scipy/io/tests/data/struct_scalars.sav,sha256=LYICjERzGJ_VvYgtwJ_Up2svQTv8wBzNcVD3nsd_OPg,2316
+scipy/io/tests/data/struct_scalars_replicated.sav,sha256=lw3fC4kppi6BUWAd4n81h8_KgoUdiJl5UIt3CvJIuBs,2480
+scipy/io/tests/data/struct_scalars_replicated_3d.sav,sha256=xVAup6f1dSV_IsSwBQC3KVs0eLEZ6-o5EaZT9yUoDZI,3240
+scipy/io/tests/data/test-1234Hz-le-1ch-10S-20bit-extra.wav,sha256=h8CXsW5_ShKR197t_d-TUTlgDqOZ-7wK_EcVGucR-aY,74
+scipy/io/tests/data/test-44100Hz-2ch-32bit-float-be.wav,sha256=gjv__ng9xH_sm34hyxCbCgO4AP--PZAfDOArH5omkjM,3586
+scipy/io/tests/data/test-44100Hz-2ch-32bit-float-le.wav,sha256=H0LLyv2lc2guzYGnx4DWXU6vB57JrRX-G9Dd4qGh0hM,3586
+scipy/io/tests/data/test-44100Hz-be-1ch-4bytes.wav,sha256=KKz9SXv_R3gX_AVeED2vyhYnj4BvD1uyDiKpCT3ulZ0,17720
+scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-early-eof-no-data.wav,sha256=YX1g8qdCOAG16vX9G6q4SsfCj2ZVk199jzDQ8S0zWYI,72
+scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-early-eof.wav,sha256=bFrsRqw0QXmsaDtjD6TFP8hZ5jEYMyaCmt-ka_C6GNk,1024
+scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-incomplete-chunk.wav,sha256=zMnhvZvrP4kyOWKVKfbBneyv03xvzgqXYhHNxsAxDJ4,13
+scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-rf64.wav,sha256=GSJpCuezlvHbhP3Cr4jNWmz4zG46XZ6jci2fWtiMN0k,17756
+scipy/io/tests/data/test-44100Hz-le-1ch-4bytes.wav,sha256=9qTCvpgdz3raecVN1ViggHPnQjBf47xmXod9iCDsEik,17720
+scipy/io/tests/data/test-48000Hz-2ch-64bit-float-le-wavex.wav,sha256=EqYBnEgTxTKvaTAtdA5HIl47CCFIje93y4hawR6Pyu0,7792
+scipy/io/tests/data/test-8000Hz-be-3ch-5S-24bit.wav,sha256=hGYchxQFjrtvZCBo0ULi-xdZ8krqXcKdTl3NSUfqe8k,90
+scipy/io/tests/data/test-8000Hz-le-1ch-1byte-ulaw.wav,sha256=BoUCDct3GiY_JJV_HoghF3mzAebT18j02c-MOn19KxU,70
+scipy/io/tests/data/test-8000Hz-le-2ch-1byteu.wav,sha256=R6EJshvQp5YVR4GB9u4Khn5HM1VMfJUj082i8tkBIJ8,1644
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit-inconsistent.wav,sha256=t2Mgri3h6JLQDekrwIhDBOaG46OUzHynUz0pKbvOpNU,90
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit-rf64.wav,sha256=iSGyqouX53NaEB33tzKXa11NRIY97GG40_pqWF_k5LQ,126
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit.wav,sha256=yCv0uh-ux_skJsxeOjzog0YBk3ZQO_kw5HJHMqtVyI0,90
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-36bit.wav,sha256=oiMVsQV9-qGBz_ZwsfAkgA9BZXNjXbH4zxCGvvdT0RY,120
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-45bit.wav,sha256=e97XoPrPGJDIh8nO6mii__ViY5yVlmt4OnPQoDN1djs,134
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-53bit.wav,sha256=wbonKlzvzQ_bQYyBsj-GwnihZOhn0uxfKhL_nENCGNc,150
+scipy/io/tests/data/test-8000Hz-le-3ch-5S-64bit.wav,sha256=Uu5QPQcbtnFlnxOd4zFGxpiTC4wgdp6JOoYJ2VMZIU0,164
+scipy/io/tests/data/test-8000Hz-le-4ch-9S-12bit.wav,sha256=1F67h8tr2xz0C5K21T9y9gspcGA0qnSOzsl2vjArAMs,116
+scipy/io/tests/data/test-8000Hz-le-5ch-9S-5bit.wav,sha256=TJvGU7GpgXdCrdrjzMlDtpieDMnDK-lWMMqlWjT23BY,89
+scipy/io/tests/data/various_compressed.sav,sha256=H-7pc-RCQx5y6_IbHk1hB6OfnhvuPyW6EJq4EwI9iMc,1015
+scipy/io/tests/test_fortran.py,sha256=xpwrE71XkNWFhwNR6Bwvi9YXTZsCkAxArG5xQDRsBTo,11363
+scipy/io/tests/test_idl.py,sha256=WpLmp16ewO47m6od8oTtMKvVPasHuCoEwXqQJ0aBW7k,20531
+scipy/io/tests/test_mmio.py,sha256=6UwDD2Cb9AgZYWgsE0ttXaIEJUinWs5WYmDleIlp9ww,29188
+scipy/io/tests/test_netcdf.py,sha256=GgeIeBJNHfOTxGHAG-QSfHBzTgwpcvdKfRk_teaWrFM,19557
+scipy/io/tests/test_paths.py,sha256=3f12UO-N11JJjkw8jBgVAhz5KVrkokJbHrnvfklDhNA,3190
+scipy/io/tests/test_wavfile.py,sha256=Gy2si0t3bm74fAI4BWNI40oamULqByj2Ts6U_uJKqng,19094
+scipy/io/wavfile.py,sha256=sBoggGo4lHeKoFxmEIX3PrQCwuVo7CoWtGWrWkMS6GM,30691
+scipy/linalg/__init__.pxd,sha256=0MlO-o_Kr8gg--_ipXEHFGtB8pZdHX8VX4wLYe_UzPg,53
+scipy/linalg/__init__.py,sha256=iEBmLSZ-jQZQMSVgjGMz5fUAU3UPHiwnO2PlpsC3nBw,7426
+scipy/linalg/__pycache__/__init__.cpython-312.pyc,,
+scipy/linalg/__pycache__/_basic.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_cholesky.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_cossin.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_ldl.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_lu.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_polar.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_qr.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_qz.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_schur.cpython-312.pyc,,
+scipy/linalg/__pycache__/_decomp_svd.cpython-312.pyc,,
+scipy/linalg/__pycache__/_expm_frechet.cpython-312.pyc,,
+scipy/linalg/__pycache__/_matfuncs.cpython-312.pyc,,
+scipy/linalg/__pycache__/_matfuncs_inv_ssq.cpython-312.pyc,,
+scipy/linalg/__pycache__/_matfuncs_sqrtm.cpython-312.pyc,,
+scipy/linalg/__pycache__/_misc.cpython-312.pyc,,
+scipy/linalg/__pycache__/_procrustes.cpython-312.pyc,,
+scipy/linalg/__pycache__/_sketches.cpython-312.pyc,,
+scipy/linalg/__pycache__/_solvers.cpython-312.pyc,,
+scipy/linalg/__pycache__/_special_matrices.cpython-312.pyc,,
+scipy/linalg/__pycache__/_testutils.cpython-312.pyc,,
+scipy/linalg/__pycache__/basic.cpython-312.pyc,,
+scipy/linalg/__pycache__/blas.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp_cholesky.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp_lu.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp_qr.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp_schur.cpython-312.pyc,,
+scipy/linalg/__pycache__/decomp_svd.cpython-312.pyc,,
+scipy/linalg/__pycache__/interpolative.cpython-312.pyc,,
+scipy/linalg/__pycache__/lapack.cpython-312.pyc,,
+scipy/linalg/__pycache__/matfuncs.cpython-312.pyc,,
+scipy/linalg/__pycache__/misc.cpython-312.pyc,,
+scipy/linalg/__pycache__/special_matrices.cpython-312.pyc,,
+scipy/linalg/_basic.py,sha256=gsLUOREyZ2Sy0VVlQJ-4F0qBuDLpajgJUVQtqdURIgw,88414
+scipy/linalg/_batched_linalg.cpython-312-darwin.so,sha256=WaAFYOPStegsmwVMgclJZq_gvwrlXssHULmGl-lAzfo,129672
+scipy/linalg/_blas_subroutines.h,sha256=B2Y9A7ejwt3PHSLLS5mX2VhF6jwP3XgKMmt53O3cowg,18174
+scipy/linalg/_cythonized_array_utils.cpython-312-darwin.so,sha256=XS_zSSmwHnG190hZUZx0SvkmerevHrYAZm8c9iZ-c1w,277776
+scipy/linalg/_cythonized_array_utils.pxd,sha256=OlWTbJt3gmdrfRFyx_Vz7GTmDTjr8dids5HA4TfC6R0,890
+scipy/linalg/_cythonized_array_utils.pyi,sha256=HZWXvJdpXGcydTEjkaL_kXIcxpcMqBBfFz7ZhscsRNo,340
+scipy/linalg/_decomp.py,sha256=PD0WiKh7YGdXMG617YHI5F4LbShnkgMdT_qotWp3M2E,62717
+scipy/linalg/_decomp_cholesky.py,sha256=_6nFa234U9YzppafGmUBfpPByu-f8x_gGDuMJ3H7YN0,14846
+scipy/linalg/_decomp_cossin.py,sha256=SP7prnWk9eqL4q2bXiBgHILa-21SDaJNCCk_hIw9Xcc,9605
+scipy/linalg/_decomp_interpolative.cpython-312-darwin.so,sha256=7h3X4jbrM7ZuN4UAbvcOndcgssiSvYOsDk6waxr8moU,550856
+scipy/linalg/_decomp_ldl.py,sha256=d5w6AAyDwxNwvV8EZOs144ZGUdF8II77NphA_f2k8Nc,12612
+scipy/linalg/_decomp_lu.py,sha256=ZsK-rPPluRtdAjlmWwLFH2Xo6CHkOQ5hGHsYLpXlQSM,13498
+scipy/linalg/_decomp_lu_cython.cpython-312-darwin.so,sha256=foEMAlnsghwWHIyGkMTGCbS7HFcmLGyeTP6bF-bz-SQ,113560
+scipy/linalg/_decomp_lu_cython.pyi,sha256=IAaDvMbX0WTWyOuKd1mWJqXq1bKusxj56HE1Npl_sCY,346
+scipy/linalg/_decomp_polar.py,sha256=RRNkQ7Vk6tEtvA6f1wTkP1t-FXQ_COU9lXguzbNpaK0,3654
+scipy/linalg/_decomp_qr.py,sha256=xD7J3UqwN3a9gyF9l_Za9t0ErP_1kmEA8gFiTK8Mofk,15506
+scipy/linalg/_decomp_qz.py,sha256=Yh7DffwloPn3c9Q3NPzVxfmMGd8f9vPL4UogYE_zxqk,16456
+scipy/linalg/_decomp_schur.py,sha256=h5eEIhz_KDorht-T_U8tBmtu6sP4S9mYi8IlQCjFCRk,12172
+scipy/linalg/_decomp_svd.py,sha256=gd6OX3KlZfXuMUOxtEUMjpIKOOByAdOXEP0Jp8OHAo8,17139
+scipy/linalg/_decomp_update.cpython-312-darwin.so,sha256=3wr_NGVFXDMZ1SrewWjqo_Clnem8UMFsQ6mWuCLKFSQ,233208
+scipy/linalg/_expm_frechet.py,sha256=_RvX6m1ntUhLlbeTUrbvv48a80UW4kCM4gFBBedxx58,12442
+scipy/linalg/_fblas.cpython-312-darwin.so,sha256=aLmSMPgw1Aca_HPHaXEIrRhAXgqDhP_HbQyu29TEKjs,553648
+scipy/linalg/_flapack.cpython-312-darwin.so,sha256=VEbdzfgXC2VsNn8iDAwHkRwqnMsva22Z_J8d1Byo3R8,1871104
+scipy/linalg/_lapack_subroutines.h,sha256=oTfgwlGeOWm1A9EL1ybTxS5cURQbHXnI3wQMuUr3fH0,239326
+scipy/linalg/_linalg_pythran.cpython-312-darwin.so,sha256=TkziI6zWtqSxa_9UaMk-j3RuomvKFFK4vZFjgLwn-Sk,144152
+scipy/linalg/_matfuncs.py,sha256=kA-I6LQJAPa398CBQrKRl5IQGQevkaYupuQAt-0B5Cs,32302
+scipy/linalg/_matfuncs_expm.cpython-312-darwin.so,sha256=9CnohzauNJTosDQkBbFEagrd0qFUX1KLhISwmi_MaGE,105304
+scipy/linalg/_matfuncs_expm.pyi,sha256=wZAZfVtEbB78ljXgQoiL0I4yaPhmHOqIpGBYGQPvS6k,178
+scipy/linalg/_matfuncs_inv_ssq.py,sha256=8dL7xD6DU8D4h2YyHcYjRhZQvv1pSOEzMuKlGP6zonw,28095
+scipy/linalg/_matfuncs_schur_sqrtm.cpython-312-darwin.so,sha256=-X6jlLAV-bRlJ811pi9G0ekvq-Ec16mgV6IQ32dCQaQ,70216
+scipy/linalg/_matfuncs_sqrtm.py,sha256=p7iyvXyiSXXRi2AKRK0EstG4FQi34uS4KCc0VKoYnPE,3423
+scipy/linalg/_matfuncs_sqrtm_triu.cpython-312-darwin.so,sha256=a8s8ABfM5rdGotlcKPW9vM-U5Ufqr-QU_RWJYBE8xhI,98536
+scipy/linalg/_misc.py,sha256=udhvxGfEHxhS3ecQBuwQ65W9ezVQIaVBw8JOmfqH_oE,6301
+scipy/linalg/_procrustes.py,sha256=gipMvbQdlKU8HBAExamtJqFRyUtufO63hYPdi9Jwryc,3859
+scipy/linalg/_sketches.py,sha256=Ypwy2sttOoEIQRxAinpd8BGnGg5O8v2E-npMBLuK36I,7140
+scipy/linalg/_solve_toeplitz.cpython-312-darwin.so,sha256=0Ljsc4fVA_KPuR6dv4cDErKfmb2SgXXjzih8ahzOeik,115256
+scipy/linalg/_solvers.py,sha256=hhDUzv2taY3a52L8HkVbMsZ2ab5akqhiyhf7uUHi_cA,30154
+scipy/linalg/_special_matrices.py,sha256=9LrN_uk_Pmzadfx5QeohMeZGNupd9P3iyuGpA0iH5Gw,41201
+scipy/linalg/_testutils.py,sha256=IWA5vvdZ8yaHeXo2IxpQLqG9q54YIomHscYs85q9pd0,1807
+scipy/linalg/basic.py,sha256=AuNvDlH8mnAJScycj4mV-Iq1M0bXxidpY4Vud_lRJlM,753
+scipy/linalg/blas.py,sha256=MHaf2FuLbJggeFSwFpJtM_uaI0M8AFe9NQvCPww_8F8,11833
+scipy/linalg/cython_blas.cpython-312-darwin.so,sha256=EPKZuXO8cAfyItS-fCn1BhjQkuo9j4Db4Ove7PKtZjE,131520
+scipy/linalg/cython_blas.pxd,sha256=DCPBxNWP-BvdT_REj6_a4TjUrNaf6sCq_XoxU3pEbfc,15592
+scipy/linalg/cython_blas.pyx,sha256=OgjBmmw5YP51aWtU-1pFgWWH29XWcnFWwcZP3_1sELk,65288
+scipy/linalg/cython_lapack.cpython-312-darwin.so,sha256=a7Xwq1TE3V27OoorkuZ5OetpXPLCpeC1_2rNw7UssM0,373056
+scipy/linalg/cython_lapack.pxd,sha256=Ld5hPwcYxpOPahFNsfNomsp0_DY8BfG-W8TmZxh-iYM,204556
+scipy/linalg/cython_lapack.pyx,sha256=fDKWgTGV8swZzyxFvtHkeaQaVWzrze0t5lHYGu0GKgk,707005
+scipy/linalg/decomp.py,sha256=w9HTI1OxXpX_rL72qcmykc5dUWal7lTlAU8k-9Eq7Dg,708
+scipy/linalg/decomp_cholesky.py,sha256=1g45oc115ZZR3CfMW1bCPseF5ATz4Xf6Ih26NRqyjfs,649
+scipy/linalg/decomp_lu.py,sha256=FPo9NHe9wg1FhCaoVV1_4mdfNj0S4plT4dHr4vMl1U8,593
+scipy/linalg/decomp_qr.py,sha256=EJNpu6lSa36Eo-e4rbYu5kDlRTMse2mmGul_PLRFXHs,567
+scipy/linalg/decomp_schur.py,sha256=vkVK3y-055523Q__ptxVNatDebPBE1HD-DFBe7kEh3w,602
+scipy/linalg/decomp_svd.py,sha256=HrJqbmgde7d7EWxCsa9XkS9QuWgPYMFOHiF4NcAL_Qg,631
+scipy/linalg/interpolative.py,sha256=iukUVTQJL-Oep9j4B-5hhpdR9u_xjli9R4QFJwU3lRg,31169
+scipy/linalg/lapack.py,sha256=MFiuCD8ZVcYqUC1vz48Ep5LGmxtjSwYp9KFN-MYmJXQ,17505
+scipy/linalg/matfuncs.py,sha256=vYw39D2LukCRCFJpx0qx8tgHlRZEDZI2wZfZwhh-Ubo,744
+scipy/linalg/misc.py,sha256=uxpR80jJ5w5mslplWlL6tIathas8mEXvRIwDXYMcTOk,592
+scipy/linalg/special_matrices.py,sha256=FGEXV_qOxy6ZrAsKUwHiDlaSRsvYFaUgkMN1YSEetCo,749
+scipy/linalg/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/linalg/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_basic.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_batch.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_blas.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_cython_blas.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_cython_lapack.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_cythonized_array_utils.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_cholesky.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_cossin.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_ldl.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_lu.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_polar.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_decomp_update.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_extending.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_fblas.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_interpolative.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_lapack.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_matfuncs.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_matmul_toeplitz.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_procrustes.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_sketches.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_solve_toeplitz.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_solvers.cpython-312.pyc,,
+scipy/linalg/tests/__pycache__/test_special_matrices.cpython-312.pyc,,
+scipy/linalg/tests/_cython_examples/extending.pyx,sha256=scunPSonBTtsidhd2hLtg-DPWoFkvzWcXDMYEO9iygo,887
+scipy/linalg/tests/_cython_examples/meson.build,sha256=DzG1UVjBrYOrtvgnaOVL0amQulrI8HTyYgryw2AhiKI,846
+scipy/linalg/tests/data/carex_15_data.npz,sha256=E_PhSRqHa79Z1-oQrSnB-bWZaiq5khbzHVv81lkBLB4,34462
+scipy/linalg/tests/data/carex_18_data.npz,sha256=Wfg5Rn8nUrffb7bUCUOW7dMqWSm3ZPf_oeZmZDHmysY,161487
+scipy/linalg/tests/data/carex_19_data.npz,sha256=OOj8ewQd8LI9flyhXq0aBl5kZ2Ee-ahIzH25P4Ct_Yc,34050
+scipy/linalg/tests/data/carex_20_data.npz,sha256=FOIi00pxGMcoShZ1xv7O7ne4TflRpca6Kl7p_zBU-h0,31231
+scipy/linalg/tests/data/carex_6_data.npz,sha256=GyoHNrVB6_XEubTADW2rKB5zyfuZE8biWBp4Gze2Avk,15878
+scipy/linalg/tests/data/gendare_20170120_data.npz,sha256=o9-rRR2dXCAkPg7YXNi2yWV2afuaD4O1vhZVhXg9VbU,2164
+scipy/linalg/tests/test_basic.py,sha256=T_iDjnMI0vaL6Ce20ElLRplNlxpiBazvgd-o91LFePM,105431
+scipy/linalg/tests/test_batch.py,sha256=NwVV_SWeI1xX4SnHIFbWA1ty5ke28Ux9zy3QYHPtHHk,28874
+scipy/linalg/tests/test_blas.py,sha256=DvEaxyr4IXdiwKgQEAA5QLhhJ39bc3t7okSa1meWhpo,37595
+scipy/linalg/tests/test_cython_blas.py,sha256=0Y2w1Btw6iatfodZE7z0lisJJLVCr70DAW-62he_sz4,4087
+scipy/linalg/tests/test_cython_lapack.py,sha256=McSFDUU4kgCavU1u3-uqBGlzUZiLGxM5qPfBFgPTqdE,796
+scipy/linalg/tests/test_cythonized_array_utils.py,sha256=MDa9kj1M6pCikyxsVnLmZO23zejqvH1liopf7guSRAs,4203
+scipy/linalg/tests/test_decomp.py,sha256=5dC4daV6siYJ-F8jAUEGO8KN0AaAnlZQpK_rO2rl-rw,120430
+scipy/linalg/tests/test_decomp_cholesky.py,sha256=5WxQbSxK6134NztaoNu-d4OmudQRfhgeyf2LmyJdx1w,9743
+scipy/linalg/tests/test_decomp_cossin.py,sha256=b10EQSJzYwGwgEHj_s71tDPr59e3lZmid7M8G9qgv3A,12560
+scipy/linalg/tests/test_decomp_ldl.py,sha256=n9ETZLP6IRVaVt0c5u8aZF-sPpAMTD2EQ4W-za9SNdM,5034
+scipy/linalg/tests/test_decomp_lu.py,sha256=spCYelU_CXmHAaKrJM4V5djLKq5MCeX4wN1SBCFkSOo,12629
+scipy/linalg/tests/test_decomp_polar.py,sha256=fGKl3Skqz6IpHBeFcq6bdqvS8M53rXx2Wh6Kx4f5T3Y,3287
+scipy/linalg/tests/test_decomp_update.py,sha256=Q1L6MAOXIBMuI0wCO-w1bHsqTod8FSydIUmC5RqlTz0,68424
+scipy/linalg/tests/test_extending.py,sha256=sKc6YdWOcCMiiJZ8g2-DkvSaLWqXLOvFhqco2W85M30,1823
+scipy/linalg/tests/test_fblas.py,sha256=oMPWfEZfh-MFZtKLGFNGm0wmdUZkkNvtH7x_GwbSY7I,18664
+scipy/linalg/tests/test_interpolative.py,sha256=8_OQau0olSNQWi6RUasHgHasQvvvaMjJ7JUl0jh1Lqw,8616
+scipy/linalg/tests/test_lapack.py,sha256=AqhrOz_Ki6z_idcmduBluDzK4dY1sCCqmvNyzM8zg9A,138869
+scipy/linalg/tests/test_matfuncs.py,sha256=l1gemWpPGkKIn7jbREUYttT5F4Z4IRaIoUUjQrsEeds,43916
+scipy/linalg/tests/test_matmul_toeplitz.py,sha256=73Qe51lCXEWZGpxk8GYv0owDSlN0IpnLJPlI0nsCdhY,4088
+scipy/linalg/tests/test_procrustes.py,sha256=EW3XeVvPK0uiYEmjuHh8LmwZKhgSaEO7DWhAsH7gnwM,9058
+scipy/linalg/tests/test_sketches.py,sha256=jNVAdrDA_X6Dk9oKg0W92s4euHyfhQPgIHNsAYzEMWs,4010
+scipy/linalg/tests/test_solve_toeplitz.py,sha256=UpF5Cem6wYj8Iiu2ooFTkDI9Ozuofa5dx2J6KOsciCw,4579
+scipy/linalg/tests/test_solvers.py,sha256=8kSm_WOhyniaL3NWmdKS-tTd9K0IBdD1iynAjrR8h4k,34598
+scipy/linalg/tests/test_special_matrices.py,sha256=HVMoXFrJAZQn5sg7pVOaeRW5Nc3-tyNY7ZLEKzWTK3U,24843
+scipy/misc/__init__.py,sha256=dVfULY959nFwpl5NCxyCpiHyNcSNaR7HYOg7QU21a5s,135
+scipy/misc/__pycache__/__init__.cpython-312.pyc,,
+scipy/misc/__pycache__/common.cpython-312.pyc,,
+scipy/misc/__pycache__/doccer.cpython-312.pyc,,
+scipy/misc/common.py,sha256=nAGQOVR9ZEAb703uhOVQZqf-z0iCM4EDhbHK4_h_Tdc,142
+scipy/misc/doccer.py,sha256=wHbpGV8todadz6MIzJHalDfRjiKI164qs6iMcHgsVu0,142
+scipy/ndimage/__init__.py,sha256=KUbDfnLPN7B-U650Nh-XVf7fQ0bW8vkEDPssG8oZsi4,5175
+scipy/ndimage/__pycache__/__init__.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_delegators.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_filters.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_fourier.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_interpolation.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_measurements.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_morphology.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_ndimage_api.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_ni_docstrings.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_ni_support.cpython-312.pyc,,
+scipy/ndimage/__pycache__/_support_alternative_backends.cpython-312.pyc,,
+scipy/ndimage/__pycache__/filters.cpython-312.pyc,,
+scipy/ndimage/__pycache__/fourier.cpython-312.pyc,,
+scipy/ndimage/__pycache__/interpolation.cpython-312.pyc,,
+scipy/ndimage/__pycache__/measurements.cpython-312.pyc,,
+scipy/ndimage/__pycache__/morphology.cpython-312.pyc,,
+scipy/ndimage/_ctest.cpython-312-darwin.so,sha256=KNeRKOSlIp7noEfVkRZ5pU90H9xhjbp8nKTNBk0TvpY,51120
+scipy/ndimage/_cytest.cpython-312-darwin.so,sha256=7Sc8Ysnw_3MKTlWri8Ns88VYwTB75XHwGNgav5i3f0g,96352
+scipy/ndimage/_delegators.py,sha256=EI2Xsmw6GDL8MnLeQYZ6uK9dVkMv01WOd1fZTLS_BrU,9410
+scipy/ndimage/_filters.py,sha256=OuVuvfxY7ibLGzR3qiEcE7V_6Sqz69AE3amxOPExu4s,92349
+scipy/ndimage/_fourier.py,sha256=SoAYRx7ax7Tv51MyYzDlZ3fN682x4T6N8yReX2La4-I,11266
+scipy/ndimage/_interpolation.py,sha256=KKQMixU4VgfEprLNPUeLWNvzfBBJ_nhr9bnJYT3o7Nc,37740
+scipy/ndimage/_measurements.py,sha256=vg9pVW8Onbc-oKmNN2ARf50ffiAz-DTMofcfs46TcoI,56249
+scipy/ndimage/_morphology.py,sha256=9QydGKTTLZ5IlNA4E3lOGE789hRcR0WNEAJMU7sXLkQ,100970
+scipy/ndimage/_nd_image.cpython-312-darwin.so,sha256=NfyyRzsongf-xnhqFvdDIngpxce30iPCpGqSTCoMs3E,156160
+scipy/ndimage/_ndimage_api.py,sha256=S8DBRWydSRfAz-ZlHSMeCSbjYGgCLioa9_Q2VXGeC_g,586
+scipy/ndimage/_ni_docstrings.py,sha256=EhrW-Q_R2fO9pDXYhc8xKS1QY5nXFxQtEXd2aLWG5GM,8727
+scipy/ndimage/_ni_label.cpython-312-darwin.so,sha256=a-u1qzNnDg8ABeHwWON9FWhJpGEDv03WpUU0fkTbuMQ,188400
+scipy/ndimage/_ni_support.py,sha256=1JpV6XSyvMP6-rqKHHEBrc83RaVkDzynBHlO672sczY,5216
+scipy/ndimage/_rank_filter_1d.cpython-312-darwin.so,sha256=dMuM-y6TpsxeC9EmKX7vz0FAtk7DR9RYF3mYyQ-rwDM,52536
+scipy/ndimage/_support_alternative_backends.py,sha256=-ox6hzUSsNkAAzAitL4ze-XBKmzg_pcXO2zFF_eomoQ,4145
+scipy/ndimage/filters.py,sha256=cAv2zezrTJEm9JzKPV_pmXzZcgczCK_VaYJ4mdNW3FM,976
+scipy/ndimage/fourier.py,sha256=gnifi4S_Epyu4DpNsebz4A5BKzBWoGf11FkXWeXsoqY,599
+scipy/ndimage/interpolation.py,sha256=GHYvxCyQsLfKtNUc8AUN_vqmBhmAPwNnxm2-VpFMayk,664
+scipy/ndimage/measurements.py,sha256=xdSs52Y5RjURLP710iGURXWQFeS3ok4WjoYufKh9OeA,788
+scipy/ndimage/morphology.py,sha256=yFWSo7o_7PuYq61WGQOCIgMppneNLxqhJocyN0bMsVA,965
+scipy/ndimage/tests/__init__.py,sha256=GbIXCsLtZxgmuisjxfFsd3pj6-RQhmauc6AVy6sybDc,314
+scipy/ndimage/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_c_api.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_datatypes.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_filters.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_fourier.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_interpolation.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_measurements.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_morphology.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_ni_support.cpython-312.pyc,,
+scipy/ndimage/tests/__pycache__/test_splines.cpython-312.pyc,,
+scipy/ndimage/tests/data/label_inputs.txt,sha256=JPbEnncwUyhlAAv6grN8ysQW9w9M7ZSIn_NPopqU7z4,294
+scipy/ndimage/tests/data/label_results.txt,sha256=Cf2_l7FCWNjIkyi-XU1MaGzmLnf2J7NK2SZ_10O-8d0,4309
+scipy/ndimage/tests/data/label_strels.txt,sha256=AU2FUAg0WghfvnPDW6lhMB1kpNdfv3coCR8blcRNBJ8,252
+scipy/ndimage/tests/dots.png,sha256=sgtW-tx0ccBpTT6BSNniioPXlnusFr-IUglK_qOVBBQ,2114
+scipy/ndimage/tests/test_c_api.py,sha256=7Gv-hR91MWpiGQ32yjXIBjFytuaYLqz3wYiCXcC8ZSk,3738
+scipy/ndimage/tests/test_datatypes.py,sha256=TYMiGyBcdOq3KVLzvjZPjerD1EXonyHFQYBLTWDwN7o,2819
+scipy/ndimage/tests/test_filters.py,sha256=-Fx-4BLcLhG3ciTcA-nRedfhatdzhjn5VOGoRgEosbE,134869
+scipy/ndimage/tests/test_fourier.py,sha256=4e0ngc3Ul2JiLzyRzjW-BJuSX5AF0J87gsSXy5tSulQ,8080
+scipy/ndimage/tests/test_interpolation.py,sha256=9eToKX4j6ELzPAcSmbBuQRL0eE5yYBxd-FXy6GdDkoc,61290
+scipy/ndimage/tests/test_measurements.py,sha256=xw5iokRs5ifM7H4xbUqwFS-IGK02iklbRz0VShdn01U,62616
+scipy/ndimage/tests/test_morphology.py,sha256=QqGnKJiZ29gkySoY9-p6fwHVXsbYPp9JMxgfkK-ioQo,137867
+scipy/ndimage/tests/test_ni_support.py,sha256=5ZBJivg8-l-OFx02ZCLWEBK56Bdmu0AUqUmWjiPqAMQ,2484
+scipy/ndimage/tests/test_splines.py,sha256=z688_2iOVTb3ICre4-lyJNHOM0Xj00R-Bv8LH7Er5_A,2360
+scipy/odr/__init__.py,sha256=cb97lL9npGTTE1ZufLQTVm74uRUEwMiLu5G_GrXPjRA,6214
+scipy/odr/__odrpack.cpython-312-darwin.so,sha256=cPFq9irs3wsb7E3GPfoOeBkOfO0rglZsrBm9FEaxvlM,240656
+scipy/odr/__pycache__/__init__.cpython-312.pyc,,
+scipy/odr/__pycache__/_add_newdocs.cpython-312.pyc,,
+scipy/odr/__pycache__/_models.cpython-312.pyc,,
+scipy/odr/__pycache__/_odrpack.cpython-312.pyc,,
+scipy/odr/__pycache__/models.cpython-312.pyc,,
+scipy/odr/__pycache__/odrpack.cpython-312.pyc,,
+scipy/odr/_add_newdocs.py,sha256=kviOIY4HPMd6ninCtC82smc4D9fytrYvRwy8AOjl9c0,1328
+scipy/odr/_models.py,sha256=NXoKEJGpSer4YISjl9uY3YV4D7hcXTOY9oDgex3GA4I,8782
+scipy/odr/_odrpack.py,sha256=dpYQHipVkHjEXGPa6G7sdCsxLInbpMjz8JFePq2X1pk,44310
+scipy/odr/models.py,sha256=awdUPgiJ8slzPMzDITmNMNNyIoKsJ8elNryFE3jyf6o,785
+scipy/odr/odrpack.py,sha256=LvvD6GKspFMi-uwlRoBek5DESYWXGVNpJ3o0qs58HGc,828
+scipy/odr/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/odr/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/odr/tests/__pycache__/test_odr.cpython-312.pyc,,
+scipy/odr/tests/test_odr.py,sha256=X51l1F2Fb3KrqvCM3qmNRBHKw3mwALw-Z02ug43u3wU,22478
+scipy/optimize/__init__.pxd,sha256=kFYBK9tveJXql1KXuOkKGvj4Fu67GmuyRP5kMVkMbyk,39
+scipy/optimize/__init__.py,sha256=7ZzePqFF1X1377f_s3dpVdeg51I3YwManuh8Pl4M1mE,13279
+scipy/optimize/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/__pycache__/_basinhopping.cpython-312.pyc,,
+scipy/optimize/__pycache__/_bracket.cpython-312.pyc,,
+scipy/optimize/__pycache__/_chandrupatla.cpython-312.pyc,,
+scipy/optimize/__pycache__/_cobyla_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_cobyqa_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_constraints.cpython-312.pyc,,
+scipy/optimize/__pycache__/_dcsrch.cpython-312.pyc,,
+scipy/optimize/__pycache__/_differentiable_functions.cpython-312.pyc,,
+scipy/optimize/__pycache__/_differentialevolution.cpython-312.pyc,,
+scipy/optimize/__pycache__/_direct_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_dual_annealing.cpython-312.pyc,,
+scipy/optimize/__pycache__/_elementwise.cpython-312.pyc,,
+scipy/optimize/__pycache__/_hessian_update_strategy.cpython-312.pyc,,
+scipy/optimize/__pycache__/_isotonic.cpython-312.pyc,,
+scipy/optimize/__pycache__/_lbfgsb_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linesearch.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_doc.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_highs.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_ip.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_rs.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_simplex.cpython-312.pyc,,
+scipy/optimize/__pycache__/_linprog_util.cpython-312.pyc,,
+scipy/optimize/__pycache__/_milp.cpython-312.pyc,,
+scipy/optimize/__pycache__/_minimize.cpython-312.pyc,,
+scipy/optimize/__pycache__/_minpack_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_nnls.cpython-312.pyc,,
+scipy/optimize/__pycache__/_nonlin.cpython-312.pyc,,
+scipy/optimize/__pycache__/_numdiff.cpython-312.pyc,,
+scipy/optimize/__pycache__/_optimize.cpython-312.pyc,,
+scipy/optimize/__pycache__/_qap.cpython-312.pyc,,
+scipy/optimize/__pycache__/_remove_redundancy.cpython-312.pyc,,
+scipy/optimize/__pycache__/_root.cpython-312.pyc,,
+scipy/optimize/__pycache__/_root_scalar.cpython-312.pyc,,
+scipy/optimize/__pycache__/_shgo.cpython-312.pyc,,
+scipy/optimize/__pycache__/_slsqp_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/_spectral.cpython-312.pyc,,
+scipy/optimize/__pycache__/_tnc.cpython-312.pyc,,
+scipy/optimize/__pycache__/_trustregion.cpython-312.pyc,,
+scipy/optimize/__pycache__/_trustregion_dogleg.cpython-312.pyc,,
+scipy/optimize/__pycache__/_trustregion_exact.cpython-312.pyc,,
+scipy/optimize/__pycache__/_trustregion_krylov.cpython-312.pyc,,
+scipy/optimize/__pycache__/_trustregion_ncg.cpython-312.pyc,,
+scipy/optimize/__pycache__/_tstutils.cpython-312.pyc,,
+scipy/optimize/__pycache__/_zeros_py.cpython-312.pyc,,
+scipy/optimize/__pycache__/cobyla.cpython-312.pyc,,
+scipy/optimize/__pycache__/elementwise.cpython-312.pyc,,
+scipy/optimize/__pycache__/lbfgsb.cpython-312.pyc,,
+scipy/optimize/__pycache__/linesearch.cpython-312.pyc,,
+scipy/optimize/__pycache__/minpack.cpython-312.pyc,,
+scipy/optimize/__pycache__/minpack2.cpython-312.pyc,,
+scipy/optimize/__pycache__/moduleTNC.cpython-312.pyc,,
+scipy/optimize/__pycache__/nonlin.cpython-312.pyc,,
+scipy/optimize/__pycache__/optimize.cpython-312.pyc,,
+scipy/optimize/__pycache__/slsqp.cpython-312.pyc,,
+scipy/optimize/__pycache__/tnc.cpython-312.pyc,,
+scipy/optimize/__pycache__/zeros.cpython-312.pyc,,
+scipy/optimize/_basinhopping.py,sha256=WsbBApKXaUhZ5VoNoFmUGkWtfibm6BzT2-NHk34QsbE,29989
+scipy/optimize/_bglu_dense.cpython-312-darwin.so,sha256=WFzYyNhp9WHob_kvXHrnMu7onVvDc-1ftapZ7jRCk_Q,171904
+scipy/optimize/_bracket.py,sha256=RWZNYU3t8qsNVhW4TcP7etHTyoocZiPGCxzC1uKkPbA,30939
+scipy/optimize/_chandrupatla.py,sha256=yfdxwFZNBb1SToOqkbheYr0rabz0T9LGsBzKV1kI4Rk,24548
+scipy/optimize/_cobyla_py.py,sha256=Q5eIlDlQQQdAEctTONx4UoqBP2iZEUorzWBpyZsqNFM,11009
+scipy/optimize/_cobyqa_py.py,sha256=_zejgs3XKkieGiMlRVn1x12cyWoulaPP2SpvxA4zK3k,2971
+scipy/optimize/_constraints.py,sha256=jl03ITqXTn54y0z4lmBz-hTlIxV-eX1jgsl4xZ4zj9I,23134
+scipy/optimize/_dcsrch.py,sha256=tw5Fpc5_bHAzAuPszso66q0iP0efrJRP8KJ8W2C1_2Y,25234
+scipy/optimize/_differentiable_functions.py,sha256=or1-xbTBeB4CBS-7IyIMv91QlPrijLIw_GU8AxmFRuA,29960
+scipy/optimize/_differentialevolution.py,sha256=usq2VzCmz0u_DyC6yiu70IUvl_dlWruxmdZsKiIg-sU,90022
+scipy/optimize/_direct.cpython-312-darwin.so,sha256=Aec6aesS7hVMKje9FRYJUn2AOZ2L9-cVYBw3NNpkdEU,69232
+scipy/optimize/_direct_py.py,sha256=thi8xqSHzBo5lIAj8My05Ii4Ya0ViUcny3G59-bNuAc,11848
+scipy/optimize/_dual_annealing.py,sha256=YU79aERoQuVZWEOfDyzdmj7O8V8tg3VMLX341wByNCI,31121
+scipy/optimize/_elementwise.py,sha256=5JcY6mZ5ZgNig2vDaaXswc7YtDpp9epHEQ5xK9HcHkU,34148
+scipy/optimize/_group_columns.cpython-312-darwin.so,sha256=ubiwAcSZUZRhLvN_D22HpTH0c-EgIVWES9SmP3lEuAk,94616
+scipy/optimize/_hessian_update_strategy.py,sha256=xmtREKGlLgVvlBynjb5eCnPbsH-xbPcprS-ZoziG80M,18423
+scipy/optimize/_highspy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/optimize/_highspy/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_highspy/__pycache__/_highs_wrapper.cpython-312.pyc,,
+scipy/optimize/_highspy/_core.cpython-312-darwin.so,sha256=1AVVE8G_Z1cg1wLq767OaZZm-twKdxe5ktUZAnMeb0w,5294616
+scipy/optimize/_highspy/_highs_options.cpython-312-darwin.so,sha256=Bw6H-Psvh4R1YpvqxryTK7x5WfATSGIKA6ZNB6Dt5A0,405928
+scipy/optimize/_highspy/_highs_wrapper.py,sha256=wVqUOgmFv3FthLk3GdCy9XLmmDc2VasCWGFLSyq2cwM,11294
+scipy/optimize/_isotonic.py,sha256=WY-9jtT5VVafVALYIp6lJPQnBfYVNDP9oJpg-kErYYI,6077
+scipy/optimize/_lbfgsb.cpython-312-darwin.so,sha256=BwKZVk7sfTMI7R4ZGYZUcomzXbfa8JLSXvW5Ag0kBmw,68592
+scipy/optimize/_lbfgsb_py.py,sha256=skrkTC1jzYijSzqVsTgKIZ0nT4e7mbhPq6K0T2ttbdk,23093
+scipy/optimize/_linesearch.py,sha256=4zfjJXv0K_IHYEmvkZSSDa_TlILcN6WoOnW6m-u1Yg8,27216
+scipy/optimize/_linprog.py,sha256=TGl9k9Ioh-hgHYgtndN5BNcU4vqfpZm8whRK2f4ehQQ,30262
+scipy/optimize/_linprog_doc.py,sha256=AqRggJEqncrthBW0iCG2zhg-3Ks4-ZR_B3wTQSOfslE,61931
+scipy/optimize/_linprog_highs.py,sha256=491Jt7-YCQGKM0YQnWgdMpYYVKZ8tBAPDFCdX9-1vGM,17142
+scipy/optimize/_linprog_ip.py,sha256=QBlUjw6jl3mEZnouExtuac2dlIn9Gtki5yJVzkSffSU,46651
+scipy/optimize/_linprog_rs.py,sha256=wRVGZxCSpo4ttw4CPpmXozSvM9WRXD179fGiGh8gOQ4,23146
+scipy/optimize/_linprog_simplex.py,sha256=9_nxcVl-ofHN9p_dDyC1C6jHlPttSfO9kp8WF1ST4JM,24748
+scipy/optimize/_linprog_util.py,sha256=mzLvoLOkq4IZJcXINMPk1fzRXm7Z3QBPRd06NbiEgZw,62763
+scipy/optimize/_lsap.cpython-312-darwin.so,sha256=hRiQ3n3BtdrVaPiWANLu8DdzDAPKlJBssV91JOapULk,70744
+scipy/optimize/_lsq/__init__.py,sha256=Yk4FSVEqe1h-qPqVX7XSkQNBYDtZO2veTmMAebCxhIQ,172
+scipy/optimize/_lsq/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/bvls.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/common.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/dogbox.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/least_squares.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/lsq_linear.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/trf.cpython-312.pyc,,
+scipy/optimize/_lsq/__pycache__/trf_linear.cpython-312.pyc,,
+scipy/optimize/_lsq/bvls.py,sha256=7u5B8LfUbv3ZRZ8DAZKuDTSNRfDEBmTsn25VZtMMsKk,5195
+scipy/optimize/_lsq/common.py,sha256=h_VsfPQM3fy-MWYY2WbPDvfzZssBOsZl3xmaEWxfsMc,20480
+scipy/optimize/_lsq/dogbox.py,sha256=A-Q6_1XV3TbN7wUGS8vT2JFeZfSz-GuS8h9HKKRJUMU,12177
+scipy/optimize/_lsq/givens_elimination.cpython-312-darwin.so,sha256=NvMEAh9-KNaLYDsWZvQXrHOYF453rEpqFAEzh5YmkPQ,77944
+scipy/optimize/_lsq/least_squares.py,sha256=7bJeypmMILnMELOyL6-bCGH5vlJRIJSBtzn1bYV7G3w,42812
+scipy/optimize/_lsq/lsq_linear.py,sha256=HBVp9GhWm9r7meFhPp5WBX-H-LHTtFVGvKIAMSgI24I,15053
+scipy/optimize/_lsq/trf.py,sha256=DHwp1dP9aRVyDpVH8FHUfhTKWoIeeHJoaqjPHRxOSJM,20516
+scipy/optimize/_lsq/trf_linear.py,sha256=jIs7WviOu_8Kpb7sTln8W7YLgkcndv0eGIP15g_mC4g,7642
+scipy/optimize/_milp.py,sha256=qEC8gW3OnpypleLEzY2FMoxbvpZWVV50lR95jR65BII,15241
+scipy/optimize/_minimize.py,sha256=Wv0-y-q6ZgbCf1-fKYeCwNroDdDj4B2Y1CSZIu3mt-o,53050
+scipy/optimize/_minpack.cpython-312-darwin.so,sha256=PV7_XGoSx9FHIu9nNxwKNW40bYbcS5dSwXld6ujSmig,103520
+scipy/optimize/_minpack_py.py,sha256=zDy2mNhZxfcSdrvt8qPEmkiNJuzx07vi23gSyTdL3EY,45387
+scipy/optimize/_moduleTNC.cpython-312-darwin.so,sha256=41vgXzCalRyzZngvnpRdWeE7YcPYkHEIX5UMmkhtbLo,145984
+scipy/optimize/_nnls.py,sha256=WfKev4V9okgpecuBg_rWrKzE3Ge2j_zA8QwTZem4it0,2915
+scipy/optimize/_nonlin.py,sha256=x_DNnKjkTAwjwwnJ_XZlIXxCU_74bTVvUAwV0ovOrmY,52206
+scipy/optimize/_numdiff.py,sha256=q5LoLQ-T8sejXroKKAC3DPgBXZfM8JSr9VYgYhG-sAs,35825
+scipy/optimize/_optimize.py,sha256=BBoYB8yqaBFck7B77Ul9JcKUp9cwzlp8sfIfxaGF-mE,149749
+scipy/optimize/_pava_pybind.cpython-312-darwin.so,sha256=2I7iA1Jn6DJkbIbXqh4xqIY_Ir4Wrl2ieXNDXuaPrmE,226224
+scipy/optimize/_qap.py,sha256=6bIzIiLwD4V2MCJrqQBOJ2h7uycy0qx01mkl-CR1U3I,29390
+scipy/optimize/_remove_redundancy.py,sha256=00_Zc8_5uY6q2pBr8gu2_AYk7kX9YBjF8LqaxgqTKUY,18757
+scipy/optimize/_root.py,sha256=XZ8iqg3NhtOJZVC8ZRMfo5Jtj4poB8KVhDqkS0Hd1o4,28706
+scipy/optimize/_root_scalar.py,sha256=XSwjKAXVZRJrGwSc7hIpQTucDwJv84cWZpcYlLDLF3U,20391
+scipy/optimize/_shgo.py,sha256=zAg_cEamqQ_85I2oDKwlSRsZLs7rYtjEmO5CWNQBxxg,63593
+scipy/optimize/_shgo_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/optimize/_shgo_lib/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_shgo_lib/__pycache__/_complex.cpython-312.pyc,,
+scipy/optimize/_shgo_lib/__pycache__/_vertex.cpython-312.pyc,,
+scipy/optimize/_shgo_lib/_complex.py,sha256=my2yyCrPKpLbmz0onA-Y-xLTw20KuwEiKbOrQ-fpe6E,50263
+scipy/optimize/_shgo_lib/_vertex.py,sha256=I2TAqEEdTK66Km6UIkrDm2-tKpeJUuFX7DAfTk3XvUg,13996
+scipy/optimize/_slsqp_py.py,sha256=yDYujTZEDz3pe1hWKq24ZmEnHqf2YWBQX1GmAa_3Fgk,24296
+scipy/optimize/_slsqplib.cpython-312-darwin.so,sha256=h6BtOyuqdYyAXt967Zol59vGfAznilRBt78tRgdISgE,70624
+scipy/optimize/_spectral.py,sha256=uV4DgfWAKcEpB7CC1CUgtWJjIGfIbpk8SH1ZwUyGFXo,8128
+scipy/optimize/_tnc.py,sha256=htQhspgXo-P0jt7TmynmAPzqq8qZaM4yVmI8O1cImGU,17339
+scipy/optimize/_trlib/__init__.py,sha256=cNGWE1VffijqhPtSaqwagtBJvjJK-XrJ6K80RURLd48,524
+scipy/optimize/_trlib/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_trlib/_trlib.cpython-312-darwin.so,sha256=knnI-G0iLR7KiLpRPN1cbj0lSc-W99FTMYqAJCIKMcE,182816
+scipy/optimize/_trustregion.py,sha256=HrxSmXdTHnQQVyGo4GqPxXhhGU4xbwPu-pedgskaLjA,11866
+scipy/optimize/_trustregion_constr/__init__.py,sha256=c8J2wYGQZr9WpLIT4zE4MUgEj4YNbHEWYYYsFmxAeXI,180
+scipy/optimize/_trustregion_constr/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/canonical_constraint.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/equality_constrained_sqp.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/minimize_trustregion_constr.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/projections.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/qp_subproblem.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/report.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/__pycache__/tr_interior_point.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/canonical_constraint.py,sha256=gc5KucHwFCz_-w2IYWd_C1X1E0TFy_sey-_0KBY_djE,12542
+scipy/optimize/_trustregion_constr/equality_constrained_sqp.py,sha256=mNbnrNvKAkj7AzHTUpQQGgAfiUQ5ZSY0uzjk45B91Cs,9160
+scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py,sha256=j7Xanu91OsRjHGFkGZiRDi54Z-41m9sPmVbVibH2yfA,26594
+scipy/optimize/_trustregion_constr/projections.py,sha256=Q7zBucAd44hxj_KwusacAAnAuLSavr3T3qLUk4bwN_k,13517
+scipy/optimize/_trustregion_constr/qp_subproblem.py,sha256=AoLwMIDUMROleMGAldXH3gItoyzJ6qRTpNhDrijyvNA,22587
+scipy/optimize/_trustregion_constr/report.py,sha256=_L-HrO5C1lzvKvaijgkOYD210dvM4PkrhBSEQrMhVlw,1782
+scipy/optimize/_trustregion_constr/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/optimize/_trustregion_constr/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/__pycache__/test_canonical_constraint.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/__pycache__/test_nested_minimize.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/__pycache__/test_projections.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/__pycache__/test_qp_subproblem.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/__pycache__/test_report.cpython-312.pyc,,
+scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py,sha256=zVPxZDa0WkG_tw9Fm_eo_JzsQ8rQrUJyQicq4J12Nd4,9869
+scipy/optimize/_trustregion_constr/tests/test_nested_minimize.py,sha256=tgBVQe97RwVu_GJACARyg0s9zHiFGVHSPNrXLCjlX7w,1216
+scipy/optimize/_trustregion_constr/tests/test_projections.py,sha256=Agc-mtiLBximfHMI0CTDklb0shxHL8DUXEBuV08CjSs,8869
+scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py,sha256=5nNaAOTP4Pox6ZIqQ9b9gpOBHALaPY3m4IS--7PX4a0,27642
+scipy/optimize/_trustregion_constr/tests/test_report.py,sha256=hyRnUGBhDhKHR5SKD66ZME4zzCIViIh3_-700p0afXY,1104
+scipy/optimize/_trustregion_constr/tr_interior_point.py,sha256=Kt3jEh7tPo9cp3PaQd675ofg7JVk-84sYzaZS7UA6Uo,14395
+scipy/optimize/_trustregion_dogleg.py,sha256=HS783IZYHE-EEuF82c4rkFp9u3MNKUdCeynZ6ap8y8s,4389
+scipy/optimize/_trustregion_exact.py,sha256=ne9CVO0g-LQosj2P6QzvpiNsZTynNRJekyfvDq-P9U0,16672
+scipy/optimize/_trustregion_krylov.py,sha256=KGdudJsoXXROXAc82aZ8ACojD3rimvyx5PYitbo4UzQ,3030
+scipy/optimize/_trustregion_ncg.py,sha256=y7b7QjFBfnB1wDtbwnvKD9DYpz7y7NqVrJ9RhNPcipw,4580
+scipy/optimize/_tstutils.py,sha256=BBaThpZNuwIQBqtVMOEB4bUHk3QdG2NpuLJBum8P6ak,34047
+scipy/optimize/_zeros.cpython-312-darwin.so,sha256=3iS13fupP80tZA7NZOdxTHVHV9PVnEJPZF1X7mnMN7Q,51280
+scipy/optimize/_zeros_py.py,sha256=FPiPEICYXq4K-Eu1lS2luZSrIEPn_lsMhgODlHU5EWE,56659
+scipy/optimize/cobyla.py,sha256=k2io8SM0vahYT5Zu4nS4yfa05_gyH0y-jVVxdWkC4dU,557
+scipy/optimize/cython_optimize.pxd,sha256=ecYJEpT0CXN-2vtaZfGCChD-oiIaJyRDIsTHE8eUG5M,442
+scipy/optimize/cython_optimize/__init__.py,sha256=eehEQNmLGy3e_XjNh6t5vQIC9l_OREeE4tYRRaFZdNs,4887
+scipy/optimize/cython_optimize/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/cython_optimize/_zeros.cpython-312-darwin.so,sha256=_DIphYWsOXusi6sHrIVF9O6j67BX2Vb17RRt7fllITo,114672
+scipy/optimize/cython_optimize/_zeros.pxd,sha256=anyu-MgWhq24f1bywI4TlohvJjOnpNpkCtSzpKBJSSo,1239
+scipy/optimize/cython_optimize/c_zeros.pxd,sha256=6Gc0l1q-1nlCO9uKrYeXFiHsbimRZzU3t6EoTa8MVvA,1118
+scipy/optimize/elementwise.py,sha256=8eEQW_PeNkr49YBTROr5xWDLgeJd7rxtdQk3tVuEECQ,1190
+scipy/optimize/lbfgsb.py,sha256=XT7kclUTtom8JASPYyAScx-5irlBd9s9yEnZzRwFqu8,601
+scipy/optimize/linesearch.py,sha256=w5OhOofynUbz7IzHAGEc6huLKV_rMR5eUq77VcskA9o,535
+scipy/optimize/minpack.py,sha256=2S9tkmBI670qqeDN7k_1-ZLYsFZV1yXaDMkrCvMETiQ,664
+scipy/optimize/minpack2.py,sha256=IPIduBcu0LRo75GJ9SiMa_GjfdKCOYzsWUs61_d1HR8,514
+scipy/optimize/moduleTNC.py,sha256=qTEQ4IWtv_LT6fH3-iYmYNwrtrjG1gS4KFbZ73iDcd0,507
+scipy/optimize/nonlin.py,sha256=uoKIYAdmhwNrC6zFbUIBCNdM1a59nn7hb5jxSOuK3rs,710
+scipy/optimize/optimize.py,sha256=SivH06ZYrbIwJLTQj3ZShU4FXft7w2y1a2uYE9ILIMo,877
+scipy/optimize/slsqp.py,sha256=Xei2XAZBNcz8cQdLdK8tTHeyIgpLEElP2ENdTH2QEi8,569
+scipy/optimize/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/optimize/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__basinhopping.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__differential_evolution.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__dual_annealing.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__linprog_clean_inputs.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__numdiff.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__remove_redundancy.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__root.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__shgo.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test__spectral.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_bracket.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_chandrupatla.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_cobyla.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_cobyqa.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_constraint_conversion.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_constraints.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_cython_optimize.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_differentiable_functions.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_direct.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_extending.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_hessian_update_strategy.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_isotonic_regression.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_lbfgsb_hessinv.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_lbfgsb_setulb.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_least_squares.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_linear_assignment.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_linesearch.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_linprog.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_lsq_common.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_lsq_linear.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_milp.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_minimize_constrained.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_minpack.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_nnls.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_nonlin.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_optimize.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_quadratic_assignment.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_regression.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_slsqp.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_tnc.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_trustregion.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_trustregion_exact.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_trustregion_krylov.cpython-312.pyc,,
+scipy/optimize/tests/__pycache__/test_zeros.cpython-312.pyc,,
+scipy/optimize/tests/_cython_examples/extending.pyx,sha256=5TCYF9hvIYu8S9Y7PIql-xdJfcn_LI50yDrf4uh7i2M,1314
+scipy/optimize/tests/_cython_examples/meson.build,sha256=GCeweHtWXjvk73tZN3HqsMTw7F1St0JuIhGyxmEiPv0,703
+scipy/optimize/tests/test__basinhopping.py,sha256=5tsmhal5dAxecemRbRVVwhwmEmYMlR84b3_Ep8AgPzA,19230
+scipy/optimize/tests/test__differential_evolution.py,sha256=9lwlQpFfJL5HUIZ91YXPHh_V7jEyYzR_wDat3IJVH5E,71804
+scipy/optimize/tests/test__dual_annealing.py,sha256=narPlqiULIu0dlWySB9mWn6Y-1sjM_DaiwARgCQeVKA,16603
+scipy/optimize/tests/test__linprog_clean_inputs.py,sha256=kwBb1lKIYrRi07zw_zyXQE8dV3owopmXb4WYaff2qzI,11876
+scipy/optimize/tests/test__numdiff.py,sha256=zzjj-kAR8jUWDGPOS88HAeK0Avvq_LWifaaR5tR-8Lg,34627
+scipy/optimize/tests/test__remove_redundancy.py,sha256=wxGfVJaHD_-5g_aMNU3w92EuWrCrfhCLU1ixhFVio64,6883
+scipy/optimize/tests/test__root.py,sha256=xMNuKf_eNAFN6hwp1PzY7KIXlcFWV8ozPtzGtnZRmjA,4199
+scipy/optimize/tests/test__shgo.py,sha256=HYr2RFqo56lTX7Tfjjc97IEyVbJlpDW7CGTS8MN8Nqg,42350
+scipy/optimize/tests/test__spectral.py,sha256=V7J3hHkzYPLSgSycFVt2zEXUbO9N3wTfyhjRoTfz3Eo,6639
+scipy/optimize/tests/test_bracket.py,sha256=5Uv-mwZN_j_IdgXZ8q9nliyrFTIcqDDyrOihILQeN0I,36152
+scipy/optimize/tests/test_chandrupatla.py,sha256=OtuMLK4pOCsmR86tdvJWciCbRb5D9XSMMJzU8LZKRF0,38639
+scipy/optimize/tests/test_cobyla.py,sha256=gLCVj8xmmSoIx5oikBMr9PVpgyGsoyAG5JdcNAZJmmU,6822
+scipy/optimize/tests/test_cobyqa.py,sha256=5sHRoBc4ZVfjZZAYMGObwSAtWq2A53L9KSwHuUUhQLk,8143
+scipy/optimize/tests/test_constraint_conversion.py,sha256=2FUZwIk7TPMBd-ulpVs-puUcgrpKez3b87fgYJOhYs8,12522
+scipy/optimize/tests/test_constraints.py,sha256=X3Y31naHyXBgyI03UowHOPY_qxhRrL2I9fJtCvZ2kGo,9407
+scipy/optimize/tests/test_cython_optimize.py,sha256=n-HccBWoUmmBWq_OsNrAVnt4QrdssIYm4PWG29Ocias,2638
+scipy/optimize/tests/test_differentiable_functions.py,sha256=eqpZUgmxI2UI2hW-S7DfPCAdvHDUDZJr4D6J7vHEy-8,38437
+scipy/optimize/tests/test_direct.py,sha256=_R4_VkYkIJcS7X9a7n9rxwnZClK5i9nXSiYYkX0aRiA,13267
+scipy/optimize/tests/test_extending.py,sha256=r9Phn1PUn0U3U6QJeMiPreKG6jKmnWFqwpf1Al7w7K0,1104
+scipy/optimize/tests/test_hessian_update_strategy.py,sha256=EiL5ImqkGFmUTjgZjv0FGpGBjTzWXqT3w6eCrzQtPmo,14337
+scipy/optimize/tests/test_isotonic_regression.py,sha256=aJakW5zYcILN3wa--CYFBoZ3MB6n5Rzwd4WfNs_SFQk,7113
+scipy/optimize/tests/test_lbfgsb_hessinv.py,sha256=XnInFBGl9BQZS-wndHuPhNFDkb4kIsd02QMdVsg3Iy4,1934
+scipy/optimize/tests/test_lbfgsb_setulb.py,sha256=6Aqn26aKUJp75unFqCAzesLq_tWPsQpp2rCftauSOS8,3582
+scipy/optimize/tests/test_least_squares.py,sha256=_ozl0YHfvpPHCKbP7Kr8lpw4pVFY-eSUkVihDcJS_EM,38297
+scipy/optimize/tests/test_linear_assignment.py,sha256=vhP5go29wZY-XaszuCkajQzYqYKzqAPs5WSO5zI3j2M,4103
+scipy/optimize/tests/test_linesearch.py,sha256=BGEDLJjO8RUPW6Aek8AHb4VB4voOuTX88gYHEKkJud8,11598
+scipy/optimize/tests/test_linprog.py,sha256=XqBf5HVLQomD6lCg67_RIMOTd9YLsbKskmtSBcboAN0,105114
+scipy/optimize/tests/test_lsq_common.py,sha256=alCLPPQB4mrxLIAo_rn7eg9xrCEH7DerNBozSimOQRA,9500
+scipy/optimize/tests/test_lsq_linear.py,sha256=5K_o46uKUJsprMeeT7lwf9gBIfiFxzeeREoOEe8WSKs,11000
+scipy/optimize/tests/test_milp.py,sha256=JvtivR6ZrI4rB_LxMCCPSmpeJoWos699FF_RC-59u-4,18811
+scipy/optimize/tests/test_minimize_constrained.py,sha256=o1wJLIUkGRj6FEyd9ShkMhCqCu6dAwVtyuUKrQVcdTg,28130
+scipy/optimize/tests/test_minpack.py,sha256=4hOCKOnfsstwupL-_bmAkTgR3rDypkXVw8fwmf3f4LI,44879
+scipy/optimize/tests/test_nnls.py,sha256=ib5rfMaFlDIq28Ir8H5ZJfvYuVd5ZzPjrXtqKJ7BtM0,27195
+scipy/optimize/tests/test_nonlin.py,sha256=nbAIXMTq-KlH2EjCui1CbgUtFpwftj3cLWkK0Ah58nc,20250
+scipy/optimize/tests/test_optimize.py,sha256=fzfiKb9mh9hH24tzFttm3StetaNnlNNUXnZEZU1_gfs,143191
+scipy/optimize/tests/test_quadratic_assignment.py,sha256=uc6HeZZ5QXAIEl1aIKV9FJCkbeYW8xAbcwuX3TvvrZk,17508
+scipy/optimize/tests/test_regression.py,sha256=CSg8X-hq6-6jW8vki6aVfEFYRUGTWOg58silM1XNXbU,1077
+scipy/optimize/tests/test_slsqp.py,sha256=io__JB2LIrNtcV3uwgXq26g5jJY2YV_YQyzW8-YebsU,25662
+scipy/optimize/tests/test_tnc.py,sha256=ahSwu8F1tUcPV09l1MsbacUXXi1avQHzQNniYhZRf4s,12700
+scipy/optimize/tests/test_trustregion.py,sha256=IhrFNgseaMd-R6RizA9obQP9m0zozGgLSaxHSXbBBFA,4638
+scipy/optimize/tests/test_trustregion_exact.py,sha256=99gAvNkeN9CmGOfNKpOmigMhZpQh6NnnVhm1qIV_bQ8,21301
+scipy/optimize/tests/test_trustregion_krylov.py,sha256=G_p_Kje8awkqw1Z9AV0k9xI9BWRrPUKZgCoeo94g7y0,6571
+scipy/optimize/tests/test_zeros.py,sha256=A-Zctk9ZFE2Zau4WeVcTMAzU6t8nQr-k8yxtWcbVAiE,37955
+scipy/optimize/tnc.py,sha256=aEKhka8wryg4mVlbrGFwzTJF_KYB49joMkSxKgh1KnA,560
+scipy/optimize/zeros.py,sha256=Sc06-J8JUazdfR36UamHhPndJoPK0FkOzHR-unHWoBw,620
+scipy/signal/__init__.py,sha256=A8hqxncT2j2t_zb1iIWVga5bH1VgeSkKjHg--FQlNWQ,13561
+scipy/signal/__pycache__/__init__.cpython-312.pyc,,
+scipy/signal/__pycache__/_arraytools.cpython-312.pyc,,
+scipy/signal/__pycache__/_czt.cpython-312.pyc,,
+scipy/signal/__pycache__/_delegators.cpython-312.pyc,,
+scipy/signal/__pycache__/_filter_design.cpython-312.pyc,,
+scipy/signal/__pycache__/_fir_filter_design.cpython-312.pyc,,
+scipy/signal/__pycache__/_lti_conversion.cpython-312.pyc,,
+scipy/signal/__pycache__/_ltisys.cpython-312.pyc,,
+scipy/signal/__pycache__/_max_len_seq.cpython-312.pyc,,
+scipy/signal/__pycache__/_peak_finding.cpython-312.pyc,,
+scipy/signal/__pycache__/_polyutils.cpython-312.pyc,,
+scipy/signal/__pycache__/_savitzky_golay.cpython-312.pyc,,
+scipy/signal/__pycache__/_short_time_fft.cpython-312.pyc,,
+scipy/signal/__pycache__/_signal_api.cpython-312.pyc,,
+scipy/signal/__pycache__/_signaltools.cpython-312.pyc,,
+scipy/signal/__pycache__/_spectral_py.cpython-312.pyc,,
+scipy/signal/__pycache__/_spline_filters.cpython-312.pyc,,
+scipy/signal/__pycache__/_support_alternative_backends.cpython-312.pyc,,
+scipy/signal/__pycache__/_upfirdn.cpython-312.pyc,,
+scipy/signal/__pycache__/_waveforms.cpython-312.pyc,,
+scipy/signal/__pycache__/_wavelets.cpython-312.pyc,,
+scipy/signal/__pycache__/bsplines.cpython-312.pyc,,
+scipy/signal/__pycache__/filter_design.cpython-312.pyc,,
+scipy/signal/__pycache__/fir_filter_design.cpython-312.pyc,,
+scipy/signal/__pycache__/lti_conversion.cpython-312.pyc,,
+scipy/signal/__pycache__/ltisys.cpython-312.pyc,,
+scipy/signal/__pycache__/signaltools.cpython-312.pyc,,
+scipy/signal/__pycache__/spectral.cpython-312.pyc,,
+scipy/signal/__pycache__/spline.cpython-312.pyc,,
+scipy/signal/__pycache__/waveforms.cpython-312.pyc,,
+scipy/signal/__pycache__/wavelets.cpython-312.pyc,,
+scipy/signal/_arraytools.py,sha256=k3kHbl9RzcqsyftIYSFJZvJFL4zlcMAHyaRFUkFxOXY,8294
+scipy/signal/_czt.py,sha256=t5P1kRCM3iw3eCaL9hTgctMfQKezkqnjbghLjCkffQE,19445
+scipy/signal/_delegators.py,sha256=Flc_oinMci8_PZdVZXB775JFZDcjYy4NvTpa5klN_n8,14646
+scipy/signal/_filter_design.py,sha256=pSpXlae6s_HZMpDb-QI-rA_Qwtq0XW5pEdl-4Jz0Gyk,204408
+scipy/signal/_fir_filter_design.py,sha256=cSnE-AvsGISz1mGPuvtoEiMDNG3ey9lhsX1mJAjVJiQ,64160
+scipy/signal/_lti_conversion.py,sha256=w1SlFZSv9U-T5EM1-B6A6FDfRZmEwewyrWHSmrjPZHs,18281
+scipy/signal/_ltisys.py,sha256=ZYa0xvsIUGLp7Xdsg8QlPX2kgU11IeDeh7_aqcgyxDU,121224
+scipy/signal/_max_len_seq.py,sha256=8QkMWoYY3qy3bCKfsuXaS93Bnb2zd-ue6j5i5-3_hi0,5060
+scipy/signal/_max_len_seq_inner.cpython-312-darwin.so,sha256=umS_I3-RkUPASeWjKvNX0q8DiADBz3XMbjpWyWOD-Bc,75992
+scipy/signal/_peak_finding.py,sha256=e9vpWL98OQ9Ik1f7gwLl4d5feTAiyLwPm_yarJq3T_8,48856
+scipy/signal/_peak_finding_utils.cpython-312-darwin.so,sha256=rzGwWnOxpDNZcCJ8PI8vWO7NYjuJ4bJn34-T51f6nEs,131336
+scipy/signal/_polyutils.py,sha256=V3QGVjltypg--YVe8nHw_3xZpcqrjvyiSqbRewqWNPA,8416
+scipy/signal/_savitzky_golay.py,sha256=4SSWfYNIsyQrWpQTbV1mJvQ08YPvn9SLlPna_DXqono,14372
+scipy/signal/_short_time_fft.py,sha256=ObTun_SoEMiDdlEURsp4XnFtt6vvpVRLL9aJPEGuIcI,101673
+scipy/signal/_signal_api.py,sha256=wp3qv0vBhANNCCq1S--VUWmHRdEDy5u5obbNDNUk_Cw,1237
+scipy/signal/_signaltools.py,sha256=h9nbt_Z0zPufE_E4GUrBTQyH-Fa5cM84VTsk38nXFhQ,196595
+scipy/signal/_sigtools.cpython-312-darwin.so,sha256=kwELAj0THIKoHuub6N4xk8tvbfaUqf-YiKYBt2EgF-0,123120
+scipy/signal/_sosfilt.cpython-312-darwin.so,sha256=1MfnMBEQ-2D0ylmEJg6zOFbm2kCiOAanMJ4aEU22kxg,114464
+scipy/signal/_spectral_py.py,sha256=nB-p-lmc5nDr6RYXzkPREimp2V9Lety_1nW7KkTrQI4,97065
+scipy/signal/_spline.cpython-312-darwin.so,sha256=a5YSs3oLOplk_BnZFJJjhk0DvjHy6SgqXRgmraJWlwE,69744
+scipy/signal/_spline.pyi,sha256=9tWZQCI7D84ONLwICZG6psBGtwKxAvLF7JaZ1tQUKoY,948
+scipy/signal/_spline_filters.py,sha256=6BX6eu7yt2qNYSY8VJtZ1wHrQbOzvxK0mGre6eNtRpU,25439
+scipy/signal/_support_alternative_backends.py,sha256=EGqh6VeDiWyKwtcx-Et-J8aOvyOsVbXf1pZA_nVRBqg,18177
+scipy/signal/_upfirdn.py,sha256=bE78hIj-iGh7wCXcMh-3Tus9WM_pptNoGLHKXHLFvu0,7976
+scipy/signal/_upfirdn_apply.cpython-312-darwin.so,sha256=DcrEsoebqQryYXKAnAjmbBKXr3QRbjevyOY5VdELnTc,184968
+scipy/signal/_waveforms.py,sha256=0Gembo6HsY--mZJ82tFCEw5RYzfhxeDY-gFHOHdJXBk,22912
+scipy/signal/_wavelets.py,sha256=K7wj6hMQgJrJ1sb3b2SB4LRc7JlZx5ej9tX6v7E1YCw,886
+scipy/signal/bsplines.py,sha256=G1sa6en1z_41sU7ckRY8-flJjUKSqJJihaxBlwzUd3s,651
+scipy/signal/filter_design.py,sha256=EyHs8OX4mdeUi6e3Zf7IWuz6r5Re2eR_t0Bi10JuntM,1112
+scipy/signal/fir_filter_design.py,sha256=mJr3FG_K_4qbzLOUasIJmXSycuFmotHkEMCAn812v6I,657
+scipy/signal/lti_conversion.py,sha256=6uQ1qaT7XI75DoFmtRqRS94Hkpm-Qvy66CRNhmQ-Lbw,639
+scipy/signal/ltisys.py,sha256=TFul9jyL0ujEIchiOnDdIiJKIXZ8SSgOV066DvmX_QA,869
+scipy/signal/signaltools.py,sha256=I7U_hMuMf02zpdNi0LcPogucTDf0nUVUSkMZ1eAoq3E,1038
+scipy/signal/spectral.py,sha256=RA3jj6AWV6ptNwXfpVrbuyxxed8P7nWw8bLsD0iZIgw,662
+scipy/signal/spline.py,sha256=rC_E8HwcpDqwIGdaDF0Cb5uC6kPoAQP57jeQNq-aCmI,536
+scipy/signal/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/signal/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/_scipy_spectral_test_shim.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/mpsig.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_array_tools.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_bsplines.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_cont2discrete.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_czt.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_dltisys.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_filter_design.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_fir_filter_design.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_ltisys.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_max_len_seq.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_peak_finding.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_result_type.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_savitzky_golay.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_short_time_fft.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_signaltools.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_spectral.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_splines.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_upfirdn.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_waveforms.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_wavelets.cpython-312.pyc,,
+scipy/signal/tests/__pycache__/test_windows.cpython-312.pyc,,
+scipy/signal/tests/_scipy_spectral_test_shim.py,sha256=ioVfbdXOV77dDef-hcpuwqnDES1ZaQg29ZjYTd_ts1g,12748
+scipy/signal/tests/mpsig.py,sha256=DHB3eHB0KYA-E0SBebKG36YLk-T5egbwwryne3RwIHM,3308
+scipy/signal/tests/test_array_tools.py,sha256=QN4SGbtxDSP2MFvyYl00RasYYyNF4A1g8Y6_1Sij7YQ,3589
+scipy/signal/tests/test_bsplines.py,sha256=jTmrfmpGY5R_SjYVAwWahCukYTnD-IKOIQA9TM_B3ME,19116
+scipy/signal/tests/test_cont2discrete.py,sha256=d-b1pgroBK-4jByyn8bwvvkvmUbV1qUGIxVRQs9Mplc,15570
+scipy/signal/tests/test_czt.py,sha256=2-kcWyadICVl_mF0vbq1KYii-rYMtZiuiOSb6HkYn7w,7156
+scipy/signal/tests/test_dltisys.py,sha256=gefhLnAHHlgVJlW1jJRn5d3inR5RX_-ke6q7r_4g1j0,21567
+scipy/signal/tests/test_filter_design.py,sha256=qd_EZmzF9gmpBEA0w5ryHcJt-rAdIm4TQVDq4U8T9ak,228943
+scipy/signal/tests/test_fir_filter_design.py,sha256=Fz10PbpgRLzJZOQWhmcrtl37UufY7rKoMYQO82ZnS9s,36654
+scipy/signal/tests/test_ltisys.py,sha256=2x6xHq_bJdihoXDkoK3XY9J04H0VqC_bG_M9G2DQl8M,46097
+scipy/signal/tests/test_max_len_seq.py,sha256=JzfWWN4n6FO9Axw6H6xWrWyc21LlkqMwkGl23f-V664,3318
+scipy/signal/tests/test_peak_finding.py,sha256=YUqNXTV70bjgdpDlgCQNniiR0wUM-gECbW9zvP_wzT0,36023
+scipy/signal/tests/test_result_type.py,sha256=F48EQGbFfQfMwcnt-sMofHGNHVTbHntbMlgoeS2vYcY,1573
+scipy/signal/tests/test_savitzky_golay.py,sha256=tTtbTECtl3Ou1-QB1BI7KcpPryzU2GrR_p-qoQdknTc,14270
+scipy/signal/tests/test_short_time_fft.py,sha256=H1QZ2SX1DhVtPobHrJbnbVe1Kg6aObepadduiWXmJsI,48294
+scipy/signal/tests/test_signaltools.py,sha256=s9NCso2IV53Mcef_HZObIysePHctKdfoAFnvzDVuhj8,196642
+scipy/signal/tests/test_spectral.py,sha256=nhqL27Tpa5WjunBQXaWGljJEPEUZt7rd3QWWQFPnC6w,83384
+scipy/signal/tests/test_splines.py,sha256=UJ4UNfwXWFWmfo_lu7ZHngIrUZmmlyx5f-cAK7sLEPQ,16957
+scipy/signal/tests/test_upfirdn.py,sha256=yds26YXmh1uqCJouI_X4RjbrhBLbHvZG1HZJ_gD57CM,13011
+scipy/signal/tests/test_waveforms.py,sha256=HfyUh2X65Qfv0qNLGOk99XAtwy8ELEcIDJnCCoHR6WY,13554
+scipy/signal/tests/test_wavelets.py,sha256=42yMux80J-K7Ue9QLnzN84U9K3j2GRdywMxGpbLldeM,2145
+scipy/signal/tests/test_windows.py,sha256=MSn9jcMDJb06XzHQuYFnTSKSLhbRIkx0PMA30VV9DGQ,55199
+scipy/signal/waveforms.py,sha256=jfOXW7kgtGdh1nrMo1YLAh79W_Ln3WgzEN2esrp70wE,599
+scipy/signal/wavelets.py,sha256=7pA7HVMiXwG4fZZ0Q4nzz47hWWALMTYtxwGrIqV3bNE,510
+scipy/signal/windows/__init__.py,sha256=TtLlEQSIXo8WiAPJh0raWYS8_5zLHOjarzCmDhj9Eu8,2126
+scipy/signal/windows/__pycache__/__init__.cpython-312.pyc,,
+scipy/signal/windows/__pycache__/_windows.cpython-312.pyc,,
+scipy/signal/windows/__pycache__/windows.cpython-312.pyc,,
+scipy/signal/windows/_windows.py,sha256=eVK6aQbJ5jl2pVbz6NuQ2bbmfG3SUCYcGf4PAEuJ7kI,95033
+scipy/signal/windows/windows.py,sha256=FI6w8mt0V1221Rqv3Do3LuWRWrtKo3hYYTvpB_5UB1c,839
+scipy/sparse/__init__.py,sha256=kugwj8l-e9bCdjUFCEV4nQ517Qur2kgNQ6hv8dIplsU,10109
+scipy/sparse/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/__pycache__/_base.cpython-312.pyc,,
+scipy/sparse/__pycache__/_bsr.cpython-312.pyc,,
+scipy/sparse/__pycache__/_compressed.cpython-312.pyc,,
+scipy/sparse/__pycache__/_construct.cpython-312.pyc,,
+scipy/sparse/__pycache__/_coo.cpython-312.pyc,,
+scipy/sparse/__pycache__/_csc.cpython-312.pyc,,
+scipy/sparse/__pycache__/_csr.cpython-312.pyc,,
+scipy/sparse/__pycache__/_data.cpython-312.pyc,,
+scipy/sparse/__pycache__/_dia.cpython-312.pyc,,
+scipy/sparse/__pycache__/_dok.cpython-312.pyc,,
+scipy/sparse/__pycache__/_extract.cpython-312.pyc,,
+scipy/sparse/__pycache__/_index.cpython-312.pyc,,
+scipy/sparse/__pycache__/_lil.cpython-312.pyc,,
+scipy/sparse/__pycache__/_matrix.cpython-312.pyc,,
+scipy/sparse/__pycache__/_matrix_io.cpython-312.pyc,,
+scipy/sparse/__pycache__/_spfuncs.cpython-312.pyc,,
+scipy/sparse/__pycache__/_sputils.cpython-312.pyc,,
+scipy/sparse/__pycache__/base.cpython-312.pyc,,
+scipy/sparse/__pycache__/bsr.cpython-312.pyc,,
+scipy/sparse/__pycache__/compressed.cpython-312.pyc,,
+scipy/sparse/__pycache__/construct.cpython-312.pyc,,
+scipy/sparse/__pycache__/coo.cpython-312.pyc,,
+scipy/sparse/__pycache__/csc.cpython-312.pyc,,
+scipy/sparse/__pycache__/csr.cpython-312.pyc,,
+scipy/sparse/__pycache__/data.cpython-312.pyc,,
+scipy/sparse/__pycache__/dia.cpython-312.pyc,,
+scipy/sparse/__pycache__/dok.cpython-312.pyc,,
+scipy/sparse/__pycache__/extract.cpython-312.pyc,,
+scipy/sparse/__pycache__/lil.cpython-312.pyc,,
+scipy/sparse/__pycache__/sparsetools.cpython-312.pyc,,
+scipy/sparse/__pycache__/spfuncs.cpython-312.pyc,,
+scipy/sparse/__pycache__/sputils.cpython-312.pyc,,
+scipy/sparse/_base.py,sha256=5tcP1l8DePGYzfDIOYaqO0d_h9pHE3A372BW1CSB_Rs,58343
+scipy/sparse/_bsr.py,sha256=wAzh3MxiT1K9AQQgi49uNzjfCst6jZHy31np1k40mNE,31157
+scipy/sparse/_compressed.py,sha256=2NhHzrEEabkdwvZOK-fsOvBOGgmdufu5H7MlJvhg3A8,52058
+scipy/sparse/_construct.py,sha256=_-O4bnUUa1iJB5sMtwUyrRr-hiJazqzahyelx1ddIks,59658
+scipy/sparse/_coo.py,sha256=s0kP0yRarvRoIpij66FHTsyuB1RarxlHyRsOpm3Heew,75029
+scipy/sparse/_csc.py,sha256=iMRi5xFyFpKV-o4ff_I9SjwAN-hHp7YDfnTIEu4jZVI,11162
+scipy/sparse/_csparsetools.cpython-312-darwin.so,sha256=d6JCwpNxJce1467JgiKZsDxhFTYsty1amtlL-NF8g_o,404752
+scipy/sparse/_csr.py,sha256=j-VF_qQnndzv_e8XO0OWa6ofYzmXZm63Heqrm2BGqhM,18601
+scipy/sparse/_data.py,sha256=yeFDnTI6jBp62Kb0DigJ2jAsJwb9cBn2kWiU9pS16mg,20980
+scipy/sparse/_dia.py,sha256=iGXFZUjsEbwYlXKx_gelLMjs-MTuvmbE6QUlnf3QLUw,23643
+scipy/sparse/_dok.py,sha256=sVXX5QYYbCiEWwqeqSJsXlQ3cSxbVDwFz0hUajMLhmY,23387
+scipy/sparse/_extract.py,sha256=0NWW00hxjk5gl4CjNRHtvcqsx54yNei2VVbqARMOlAo,5058
+scipy/sparse/_index.py,sha256=iCFt5cKBZF2J2e6DSjwtpW7LKv4feFMTaz0p5ujgX5o,18216
+scipy/sparse/_lil.py,sha256=tY9AM6oiyYrqPbeYmXjOgq3JGzlvLmxcH6F89-gmbYQ,20889
+scipy/sparse/_matrix.py,sha256=e57TxL-4_ZNCWWwW4GdwYmY2fplQQCQqhpBheJn-XRk,5022
+scipy/sparse/_matrix_io.py,sha256=N086rQFxa4_RUXaxSwPojMk1yzRxrq5MqpCd08jy-_E,6241
+scipy/sparse/_sparsetools.cpython-312-darwin.so,sha256=tkXIvZWupgo8w3xdCpWSemfC7-0gtXS3e0FDGw_lANY,3614784
+scipy/sparse/_spfuncs.py,sha256=lDVTp6CiQIuMxTfSzOi3-k6p97ayXJxdKPTf7j_4GWc,1987
+scipy/sparse/_sputils.py,sha256=sc3DLX5J-rWt1-wU8IWDISdRhuCDNi5swmKPb-9aZB8,21095
+scipy/sparse/base.py,sha256=Kyn-S8HXKVlf_mHMGhcxbnLYqFyZpx5ydS707bnOhDM,609
+scipy/sparse/bsr.py,sha256=M_uhxnBwHnh0p4C7xE8tj82PiXATa4_gHIfOvLyh3gg,561
+scipy/sparse/compressed.py,sha256=lyEi-UD6ygcufeIqRBHpGfjVckp-vIlojYBjfnLc7Us,550
+scipy/sparse/construct.py,sha256=vfz2WK4r2bviiKZSUiIsfdDFDu9osyFlXF8ZsxSAn3E,812
+scipy/sparse/coo.py,sha256=ui1P-vcbPnLArYHxLWO06N1KFsCfw-CD6TWz_YSQ8-k,592
+scipy/sparse/csc.py,sha256=X9TL9GN1YtbJluM0Iq9_cDyDQBACYlJ7MToGQomvKOA,561
+scipy/sparse/csgraph/__init__.py,sha256=znrEd48JFLdlcevl8IFDSM104Yl1YvXC0O_f8OUWATs,7842
+scipy/sparse/csgraph/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/csgraph/__pycache__/_laplacian.cpython-312.pyc,,
+scipy/sparse/csgraph/__pycache__/_validation.cpython-312.pyc,,
+scipy/sparse/csgraph/_flow.cpython-312-darwin.so,sha256=pznFHFBKPF0glzGJY96wfOUNqIz-2STFb0F2f7IugDU,165944
+scipy/sparse/csgraph/_laplacian.py,sha256=bpCduRWjIhcDpclvPbftx74PExTiW0P3EE6_Ztiop1Y,18273
+scipy/sparse/csgraph/_matching.cpython-312-darwin.so,sha256=gl1bvWg82gocGJYrty2GPVXPjBSnpP-NDAtpB24KXyQ,164928
+scipy/sparse/csgraph/_min_spanning_tree.cpython-312-darwin.so,sha256=z8OG_Y3PtoyZZgkYqFUL_Qr1ePdDVUxzCqhtbds4Yes,114216
+scipy/sparse/csgraph/_reordering.cpython-312-darwin.so,sha256=kkxJPe6b_SYd0BIJTkhK7pHBJ0t33MwqG-kxe3G7SAk,149904
+scipy/sparse/csgraph/_shortest_path.cpython-312-darwin.so,sha256=jGCFW89cRUChgw9V_-bas9diVF0j0EXypxUekHwvF4g,346280
+scipy/sparse/csgraph/_tools.cpython-312-darwin.so,sha256=ooDxkUVdLG3VVLv5mLLUKuu1njQfoeHKU2dxRRTBnh0,164800
+scipy/sparse/csgraph/_traversal.cpython-312-darwin.so,sha256=YVIkrgDG-jICnoWgwPg9b3wNh-ee1p_NFjgr_F7Vlpg,286128
+scipy/sparse/csgraph/_validation.py,sha256=SxINtd4jYyH0YWdzspr8JR0syZfO3nMj7C60GWBUr6k,2629
+scipy/sparse/csgraph/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/csgraph/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_connected_components.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_conversions.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_flow.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_graph_laplacian.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_matching.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_pydata_sparse.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_reordering.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_shortest_path.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_spanning_tree.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/__pycache__/test_traversal.cpython-312.pyc,,
+scipy/sparse/csgraph/tests/test_connected_components.py,sha256=a2HZjm7HsC0STqiDnhN6OJL4yIMcM28VNVtMXDI2BqE,3948
+scipy/sparse/csgraph/tests/test_conversions.py,sha256=3n2UJ_rwdcTkD8NfwDrk-8UBplJkqMFw12yPIwX9-R8,1854
+scipy/sparse/csgraph/tests/test_flow.py,sha256=I7csygtef5f6Uv67t2y3UZsln8Gg4eS1RE5zr7Xm-Eg,7718
+scipy/sparse/csgraph/tests/test_graph_laplacian.py,sha256=dG9JNNCgU4O6Y3xrV26IWcLV-Rn2TOe0PGCfkv_jGiM,10952
+scipy/sparse/csgraph/tests/test_matching.py,sha256=s5tq96kG0DojkE_8ZqaP9olNv5yPYYNypG2Si3Z-Qps,12367
+scipy/sparse/csgraph/tests/test_pydata_sparse.py,sha256=GSv9fe0hPROU8yynAf2m6WO9JC2yyY1aLSXxd7_eiR8,4967
+scipy/sparse/csgraph/tests/test_reordering.py,sha256=_WNqdGcU-WNhQRpjCq4Nhp8YY6cmVKb13au5sJPpzig,2569
+scipy/sparse/csgraph/tests/test_shortest_path.py,sha256=nSP2dAcf4iDg-HsmcDWHLbq0KLjg1sM-La1tVTOT7Sc,18744
+scipy/sparse/csgraph/tests/test_spanning_tree.py,sha256=q4LYiXxfwWUc1io4vRVBr9uxMacfdefPvcRlb3TOEnw,2164
+scipy/sparse/csgraph/tests/test_traversal.py,sha256=7ma9viR6P2FecuWbZVt1kDXvbuHS6WTp1na9uBHKOBE,6212
+scipy/sparse/csr.py,sha256=MaN7K1B7ejJdKlpOZhrkP5YcBVxVPYk_io4okYc_koQ,561
+scipy/sparse/data.py,sha256=R-tvadwaAxifKWzzxhz0awKv2OA89AduDenjz1B2Z1A,504
+scipy/sparse/dia.py,sha256=KsOmYg5wsX-kOKM_vaarB_3LpeZo0eo1qC1UdsiBEnE,561
+scipy/sparse/dok.py,sha256=ki_m850wPAbA8w3qxkXqAWIDo5p2h5cU14c7Pg9PNos,561
+scipy/sparse/extract.py,sha256=6qT2PNOilsEhDWl6MhmgpveIuQr4QCs3LATwIrBroOQ,567
+scipy/sparse/lil.py,sha256=Gve3XHYPYZavcUPJz1TSOhjv6AtPpkKBHTzCK6FG8ek,562
+scipy/sparse/linalg/__init__.py,sha256=EuUOCB6Y1PFw1_vTfc7F5eMdCOMQcLwO7igl0_Qymik,4228
+scipy/sparse/linalg/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_expm_multiply.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_funm_multiply_krylov.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_interface.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_matfuncs.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_norm.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_onenormest.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_special_sparse_arrays.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/_svdp.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/dsolve.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/eigen.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/interface.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/isolve.cpython-312.pyc,,
+scipy/sparse/linalg/__pycache__/matfuncs.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/__init__.py,sha256=PIX7n_d0LOMZZZ65Dz4Mgz9trjKGB2kLaF16PQLkAIs,2039
+scipy/sparse/linalg/_dsolve/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/__pycache__/_add_newdocs.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/__pycache__/linsolve.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/_add_newdocs.py,sha256=4Nm6RAKQlKI4lQt4z20v0D6m0Vk8eqp0mIzEk5gfztA,3743
+scipy/sparse/linalg/_dsolve/_superlu.cpython-312-darwin.so,sha256=B9qXg_igsnxKiVOYHKxMulq0LA88O-W_96Cd1XJaeNY,280960
+scipy/sparse/linalg/_dsolve/linsolve.py,sha256=qJAUlWLwmhnwdw2R7lBX7LEGj2vxiKvS0aeRlsFb84g,31328
+scipy/sparse/linalg/_dsolve/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/_dsolve/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/tests/__pycache__/test_linsolve.cpython-312.pyc,,
+scipy/sparse/linalg/_dsolve/tests/test_linsolve.py,sha256=GE1am6F-Key7jQJePQd8-BrIo3sV4V-NJ2bqye7Gx34,34644
+scipy/sparse/linalg/_eigen/__init__.py,sha256=SwNho3iWZu_lJvcdSomA5cQdcDU8gocKbmRnm6Bf9-0,460
+scipy/sparse/linalg/_eigen/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/__pycache__/_svds.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/__pycache__/_svds_doc.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/_svds.py,sha256=WYY_AfAMJgN3dD8ONPHjjF-gmWa904fv_lcxLmmnFx4,20203
+scipy/sparse/linalg/_eigen/_svds_doc.py,sha256=0_sC8kKbu3b5BYpGl16sPLrZu6mDxiFhj8xkbG2w5-U,15003
+scipy/sparse/linalg/_eigen/arpack/__init__.py,sha256=zDxf9LokyPitn3_0d-PUXoBCh6tWK0eUSvsAj6nkXI0,562
+scipy/sparse/linalg/_eigen/arpack/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/arpack/__pycache__/arpack.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/arpack/_arpacklib.cpython-312-darwin.so,sha256=zXucH7HWoVPgOAr55eIiKmwuYSecKFlyryTDVu5KAAo,179168
+scipy/sparse/linalg/_eigen/arpack/arpack.py,sha256=yhNKU-iSw4ZNQJugnh5KFdAP_o5615EAT8Sf-3doy_A,69630
+scipy/sparse/linalg/_eigen/arpack/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/_eigen/arpack/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/arpack/tests/__pycache__/test_arpack.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py,sha256=f4rFTKIhuZb3IaYe3eJc6cv05lMyHnp475qxyNFnzMI,24666
+scipy/sparse/linalg/_eigen/lobpcg/__init__.py,sha256=E5JEPRoVz-TaLrj_rPm5LP3jCwei4XD-RxbcxYwf5lM,420
+scipy/sparse/linalg/_eigen/lobpcg/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/lobpcg/__pycache__/lobpcg.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py,sha256=J4nV8lQWq-sn41FeCUjXQTtk4kH0RbChmuOruFbLTDg,41937
+scipy/sparse/linalg/_eigen/lobpcg/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/_eigen/lobpcg/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/lobpcg/tests/__pycache__/test_lobpcg.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py,sha256=SQtxbX6z9bCks9AXkdYYbg6w-zZ8hjljNNfB6kEz-uo,27547
+scipy/sparse/linalg/_eigen/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/_eigen/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/tests/__pycache__/test_svds.cpython-312.pyc,,
+scipy/sparse/linalg/_eigen/tests/test_svds.py,sha256=jutn53fesaMNiNMI6Xi29mHZJPNP3NxO4jNi0P2Cxfs,36616
+scipy/sparse/linalg/_expm_multiply.py,sha256=KOSuV2qF4OSKrLGSwUAFT1ibnv4bhU9JBFJkvy9AVXY,26491
+scipy/sparse/linalg/_funm_multiply_krylov.py,sha256=5h4viKrFkBrpK4zV-gOdCquAKVc3zuQWvhzgWkuluXU,12194
+scipy/sparse/linalg/_interface.py,sha256=7o0WNoCL7X6CKy2DxkvYkOX1X_JTAmvaTtPKfp-gQwA,29583
+scipy/sparse/linalg/_isolve/__init__.py,sha256=Z_eQUYbe6RWMSNi09T9TfPEWm8RsVxcIKYAlihM-U-c,479
+scipy/sparse/linalg/_isolve/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/_gcrotmk.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/iterative.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/lgmres.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/lsmr.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/lsqr.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/minres.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/tfqmr.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/__pycache__/utils.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/_gcrotmk.py,sha256=C6CIO3qXgmCod_AmV3ErdIDrymYCx5_tbqhb0ZwdDa8,15746
+scipy/sparse/linalg/_isolve/iterative.py,sha256=-des4DKVAA17GnbdEiKSCJCKWRQLdBZp6WG2lzMRDo8,33423
+scipy/sparse/linalg/_isolve/lgmres.py,sha256=4o_BMPrhyjXHH6HABhkU8jpEjVDQPaAzdLrdAFZZTxw,8623
+scipy/sparse/linalg/_isolve/lsmr.py,sha256=8MRtv-FJa7nOHlJ7MZ4TsQiWAkZwntD0r55SOQuRqvI,15650
+scipy/sparse/linalg/_isolve/lsqr.py,sha256=Ca2SjyNwMFXSckUTW_LqYFkFc5CWOaZ1yiYB0tK2uB8,21322
+scipy/sparse/linalg/_isolve/minres.py,sha256=akSoJYFPE5no3XPZrkIpdY8DEVLKdf8XCmmN_6zceCE,10862
+scipy/sparse/linalg/_isolve/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/_isolve/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_gcrotmk.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_iterative.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_lgmres.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_lsmr.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_lsqr.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_minres.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/__pycache__/test_utils.cpython-312.pyc,,
+scipy/sparse/linalg/_isolve/tests/test_gcrotmk.py,sha256=3V-JDPsjIsCce7P06cBZJU0LEK3ioBmD0KSezcOBvQY,6069
+scipy/sparse/linalg/_isolve/tests/test_iterative.py,sha256=bEPFrmwNp8UwLpP2nSwH-lKy2YY98Ac7B6FWj6E51hI,26265
+scipy/sparse/linalg/_isolve/tests/test_lgmres.py,sha256=nUWVBNX-e5fo2abWW-0DzNPvxWW7us4IJUWe8k1jjZk,7695
+scipy/sparse/linalg/_isolve/tests/test_lsmr.py,sha256=6D3aZELcgJrp3Qf_HisAIowcwxnCzAiCfTf77YNsbrg,6362
+scipy/sparse/linalg/_isolve/tests/test_lsqr.py,sha256=tYKtlTuXMYYHvfpmrhdCqlzk0BIyohl2b-4b0SA6nBg,3759
+scipy/sparse/linalg/_isolve/tests/test_minres.py,sha256=d_rLkqdObBDD4FBpTOYgzwysTqBtYjgV5v1IDLhyr-8,2434
+scipy/sparse/linalg/_isolve/tests/test_utils.py,sha256=VlmvctRaQtjuYvQuoe2t2ufib74Tua_7qsiVrs3j-p0,265
+scipy/sparse/linalg/_isolve/tfqmr.py,sha256=c8zWhLGlxrY2fUhZReBTqz-Bm274ds97nES19sylkXs,6161
+scipy/sparse/linalg/_isolve/utils.py,sha256=o3T9hbZOk0XXz36AfmTM1KLFHry29atMCldJ1WoZx_k,3387
+scipy/sparse/linalg/_matfuncs.py,sha256=O5I5AmSCVoPzdhBMNzmjxoeCOmO8dN57zTfJbbV5GWo,29338
+scipy/sparse/linalg/_norm.py,sha256=86KekAh-FaTPKywik6NdU3N7n8dgly5CaaTjGzoOiw0,6120
+scipy/sparse/linalg/_onenormest.py,sha256=43iH6jN2r_kiSvZuOw1AhXyETGihtkA99b0wGMGqexc,15482
+scipy/sparse/linalg/_propack.cpython-312-darwin.so,sha256=oDJzvqivzqQhDXBVd44S4ft0cvL8zKEJCFnYHpJto44,140112
+scipy/sparse/linalg/_special_sparse_arrays.py,sha256=NCu2AF3oV3s47KHPX2qgzc3IQQPs1a9RAX9xuHRHLxk,34361
+scipy/sparse/linalg/_svdp.py,sha256=tTZEFaCdqUlvJQ1Nw9CHuO5XV_1949yhIwLqAzbp6so,10352
+scipy/sparse/linalg/dsolve.py,sha256=fvCzVUda-h-WzwGWDss4FVuv6TVE-OKHzARBlUCDIJw,654
+scipy/sparse/linalg/eigen.py,sha256=4BTo8Tc9SNQaruyrF4gRdFE5NstiA0XH9I44IyikZQ4,626
+scipy/sparse/linalg/interface.py,sha256=_KXBkGhZWvY_ZmGixqWMZe6J64bCPdjtrqr63HvicUI,573
+scipy/sparse/linalg/isolve.py,sha256=diSAxpbYg8PeH75QOEE-CREO8p39f4BZK2dGynJDKIc,649
+scipy/sparse/linalg/matfuncs.py,sha256=H2qJl4ZZqZ4bI-E9NCbu1oFfto0EdFxCTKTugMPHRHg,570
+scipy/sparse/linalg/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/linalg/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_expm_multiply.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_funm_multiply_krylov.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_interface.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_matfuncs.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_norm.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_onenormest.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_propack.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_pydata_sparse.cpython-312.pyc,,
+scipy/sparse/linalg/tests/__pycache__/test_special_sparse_arrays.cpython-312.pyc,,
+scipy/sparse/linalg/tests/propack_test_data.npz,sha256=v-NNmpI1Pgj0APODcTblU6jpHUQRhpE9ObWb-KYnu6M,600350
+scipy/sparse/linalg/tests/test_expm_multiply.py,sha256=0I8iDdswxJAgbDzbvRn9rKdWdPUTQJ2yNVaEjHr_MlI,15000
+scipy/sparse/linalg/tests/test_funm_multiply_krylov.py,sha256=Rs1i_fsV3rU4foz-cfXg1y2cBcOSztVo3wMYAQ4XULs,7289
+scipy/sparse/linalg/tests/test_interface.py,sha256=0_zkLOLDLRRDrHXkAifj8i2762BOOKA0HRi1jWwSE7g,21059
+scipy/sparse/linalg/tests/test_matfuncs.py,sha256=guVhj5UAU8Cz9NdlW4sgt12xKlQAljtMIe4As3Y5F5M,22021
+scipy/sparse/linalg/tests/test_norm.py,sha256=PRLnvUFHt7m6RjbBVhAh5npEy6biEUmfhSVMppxy7Mg,6504
+scipy/sparse/linalg/tests/test_onenormest.py,sha256=8fAgd2Fc5nRVf9sCB-AdhmTGIt4rxSCOIObBF7YJpDc,9300
+scipy/sparse/linalg/tests/test_propack.py,sha256=nIiJNNiC72dAHMWSvOqrH2AsbM5pp2RbRHa5pJGtHqc,7453
+scipy/sparse/linalg/tests/test_pydata_sparse.py,sha256=eawVssB3pRqxRmfzoHAVY7xvJU-Flo7JYsnoxhr76Mw,7302
+scipy/sparse/linalg/tests/test_special_sparse_arrays.py,sha256=Ql1D3db_Wv9A5Wkwbsqg4401slLeEy9-mQoeCMhLxas,13105
+scipy/sparse/sparsetools.py,sha256=pCcuyQYvIahrvr43V398XHyqwcGtWCPLFH6n1uSYmB8,516
+scipy/sparse/spfuncs.py,sha256=TWpfkZk3JErNajVFUH5B85d3r6UuSv0Rsx0lMtUSac0,508
+scipy/sparse/sputils.py,sha256=PsqT7RUmiO8ph5jG8GHYmPbacDQFljjc0SL7RMxweJU,508
+scipy/sparse/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/sparse/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_64bit.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_arithmetic1d.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_array_api.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_base.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_common1d.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_construct.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_coo.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_csc.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_csr.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_dok.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_extract.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_indexing1d.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_matrix_io.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_minmax1d.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_sparsetools.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_spfuncs.cpython-312.pyc,,
+scipy/sparse/tests/__pycache__/test_sputils.cpython-312.pyc,,
+scipy/sparse/tests/data/csc_py2.npz,sha256=usJ_Gj6x_dEC2uObfdYc6D6C8JY4jjROFChQcZhNAfo,846
+scipy/sparse/tests/data/csc_py3.npz,sha256=axuEMVxwd0F-cgUS0IalpiF8KHW4GNJ3BK6bcjfGnf4,851
+scipy/sparse/tests/test_64bit.py,sha256=HmeclVZ44TexUrlNkhB8PnYE46PFkiHxMv-h8K_BvwU,12975
+scipy/sparse/tests/test_arithmetic1d.py,sha256=4woi2qefAsFXR94Tjj_rlvOfdI-e_Vl6wGAFFw01HkI,11984
+scipy/sparse/tests/test_array_api.py,sha256=0Fkb7wZ1D7xZ0HK-FjAhjCFz406WCHWVSB_6vhmrMaI,14186
+scipy/sparse/tests/test_base.py,sha256=kqI4wxWt1a0o3gu3KEcyelW7pJnvq1FbrqkcFF1P0BU,224450
+scipy/sparse/tests/test_common1d.py,sha256=j_gxMwdHb-naLk9OZ9PYexfOJcqswmVtvCs7Vdy9sG4,15653
+scipy/sparse/tests/test_construct.py,sha256=Lw940_bqQb0yqIwr_XTftDYVlViP9rWNQKW6sHGgZxE,50069
+scipy/sparse/tests/test_coo.py,sha256=Fu3rUCREs1csbvdyL1NK6yen72kc_2iV2UnUonzQaps,48368
+scipy/sparse/tests/test_csc.py,sha256=qq-0sTMsKz6_xqPJX-eyYPxvXy0zCgSAP7W_8iXpu_4,4313
+scipy/sparse/tests/test_csr.py,sha256=4Wf_pjkWg1J6ybR_k-rAgsPrGklcea9XGefqdCY9JRA,8239
+scipy/sparse/tests/test_dok.py,sha256=MsDKnAvVsLgcnXOxnxBXYPZzEwK_qFBIOm8n-_YIDY4,6630
+scipy/sparse/tests/test_extract.py,sha256=4qUPrtCv9H7xd-c9Xs51seQCiIlK45n-9ZEVTDuPiv8,1685
+scipy/sparse/tests/test_indexing1d.py,sha256=g_VZO2iFmMz_Yq8AZILOKW3RdRFt6YS67rMLB4ZdT4I,21067
+scipy/sparse/tests/test_matrix_io.py,sha256=AQ3n2MZ7gOCtpiLJn7YdBCMy_tW5LD9jMxJDYqAFWSM,3867
+scipy/sparse/tests/test_minmax1d.py,sha256=UBeHcN4Pw_VAPXtgsyDev5pK3eXvisiiLjibeaiA8S0,4269
+scipy/sparse/tests/test_sparsetools.py,sha256=S5i2-h98qETawJxE_SRGWvhE4dtA8qMwQ9FplpAnAPg,10613
+scipy/sparse/tests/test_spfuncs.py,sha256=ECs34sgYYhTBWe4hIkx357obH2lLsnJWkh7TfacjThw,3258
+scipy/sparse/tests/test_sputils.py,sha256=RXx_xjrYf0xOUyd6AeeKy4UoeHS3kHxna_2ZXiHGYQs,16486
+scipy/spatial/__init__.py,sha256=ibMwKsyOAIbikHD1p19v7NaYSMYQZEU7kN6Hahc7sZs,3752
+scipy/spatial/__pycache__/__init__.cpython-312.pyc,,
+scipy/spatial/__pycache__/_geometric_slerp.cpython-312.pyc,,
+scipy/spatial/__pycache__/_kdtree.cpython-312.pyc,,
+scipy/spatial/__pycache__/_plotutils.cpython-312.pyc,,
+scipy/spatial/__pycache__/_procrustes.cpython-312.pyc,,
+scipy/spatial/__pycache__/_spherical_voronoi.cpython-312.pyc,,
+scipy/spatial/__pycache__/ckdtree.cpython-312.pyc,,
+scipy/spatial/__pycache__/distance.cpython-312.pyc,,
+scipy/spatial/__pycache__/kdtree.cpython-312.pyc,,
+scipy/spatial/__pycache__/qhull.cpython-312.pyc,,
+scipy/spatial/_ckdtree.cpython-312-darwin.so,sha256=J_0IBbTCJ511rgTWcrE9b70FqL-5D_5xpNZz1Xldy00,514688
+scipy/spatial/_distance_pybind.cpython-312-darwin.so,sha256=zzERrxHyGwABLVzWKtcqZMq1FM3jDVP2zsZS9caY6Uk,562536
+scipy/spatial/_distance_wrap.cpython-312-darwin.so,sha256=obOAMQUcG24wF8_mQK0h_AkiBwjcvq5ZlRclCZ1-_-A,104408
+scipy/spatial/_geometric_slerp.py,sha256=Ohc2AeoQWv8rgIJUIO9Il5U6XBj_L772G6hYLzQiPoM,8619
+scipy/spatial/_hausdorff.cpython-312-darwin.so,sha256=FjJVhW-Y8qtyQQ54BXVwZ63iQQTguKNoiHJUepyU3BY,96912
+scipy/spatial/_kdtree.py,sha256=I13ZRpOfKrAQjvPQoCiAGxjgEI1wQvyOOzsmMUkZkjg,33717
+scipy/spatial/_plotutils.py,sha256=pIBD6vxSfXl_tiFdm7fmuOoNHe57Zfr6KkeQqhgsTtA,7067
+scipy/spatial/_procrustes.py,sha256=qvhHPHt_OIKo-ge_k19S4VWqbP6ZgMXLVnNey0JxTb8,4427
+scipy/spatial/_qhull.cpython-312-darwin.so,sha256=vSJUCXnxbqoPWDo4uvYEl7A6PNcjvoWGm6sEbPvnUcY,720832
+scipy/spatial/_qhull.pyi,sha256=ofIDWfFY8M45z00uD1TmBDVTKyK2GJfoWIbdjmf4X0c,5954
+scipy/spatial/_spherical_voronoi.py,sha256=LWK3B_hM8JNeqBvoSnrDsufaYYlJDHtmQv3cOCl5T4Q,13518
+scipy/spatial/_voronoi.cpython-312-darwin.so,sha256=EOddSrzOtJPlwOzhKwl8feFFcs7jqLTxidWC6OU38G8,96576
+scipy/spatial/_voronoi.pyi,sha256=aAOiF4fvHz18hmuSjieKkRItssD443p2_w1ggXOIs1g,126
+scipy/spatial/ckdtree.py,sha256=0IssUT415ieBOJuvfZJxIra-TeYyd0KxDGLrXDZ_GGw,523
+scipy/spatial/distance.py,sha256=TXEaNg05WK-sG6zgr7ddKxbRxtwDRjakXHF8C4o8FuE,91845
+scipy/spatial/distance.pyi,sha256=T_hhLNuJ0TXEykdpgg6mxnQJYW0wggVMBJ5ZrTXbbx0,5007
+scipy/spatial/kdtree.py,sha256=ZYJL8A_WpLyEH29aFQGLbxd9ttFdGBgdglbgAfsvhz8,636
+scipy/spatial/qhull.py,sha256=aFE-KscuINt6QIhFC2dqhwFCYu3HSBkVXDH5exHH71s,622
+scipy/spatial/qhull_src/COPYING_QHULL.txt,sha256=EG1VyTH9aoSCLlNF2QAnPQWfHCcxDQJWfMsxPF0YxV0,1720
+scipy/spatial/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/spatial/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test__plotutils.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test__procrustes.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_distance.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_hausdorff.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_kdtree.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_qhull.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_slerp.cpython-312.pyc,,
+scipy/spatial/tests/__pycache__/test_spherical_voronoi.cpython-312.pyc,,
+scipy/spatial/tests/data/cdist-X1.txt,sha256=ULnYAgX2_AwOVF-VE7XfnW5S0pzhx7UAoocxSnXMaWs,5750
+scipy/spatial/tests/data/cdist-X2.txt,sha256=_IJVjXsp3pvd8NNPNTLmVbHOrzl_RiEXz7cb86NfvZ4,11500
+scipy/spatial/tests/data/degenerate_pointset.npz,sha256=BIq8Hd2SS_LU0fIWAVVS7ZQx-emVRvvzgnaO2lh4gXU,22548
+scipy/spatial/tests/data/iris.txt,sha256=k19QSfkqhMmByqNMzwWDmM6wf5dt6whdGyfAyUO3AW0,15000
+scipy/spatial/tests/data/pdist-boolean-inp.txt,sha256=5Z9SMsXrtmzeUwJlVmGkrPDC_Km7nVpZIbBl7p3Hdc0,50000
+scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt,sha256=Yerj1wqIzcdyULlha-q02WBNGyS2Q5o2wAr0XVEkzis,178801
+scipy/spatial/tests/data/pdist-chebyshev-ml.txt,sha256=NEd2b-DONqUMV9f8gJ2yod17C_5fXGHHZ38PeFsXkyw,3041
+scipy/spatial/tests/data/pdist-cityblock-ml-iris.txt,sha256=UCWZJeMkMajbpjeG0FW60b0q-4r1geAyguNY6Chx5bM,178801
+scipy/spatial/tests/data/pdist-cityblock-ml.txt,sha256=8Iq7cF8oMJjpqd6qsDt_mKPQK0T8Ldot2P8C5rgbGIU,3041
+scipy/spatial/tests/data/pdist-correlation-ml-iris.txt,sha256=l2kEAu0Pm3OsFJsQtHf9Qdy5jnnoOu1v3MooBISnjP0,178801
+scipy/spatial/tests/data/pdist-correlation-ml.txt,sha256=S4GY3z-rf_BGuHmsnColMvR8KwYDyE9lqEbYT_a3Qag,3041
+scipy/spatial/tests/data/pdist-cosine-ml-iris.txt,sha256=hQzzoZrmw9OXAbqkxC8eTFXtJZrbFzMgcWMLbJlOv7U,178801
+scipy/spatial/tests/data/pdist-cosine-ml.txt,sha256=P92Tm6Ie8xg4jGSP7k7bmFRAP5MfxtVR_KacS73a6PI,3041
+scipy/spatial/tests/data/pdist-double-inp.txt,sha256=0Sx5yL8D8pyYDXTIBZAoTiSsRpG_eJz8uD2ttVrklhU,50000
+scipy/spatial/tests/data/pdist-euclidean-ml-iris.txt,sha256=3-UwBM7WZa4aCgmW_ZAdRSq8KYMq2gnkIUqU73Z0OLI,178801
+scipy/spatial/tests/data/pdist-euclidean-ml.txt,sha256=rkQA2-_d7uByKmw003lFXbXNDjHrUGBplZ8nB_TU5pk,3041
+scipy/spatial/tests/data/pdist-hamming-ml.txt,sha256=IAYroplsdz6n7PZ-vIMIJ4FjG9jC1OSxc3-oVJdSFDM,3041
+scipy/spatial/tests/data/pdist-jaccard-ml.txt,sha256=Zb42SoVEnlTj_N_ndnym3_d4RNZWeHm290hTtpp_zO8,3041
+scipy/spatial/tests/data/pdist-jensenshannon-ml-iris.txt,sha256=L7STTmlRX-z-YvksmiAxEe1UoTmDnQ_lnAjZH53Szp0,172738
+scipy/spatial/tests/data/pdist-jensenshannon-ml.txt,sha256=-sZUikGMWskONojs6fJIMX8VEWpviYYg4u1vipY6Bak,2818
+scipy/spatial/tests/data/pdist-minkowski-3.2-ml-iris.txt,sha256=N5L5CxRT5yf_vq6pFjorJ09Sr-RcnrAlH-_F3kEsyUU,178801
+scipy/spatial/tests/data/pdist-minkowski-3.2-ml.txt,sha256=DRgzqxRtvQVzFnpFAjNC9TDNgRtk2ZRkWPyAaeOx3q4,3041
+scipy/spatial/tests/data/pdist-minkowski-5.8-ml-iris.txt,sha256=jz7SGKU8GuJWASH2u428QL9c-G_-8nZvOFSOUlMdCyA,178801
+scipy/spatial/tests/data/pdist-seuclidean-ml-iris.txt,sha256=37H01o6GibccR_hKIwwbWxGX0Tuxnb-4Qc6rmDxwwUI,178801
+scipy/spatial/tests/data/pdist-seuclidean-ml.txt,sha256=YmcI7LZ6i-Wg1wjAkLVX7fmxzCj621Pc5itO3PvCm_k,3041
+scipy/spatial/tests/data/pdist-spearman-ml.txt,sha256=IrtJmDQliv4lDZ_UUjkZNso3EZyu7pMACxMB-rvHUj0,3041
+scipy/spatial/tests/data/random-bool-data.txt,sha256=MHAQdE4hPVzgu-csVVbm1DNJ80dP7XthJ1kb2In8ImM,6000
+scipy/spatial/tests/data/random-double-data.txt,sha256=GA8hYrHsTBeS864GJf0X6JRTvGlbpM8P8sJairmfnBU,75000
+scipy/spatial/tests/data/random-int-data.txt,sha256=xTUbCgoT4X8nll3kXu7S9lv-eJzZtwewwm5lFepxkdQ,10266
+scipy/spatial/tests/data/random-uint-data.txt,sha256=8IPpXhwglxzinL5PcK-PEqleZRlNKdx3zCVMoDklyrY,8711
+scipy/spatial/tests/data/selfdual-4d-polytope.txt,sha256=rkVhIL1mupGuqDrw1a5QFaODzZkdoaLMbGI_DbLLTzM,480
+scipy/spatial/tests/test__plotutils.py,sha256=fASbg0i7iLiJIEj5vIkiDuTq3wU0z3mKJY019kzKrFk,3814
+scipy/spatial/tests/test__procrustes.py,sha256=wmmnUHRdw_oID0YLi404IEWPH6vEGhvHXSeGPY_idHo,4974
+scipy/spatial/tests/test_distance.py,sha256=TKpl3Yi3ylIwx4IM4SLFoDOv7MacSYxZhgaUbuEWqww,84726
+scipy/spatial/tests/test_hausdorff.py,sha256=XcDEzwFuOR9BaLegIj-DPp5GrAi_RsvcW8oGqJf0xkg,8217
+scipy/spatial/tests/test_kdtree.py,sha256=dlSaXMAIXFS73SMM2Vl9UPEe8Vtbyyiz69zmdb8ddYA,49340
+scipy/spatial/tests/test_qhull.py,sha256=sYXP8kiFuTTUkl3cV6Brl28VPJixLAphUnVnCwikuRc,50121
+scipy/spatial/tests/test_slerp.py,sha256=KMmqbcefISrTnzWAmY3IBDaJw13fnRXHddLsUKAn5Tk,18455
+scipy/spatial/tests/test_spherical_voronoi.py,sha256=YCVSpO7-RrmKaAivwrLh5rZJ6CTTNKuIJ9iyhXsi178,14500
+scipy/spatial/transform/__init__.py,sha256=XqVBg4ekbA48c9r9A9xmdIkchyxy-nyLEYwGq71IXqQ,826
+scipy/spatial/transform/__pycache__/__init__.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rigid_transform.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rigid_transform_xp.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rotation.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rotation_groups.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rotation_spline.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/_rotation_xp.cpython-312.pyc,,
+scipy/spatial/transform/__pycache__/rotation.cpython-312.pyc,,
+scipy/spatial/transform/_rigid_transform.py,sha256=VgiBvCvGkgic2j8sli1CXnXiBsMrThmqTZ1bUWLxOqI,71755
+scipy/spatial/transform/_rigid_transform_cy.cpython-312-darwin.so,sha256=9X0X-2Dgy5__4BWo2AOtt-H2dt94QXmasJTUv0U2dhk,217832
+scipy/spatial/transform/_rigid_transform_xp.py,sha256=MUVmT_YCakUBPkhlLSLf_xASXAZdwcJUqttla31clZ4,16512
+scipy/spatial/transform/_rotation.py,sha256=zaL7DZPB16EDkV8stR3jR8YSxf6IUw6PnSys940BY1o,107354
+scipy/spatial/transform/_rotation_cy.cpython-312-darwin.so,sha256=9J5ybK8_34h4hO8h2IOZcyttfJZeeOUOZFEP4lRhhyg,408288
+scipy/spatial/transform/_rotation_groups.py,sha256=XS-9K6xYnnwWywMMYMVznBYc1-0DPhADHQp_FIT3_f8,4422
+scipy/spatial/transform/_rotation_spline.py,sha256=psUsaAMZZXk5g3Rgb7RSOIchYCFQbRGRB6suKbfU6KU,14244
+scipy/spatial/transform/_rotation_xp.py,sha256=rRlg8Ts9qHEBJDcIlvpt9UXpJ60wS7phYvRj84CDmLk,44173
+scipy/spatial/transform/rotation.py,sha256=co5Bpny89EfCywilEeeLDvJPESBLrSXTCCJqRlfdYzg,556
+scipy/spatial/transform/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/spatial/transform/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/spatial/transform/tests/__pycache__/test_rigid_transform.cpython-312.pyc,,
+scipy/spatial/transform/tests/__pycache__/test_rotation.cpython-312.pyc,,
+scipy/spatial/transform/tests/__pycache__/test_rotation_groups.cpython-312.pyc,,
+scipy/spatial/transform/tests/__pycache__/test_rotation_spline.cpython-312.pyc,,
+scipy/spatial/transform/tests/test_rigid_transform.py,sha256=bjG2EfhTmDfQeAug7KB9ZCrGnu2vR2egRuVbaZ1Z_sw,59088
+scipy/spatial/transform/tests/test_rotation.py,sha256=Ocq_0-Rf4Ece0ieyOeIeVblc84IT8nXuTKsm5WzHVcg,115498
+scipy/spatial/transform/tests/test_rotation_groups.py,sha256=qnG7kfzs5jDe0_nYxVycziOED3zSABZhxoInxNNCfr0,5552
+scipy/spatial/transform/tests/test_rotation_spline.py,sha256=9rcVmUBVFmRh9EbxkVwBFsT9LByg5H7-3YwaCs48sH4,5886
+scipy/special/__init__.pxd,sha256=l9Y21wnx5fZLvrxCeCMUWQvBI5gHx7LBhimDWptxke8,42
+scipy/special/__init__.py,sha256=McdMzKj59tjc4ZYNULnffrOsqy5qX2kyepgjuSIA_lY,31817
+scipy/special/__pycache__/__init__.cpython-312.pyc,,
+scipy/special/__pycache__/_add_newdocs.cpython-312.pyc,,
+scipy/special/__pycache__/_basic.cpython-312.pyc,,
+scipy/special/__pycache__/_ellip_harm.cpython-312.pyc,,
+scipy/special/__pycache__/_input_validation.cpython-312.pyc,,
+scipy/special/__pycache__/_lambertw.cpython-312.pyc,,
+scipy/special/__pycache__/_logsumexp.cpython-312.pyc,,
+scipy/special/__pycache__/_mptestutils.cpython-312.pyc,,
+scipy/special/__pycache__/_multiufuncs.cpython-312.pyc,,
+scipy/special/__pycache__/_orthogonal.cpython-312.pyc,,
+scipy/special/__pycache__/_sf_error.cpython-312.pyc,,
+scipy/special/__pycache__/_spfun_stats.cpython-312.pyc,,
+scipy/special/__pycache__/_spherical_bessel.cpython-312.pyc,,
+scipy/special/__pycache__/_support_alternative_backends.cpython-312.pyc,,
+scipy/special/__pycache__/_testutils.cpython-312.pyc,,
+scipy/special/__pycache__/add_newdocs.cpython-312.pyc,,
+scipy/special/__pycache__/basic.cpython-312.pyc,,
+scipy/special/__pycache__/orthogonal.cpython-312.pyc,,
+scipy/special/__pycache__/sf_error.cpython-312.pyc,,
+scipy/special/__pycache__/specfun.cpython-312.pyc,,
+scipy/special/__pycache__/spfun_stats.cpython-312.pyc,,
+scipy/special/_add_newdocs.py,sha256=n7TDHaYpYHp4AQjgZbGojnVT7p2ft3zSNc6Q0jMY_aY,240843
+scipy/special/_basic.py,sha256=juGtgyoRx-zgKMH00zFbov57-1ZQdZDH01bR5GmWJV8,105294
+scipy/special/_comb.cpython-312-darwin.so,sha256=VzH6-NPBBbVUGH8LnfBTcMvFqJSCnOKWyDqxCCbkUrA,77336
+scipy/special/_ellip_harm.py,sha256=Uc2sUQCDhYkkJg9a4nZozcTDTSjy_6ToTCQaJdIsMPc,5388
+scipy/special/_ellip_harm_2.cpython-312-darwin.so,sha256=JwpyVkRirUv3zPNMVTg059_kGUs55HavuNDi5vb94Bc,113088
+scipy/special/_gufuncs.cpython-312-darwin.so,sha256=CdchF2DaB5iL_nwzNWMbM4D0BcWTkcs4fn4A3oeyI3U,627808
+scipy/special/_input_validation.py,sha256=ZEwg_sZaesaqzaVA_btZQAi_uPXtIViL_u3Zms6UnyQ,474
+scipy/special/_lambertw.py,sha256=-oSEnHFQWZiUZXMamxPWjfntWq5tt0rzHmI13DxGHBY,3962
+scipy/special/_logsumexp.py,sha256=OVY91WVdm-0fL-kaLYTYTp3agX-x6kuoaZQQwecO4-E,14432
+scipy/special/_mptestutils.py,sha256=ocy_wBXqHGIg311jfjATEA8O29ICl4qPnvTgsmTm5qg,14441
+scipy/special/_multiufuncs.py,sha256=ZHubzJTgWfWre_BZCMiac4T11Xe999B7Q8Dv3mkSJw0,19402
+scipy/special/_orthogonal.py,sha256=YgvyTzMOGbf4qu-yvwduOg404uRNdMl7NkIXDpg_FDs,74770
+scipy/special/_orthogonal.pyi,sha256=85-bMpsnhRc-GeDoh02h6vDAiVSMU0tOOF0cpv1xIXY,8265
+scipy/special/_precompute/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/special/_precompute/__pycache__/__init__.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/cosine_cdf.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/expn_asy.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/gammainc_asy.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/gammainc_data.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/hyp2f1_data.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/lambertw.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/loggamma.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/struve_convergence.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/utils.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/wright_bessel.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/wright_bessel_data.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/wrightomega.cpython-312.pyc,,
+scipy/special/_precompute/__pycache__/zetac.cpython-312.pyc,,
+scipy/special/_precompute/cosine_cdf.py,sha256=ZGSeDDpLRsapyx2GbIrqqYR98fvaEQrLn7IE-fuodhE,354
+scipy/special/_precompute/expn_asy.py,sha256=JAz0hY1gBJu3Q_dvscQrSJdgKuwpjqFZVwz-sOQQ21w,1265
+scipy/special/_precompute/gammainc_asy.py,sha256=P5OFRcPkkpjGQeYCaMZ8SFSUmZG_CjrEHv8OLwgcGFc,2502
+scipy/special/_precompute/gammainc_data.py,sha256=jogxBuXLr3uEpMBvpqScDz5TzEEalksH8f-cRGzasck,4077
+scipy/special/_precompute/hyp2f1_data.py,sha256=STSBybQ2pCAu6sh8c9tiHsoDOgnisnSp4tkP2cK4MuI,14707
+scipy/special/_precompute/lambertw.py,sha256=7f4F3ivouVNZwuvVX8TAi2lPB7LirPS8IfN5lEw9zI0,1961
+scipy/special/_precompute/loggamma.py,sha256=iq7ZBrUmk8pXYZwO_wINI4u8ENsLbL9VUShGjGO0Pt0,1094
+scipy/special/_precompute/struve_convergence.py,sha256=z7R0Q5_Ye-EqLI9g-yARdl_j5FooofXMRXPLVrIFJQQ,3624
+scipy/special/_precompute/utils.py,sha256=JXJuI07Jlm4bDHJFVtj0jHq05p-V1ofeXZB16Y05kzI,887
+scipy/special/_precompute/wright_bessel.py,sha256=7z2W3spGANZO31r_xauMA6hIQ0eseRlXx-zJW6du5tU,12868
+scipy/special/_precompute/wright_bessel_data.py,sha256=f1id2Gk5TPyUmSt-Evhoq2_hfRgLUU7Qu_mELKtaXGg,5647
+scipy/special/_precompute/wrightomega.py,sha256=YpmLwtGJ4qazMDY0RXjhnQiuRAISI-Pr9MwKc7pZlhc,955
+scipy/special/_precompute/zetac.py,sha256=LmhJP7JFg7XktHvfm-DgzuiWZFtVdpvYzzLOB1ePG1Q,591
+scipy/special/_sf_error.py,sha256=q_Rbfkws1ttgTQKYLt6zFTdY6DFX2HajJe_lXiNWC0c,375
+scipy/special/_specfun.cpython-312-darwin.so,sha256=8uNdBsDqzn5Pa2DLQJ6NSyU9TJBt7H8MgUDnNJONtek,184176
+scipy/special/_special_ufuncs.cpython-312-darwin.so,sha256=02viwqrKdCAz1jqF21E0_GOdOrCm4rqYSK8qZSUNhmw,1130872
+scipy/special/_spfun_stats.py,sha256=f3cJO5OxyJVaC6_XE2cCKLVI2tQgOMBW8glk6OQRdr4,3870
+scipy/special/_spherical_bessel.py,sha256=Qh8ihvfYZfcyRuk54tGR77o78gkwhVHWKgG2EARuH5g,12457
+scipy/special/_support_alternative_backends.py,sha256=l2gLwt9dRHuvb9Kr60NtznC05Ver5-q2gRFdjRnhM9w,28223
+scipy/special/_test_internal.cpython-312-darwin.so,sha256=usEIk3ZZmxmKyqWv6rhnh3A-spI3aMUnU6_YfEpEVp0,96744
+scipy/special/_test_internal.pyi,sha256=cye6-VI7Jxvb4JDfa1R_f7slEDjYUUfM4edFZ_e0XiE,394
+scipy/special/_testutils.py,sha256=cvlrivMgy18oJqQKzEe3AdZbm4nRTACkC9kqg7wwgqw,11971
+scipy/special/_ufuncs.cpython-312-darwin.so,sha256=X_llzjtWD6fi9pAbZl5CuWVUAkpbMqJTx_f1vJXCE08,702944
+scipy/special/_ufuncs.pyi,sha256=ESwRdl7HOh9tTOlFp6zcqNQUDumfIPj1usUx0H773nY,8883
+scipy/special/_ufuncs.pyx,sha256=u3xZtu4a6r2f8AXa3UpauX1qWbv138lsHO4SVVM1L00,562124
+scipy/special/_ufuncs_cxx.cpython-312-darwin.so,sha256=UWrcpOcZkfCCu6uSefdiVKMEgGMO6ThuXCm78nKDy-o,1353776
+scipy/special/_ufuncs_cxx.pxd,sha256=iHoXu3i12I99u2UaqRJkhcjW-c0EK-5qOzlAd-xuGHA,5957
+scipy/special/_ufuncs_cxx.pyx,sha256=5ZPGyT93wtXSX6ligrZHgJTxfUjkSpU4s4Xh4k-BUVY,33231
+scipy/special/_ufuncs_cxx_defs.h,sha256=DpJ1C1qnXJH_qrhG_Rtpxw7lOQjCDzBsWs_skh6p22s,10296
+scipy/special/_ufuncs_defs.h,sha256=RpPf8Ex-DjoBTh9YGTbkUmQHzwOTkFnvT3naQzMOLYA,2829
+scipy/special/add_newdocs.py,sha256=Wnd-5R0wQAVxSolD4QY2CamTSbe1k48Aie3XaBWRKKc,436
+scipy/special/basic.py,sha256=_XJm4Y1lArjSQY14bZ93Deep6loN-kYMAJvGSf5ezFk,1546
+scipy/special/cython_special.cpython-312-darwin.so,sha256=aWgZJwul_5czwPir-JR01p87ASqlz9bMKF2iMglndyc,1696200
+scipy/special/cython_special.pxd,sha256=UrTdQIGs-2O6xKylRVk8vyvLM5ErxZh0ENhRc1kJoKw,16521
+scipy/special/cython_special.pyi,sha256=BQVUCzV8lCylnmLCtnN0Yz_ttlqyzcLc-BZx2KPXPzM,58
+scipy/special/orthogonal.py,sha256=aLzv7PzJgsdLpyTrV6Cu-rpHNHWlUAEqOImiW4fuzuE,1724
+scipy/special/sf_error.py,sha256=wOZqzX7iipkH39hOHqBlkmretJRbYy-K7PsnZPyaJFU,573
+scipy/special/specfun.py,sha256=vEn4jiJMvKiCXWiw_DdUqmyFbY6O_iYCFBTPaa6cLsg,552
+scipy/special/spfun_stats.py,sha256=ESJXGUwH7iijUk6aXZQVI1pnaWiVZ6_l0hVpC4bBSIw,535
+scipy/special/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/special/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_basic.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_bdtr.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_boost_ufuncs.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_boxcox.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_cdflib.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_cdft_asymptotic.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_cephes_intp_cast.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_cosine_distr.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_cython_special.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_data.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_dd.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_digamma.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_ellip_harm.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_erfinv.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_exponential_integrals.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_extending.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_faddeeva.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_gamma.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_gammainc.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_gen_harmonic.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_hyp2f1.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_hypergeometric.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_iv_ratio.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_kolmogorov.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_lambertw.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_legendre.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_log1mexp.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_loggamma.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_logit.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_logsumexp.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_mpmath.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_nan_inputs.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_ndtr.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_ndtri_exp.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_orthogonal.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_orthogonal_eval.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_owens_t.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_pcf.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_pdtr.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_powm1.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_precompute_expn_asy.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_precompute_gammainc.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_precompute_utils.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_round.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_sf_error.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_sici.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_specfun.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_spence.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_spfun_stats.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_sph_harm.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_spherical_bessel.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_support_alternative_backends.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_trig.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_ufunc_signatures.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_wright_bessel.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_wrightomega.cpython-312.pyc,,
+scipy/special/tests/__pycache__/test_zeta.cpython-312.pyc,,
+scipy/special/tests/_cython_examples/extending.pyx,sha256=0ISFhXHFnwuWXg5m9VIYdWGjP_W7hxUE8SwFNkvAM_s,292
+scipy/special/tests/_cython_examples/meson.build,sha256=7WUABNMPYujt2fmD4YNKqihhwaT9AaOs942x7ah0MWw,810
+scipy/special/tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/special/tests/data/__pycache__/__init__.cpython-312.pyc,,
+scipy/special/tests/data/boost.npz,sha256=V7XCtn7gHHQVNqrmrZ-PEoEGt_3_FSr889j3dLBkWEQ,1270643
+scipy/special/tests/data/gsl.npz,sha256=y_Gv3SeZmAanECeZEKLrL59_VZAzx-y3lt6qEMRP6zE,51433
+scipy/special/tests/data/local.npz,sha256=bCnljOgnCE-E258bupYEWmHOafHT6j18gop5wTPPiPI,203438
+scipy/special/tests/test_basic.py,sha256=W5UN7iHiTcw4wmtG758btqIMqYwR34rPgv5fYkH_3H4,200103
+scipy/special/tests/test_bdtr.py,sha256=YrexKxguZwJVkfOxDMfsVqtSkz-N6fkdifoO6qT3ddY,3289
+scipy/special/tests/test_boost_ufuncs.py,sha256=4cEmHpVVl5KQg0qZywhbcH5uYmsvZcnQT9RotJXhnGI,3023
+scipy/special/tests/test_boxcox.py,sha256=kuGjRgfLInydtbFRm-kvPBy2cJGsHFBmX14mrinu87Q,3263
+scipy/special/tests/test_cdflib.py,sha256=8LiinjJcp4t8fnf7P0Nii3177bP6QuA9Yo20h6ddkcg,32361
+scipy/special/tests/test_cdft_asymptotic.py,sha256=aj-Hawo0dShzdBRz2AfqGl6UJr9odNMcGISYTa-rpJw,1619
+scipy/special/tests/test_cephes_intp_cast.py,sha256=yllVoacRDDS_mH7E_pvDux_Jpf7_Fdt3F9Jsgj3_BaY,1129
+scipy/special/tests/test_cosine_distr.py,sha256=zL7aWLisIEy1oNKjcynqncgsCxcPKvPb9Odr-J5Xa1M,2690
+scipy/special/tests/test_cython_special.py,sha256=6Sdf1U9KGtM6T7aMJGfmtITlLYcFM7Szoq8NB1uJ5lA,19046
+scipy/special/tests/test_data.py,sha256=XQBpfKQiHwAkr_SRYumMaOEYgew7ptKUlxm_NWCuR7c,28349
+scipy/special/tests/test_dd.py,sha256=I7xSqxTD-GYaO0ol25ZjsGZgqCVt13vbcQlUN7teeG4,1564
+scipy/special/tests/test_digamma.py,sha256=Bm7Hh_aETx6MTN3Wu7Sijy4rYGR_1haNGsi3xfzrAKM,1382
+scipy/special/tests/test_ellip_harm.py,sha256=tBPBdZy7153UvgL4Y-AOUkG6pflmj9uNKAwG9-GG7GM,9969
+scipy/special/tests/test_erfinv.py,sha256=fzdEHd6MxfSyzQDO93qndXukG2jWj-XNY2X4BJRIdBI,3059
+scipy/special/tests/test_exponential_integrals.py,sha256=wMPTu9dK32cbtJWOouF1Dw2e0hjZSNxYtcQbVaWlDTk,3863
+scipy/special/tests/test_extending.py,sha256=7Q8NRxp-QBASTY9y0b8xOcAJmrMKhLaruE_MX7nmJ0M,1184
+scipy/special/tests/test_faddeeva.py,sha256=YLY3Ylp4u_8zxTGxOb5kxNfXXEW0ld_GP2ceOR2ev_Y,2568
+scipy/special/tests/test_gamma.py,sha256=hb-ZlA2ZNz6gUGvVtMBgXFl_w30HPmthuUEAmNcz0sw,258
+scipy/special/tests/test_gammainc.py,sha256=QdOylOmN2CY5cFw0BihCP-05x_d8q0Pitb7-a4DgSic,4441
+scipy/special/tests/test_gen_harmonic.py,sha256=ojbzW6yAV3HOhQhU6mubHduDVlXpkPq2pkdolip1Vsw,3110
+scipy/special/tests/test_hyp2f1.py,sha256=lvERrDZuLSA7tzVo8rzFuHSNCijGjBuDCDTktJVAcKE,92261
+scipy/special/tests/test_hypergeometric.py,sha256=DUDe1YvIXt4IocGlJuqDO5swZ-QOyR2Etj2rwkF-NqQ,9996
+scipy/special/tests/test_iv_ratio.py,sha256=6Wa4PDSboT1srHiGUOR78_cTvStWgct31cGkLFvDT5A,10108
+scipy/special/tests/test_kolmogorov.py,sha256=-Ika_ORUwxDuaCXATLb489T9lDWoPkJR7r7PNRAE0mE,19280
+scipy/special/tests/test_lambertw.py,sha256=KpUZJA3TDejEfeZ5uS2n6eg3R2V0GhGQj30Pl1UxnOk,4572
+scipy/special/tests/test_legendre.py,sha256=Ffh1KkDrAo4_A5rH-xO77Pty2cHiiKnLM1B1b302Rio,53044
+scipy/special/tests/test_log1mexp.py,sha256=Spw_PfKgjer3aNUEnYiZUaC-dpDwg0cqwsfFxNgYG1U,3142
+scipy/special/tests/test_loggamma.py,sha256=x6kuJf-bEnn5ECdkDSgvk3An_A-9UxVsZpqa49IwAq8,1992
+scipy/special/tests/test_logit.py,sha256=uCc4Cb7SrUAx01hMyryJIhfh5k0zEozmYhHHky32nwM,6470
+scipy/special/tests/test_logsumexp.py,sha256=jJ3Tb6XcS1VY82ItbuhdRaNRbhJzpKlwx_tp4KS1iTo,19333
+scipy/special/tests/test_mpmath.py,sha256=6wRvhLtr9k-Hqob0lCZtbjIPJ6JWglqYLLzfHCj476M,69311
+scipy/special/tests/test_nan_inputs.py,sha256=D6cWbrzU3Y_9JoqE7fcK43xZCQ3Roe-QxNeL6C6uEiQ,1956
+scipy/special/tests/test_ndtr.py,sha256=-UMxTIi4CaaLoJ5-SGW9THChPIM3e1_fTY0L877ioNA,2680
+scipy/special/tests/test_ndtri_exp.py,sha256=13eabgdbfcL37RReiUH7g9amT9XMsTLOfwxFJXR_2Ww,3708
+scipy/special/tests/test_orthogonal.py,sha256=4T2s9XGHC0JoPMm7LpWZhPwbZRhAtJmThov5RoKJyyc,32878
+scipy/special/tests/test_orthogonal_eval.py,sha256=qXkJZEAeXGhJw48PcnZ8ZS4-mWQG-MIuSVbvYoX7uvI,9576
+scipy/special/tests/test_owens_t.py,sha256=zRbiKje7KrYJ25f1ZuIBfiFSyNtK_bnkIW7dRETIqME,1792
+scipy/special/tests/test_pcf.py,sha256=RNjEWZGFS99DOGZkkPJ8HNqLULko8UkX0nEWFYX26NE,664
+scipy/special/tests/test_pdtr.py,sha256=jCxVZ7anMlXL9_duT1RdBbLqTATYBCRwM-2kA_wepKU,1366
+scipy/special/tests/test_powm1.py,sha256=9hZeiQVKqV63J5oguYXv_vqolpnJX2XRO1JN0ouLWAM,2276
+scipy/special/tests/test_precompute_expn_asy.py,sha256=bCQikPkWbxVUeimvo79ToVPgwaudzxGC7Av-hPBgIU4,583
+scipy/special/tests/test_precompute_gammainc.py,sha256=Kxlp5iX7R4iog69KygYf0gjrtuTXkUJZPvGe0nnhL6M,4620
+scipy/special/tests/test_precompute_utils.py,sha256=MOvdbLbzjN5Z1JQQgtIyjwjuIMPX4s2bTc_kxaX67wc,1165
+scipy/special/tests/test_round.py,sha256=Zv32kFQrDdOPawfGDeZo1PfBG4UsOyKfd3zjbCWLii0,511
+scipy/special/tests/test_sf_error.py,sha256=7-a7XxGX0sz1uZWrvkN5Ysakq8vDQh3Ms8LB7zvp5GU,4562
+scipy/special/tests/test_sici.py,sha256=w4anBf8fiq2fmkwMSz3MX0uy35NLXVqfuW3Fwt2Nqek,1227
+scipy/special/tests/test_specfun.py,sha256=q2JYEnqmUq78rO8no9hXQZ3fc3RuxPrRCcpsLruovDg,1687
+scipy/special/tests/test_spence.py,sha256=fChPw7xncNCTPMUGb0C8BC-lDKHWoEXSz8Rb4Wv8vNo,1099
+scipy/special/tests/test_spfun_stats.py,sha256=U3uHlpl52ApcHyfMSTrKr_va7MeYX44VrEm6fwjDfp4,2029
+scipy/special/tests/test_sph_harm.py,sha256=CG_mi1SuQspgkau2UXoYEjavScUShAWtVOcovGlKtDc,1780
+scipy/special/tests/test_spherical_bessel.py,sha256=U60jQUKB2twu2mMZhkhXBz6JjkOuy4G9WWHZwwg9GX4,15195
+scipy/special/tests/test_support_alternative_backends.py,sha256=ioB0bTH03xX0LXlOPi6TASwIp-LlcrP5sAStaO7q2mk,15680
+scipy/special/tests/test_trig.py,sha256=CKZr--vh4fwiW-ycJf5wODosKYhCpkNqvHfTArz-2K8,2400
+scipy/special/tests/test_ufunc_signatures.py,sha256=gU0cC-BdCbsIzXsO2I5OsX-nj6qfX9ZylSGlerXqq3E,1977
+scipy/special/tests/test_wright_bessel.py,sha256=6WHuXB97skPSsoMgXwRlO7bHydFLnl9iDfctEpZE0uE,7694
+scipy/special/tests/test_wrightomega.py,sha256=BW8TS_CuDjR7exA4l6ADnKhXwgFWUYaN1UIopMBJUZY,3560
+scipy/special/tests/test_zeta.py,sha256=IEPRUdSX5kerDYPmhLWYkYixmUg1ErqHSprQpfkZTP0,11549
+scipy/stats/__init__.py,sha256=A3BIn-F9daAkO8DvrzTL30BcnKeYQYtq7COITEafG3M,18839
+scipy/stats/__pycache__/__init__.cpython-312.pyc,,
+scipy/stats/__pycache__/_axis_nan_policy.cpython-312.pyc,,
+scipy/stats/__pycache__/_binned_statistic.cpython-312.pyc,,
+scipy/stats/__pycache__/_binomtest.cpython-312.pyc,,
+scipy/stats/__pycache__/_bws_test.cpython-312.pyc,,
+scipy/stats/__pycache__/_censored_data.cpython-312.pyc,,
+scipy/stats/__pycache__/_common.cpython-312.pyc,,
+scipy/stats/__pycache__/_constants.cpython-312.pyc,,
+scipy/stats/__pycache__/_continued_fraction.cpython-312.pyc,,
+scipy/stats/__pycache__/_continuous_distns.cpython-312.pyc,,
+scipy/stats/__pycache__/_correlation.cpython-312.pyc,,
+scipy/stats/__pycache__/_covariance.cpython-312.pyc,,
+scipy/stats/__pycache__/_crosstab.cpython-312.pyc,,
+scipy/stats/__pycache__/_discrete_distns.cpython-312.pyc,,
+scipy/stats/__pycache__/_distn_infrastructure.cpython-312.pyc,,
+scipy/stats/__pycache__/_distr_params.cpython-312.pyc,,
+scipy/stats/__pycache__/_distribution_infrastructure.cpython-312.pyc,,
+scipy/stats/__pycache__/_entropy.cpython-312.pyc,,
+scipy/stats/__pycache__/_finite_differences.cpython-312.pyc,,
+scipy/stats/__pycache__/_fit.cpython-312.pyc,,
+scipy/stats/__pycache__/_hypotests.cpython-312.pyc,,
+scipy/stats/__pycache__/_kde.cpython-312.pyc,,
+scipy/stats/__pycache__/_ksstats.cpython-312.pyc,,
+scipy/stats/__pycache__/_mannwhitneyu.cpython-312.pyc,,
+scipy/stats/__pycache__/_mgc.cpython-312.pyc,,
+scipy/stats/__pycache__/_morestats.cpython-312.pyc,,
+scipy/stats/__pycache__/_mstats_basic.cpython-312.pyc,,
+scipy/stats/__pycache__/_mstats_extras.cpython-312.pyc,,
+scipy/stats/__pycache__/_multicomp.cpython-312.pyc,,
+scipy/stats/__pycache__/_multivariate.cpython-312.pyc,,
+scipy/stats/__pycache__/_new_distributions.cpython-312.pyc,,
+scipy/stats/__pycache__/_odds_ratio.cpython-312.pyc,,
+scipy/stats/__pycache__/_page_trend_test.cpython-312.pyc,,
+scipy/stats/__pycache__/_probability_distribution.cpython-312.pyc,,
+scipy/stats/__pycache__/_qmc.cpython-312.pyc,,
+scipy/stats/__pycache__/_qmvnt.cpython-312.pyc,,
+scipy/stats/__pycache__/_quantile.cpython-312.pyc,,
+scipy/stats/__pycache__/_relative_risk.cpython-312.pyc,,
+scipy/stats/__pycache__/_resampling.cpython-312.pyc,,
+scipy/stats/__pycache__/_result_classes.cpython-312.pyc,,
+scipy/stats/__pycache__/_sampling.cpython-312.pyc,,
+scipy/stats/__pycache__/_sensitivity_analysis.cpython-312.pyc,,
+scipy/stats/__pycache__/_stats_mstats_common.cpython-312.pyc,,
+scipy/stats/__pycache__/_stats_py.cpython-312.pyc,,
+scipy/stats/__pycache__/_survival.cpython-312.pyc,,
+scipy/stats/__pycache__/_tukeylambda_stats.cpython-312.pyc,,
+scipy/stats/__pycache__/_variation.cpython-312.pyc,,
+scipy/stats/__pycache__/_warnings_errors.cpython-312.pyc,,
+scipy/stats/__pycache__/_wilcoxon.cpython-312.pyc,,
+scipy/stats/__pycache__/biasedurn.cpython-312.pyc,,
+scipy/stats/__pycache__/contingency.cpython-312.pyc,,
+scipy/stats/__pycache__/distributions.cpython-312.pyc,,
+scipy/stats/__pycache__/kde.cpython-312.pyc,,
+scipy/stats/__pycache__/morestats.cpython-312.pyc,,
+scipy/stats/__pycache__/mstats.cpython-312.pyc,,
+scipy/stats/__pycache__/mstats_basic.cpython-312.pyc,,
+scipy/stats/__pycache__/mstats_extras.cpython-312.pyc,,
+scipy/stats/__pycache__/mvn.cpython-312.pyc,,
+scipy/stats/__pycache__/qmc.cpython-312.pyc,,
+scipy/stats/__pycache__/sampling.cpython-312.pyc,,
+scipy/stats/__pycache__/stats.cpython-312.pyc,,
+scipy/stats/_ansari_swilk_statistics.cpython-312-darwin.so,sha256=yZMClQ17sFAhM-BTvRT3tnyf85_KxIgdEUAgoi7jflg,113776
+scipy/stats/_axis_nan_policy.py,sha256=-b0LKDi3lua8FRn8qHHm12rBtzCeJfsqttPPGDbbgQ8,32644
+scipy/stats/_biasedurn.cpython-312-darwin.so,sha256=eWs8flkDY-coOwyyRGQPv2vgOkB6mSCG-OlMVAxs7v8,157232
+scipy/stats/_biasedurn.pxd,sha256=bQC6xG4RH1E5h2jCKXRMADfgGctiO5TgNlJegKrR7DY,1046
+scipy/stats/_binned_statistic.py,sha256=Hnann2khDIGmvqIipGw_0zz4Jo10Pd9peIVtZvrACYM,32846
+scipy/stats/_binomtest.py,sha256=WlN1N8IvuaTOCJ5bXFrMeokPBVOkOE-bKMmV6U9UbBM,13199
+scipy/stats/_bws_test.py,sha256=2yfqpx9tlbotjTBJsBd4qOAK3fphUDN3J6Oe1AS-f-g,7143
+scipy/stats/_censored_data.py,sha256=Ts7GSYYti2z-8yoOJTedj6aCLnGhugLlDRdxZc4rPxs,18306
+scipy/stats/_common.py,sha256=4RqXT04Knp1CoOJuSBV6Uy_XmcmtVr0bImAbSk_VHlQ,172
+scipy/stats/_constants.py,sha256=mBeJgvWcDZBmPFStDNEjlzeZY3aMDMCHWoj7dCmgugQ,1002
+scipy/stats/_continued_fraction.py,sha256=2WyLuQWsx9aIHkYvTE4_VlepAfSKG4otiu_Y5wYbzKA,15508
+scipy/stats/_continuous_distns.py,sha256=i98XiARqobuq2SGESUzM_MkSLMH9eS4neD6CIArC2kQ,409353
+scipy/stats/_correlation.py,sha256=MBZwMk0Gti8LU4oxPAE1umY7_A8NwLu9DdzVFApRCuk,15418
+scipy/stats/_covariance.py,sha256=N5skfDbcnWPjTE2RwBoZGJUyFieM2q8y9NHhXBMqHlo,22913
+scipy/stats/_crosstab.py,sha256=djdU7xCQ-513VlxFEOvLN8oaY4QyUPHDJHWlilhyEVA,7351
+scipy/stats/_discrete_distns.py,sha256=KrDAmqfvqtQ9wpnvD7G9CHnJxl1nZwnZs-59GVk1vUc,66099
+scipy/stats/_distn_infrastructure.py,sha256=-ygCdbB59IZ_bRzhIf9dwQw3dQuROiKCJewzcvCQmXo,153570
+scipy/stats/_distr_params.py,sha256=ccFQx6dMoVaS6Vrdo2vGcvWZbjH9I4Ms_J0-eHFRlac,9083
+scipy/stats/_distribution_infrastructure.py,sha256=wADGRn4OkrG3IXpTad6XTPO0DAXDYGsaxiWW9jjiRSM,237587
+scipy/stats/_entropy.py,sha256=JANQdP6c4EHa03N_Q-YOzjDjzR45MfKluNeovUfh_Hs,15994
+scipy/stats/_finite_differences.py,sha256=QaA5p36T0oDt4e_oMOE3QGBT8gB2C3E3ziZSWkkBF9g,4168
+scipy/stats/_fit.py,sha256=GdpnDmX-7h8UF7lNDm9XdLaZ414yd-5TV7vsb-GCux0,59674
+scipy/stats/_hypotests.py,sha256=MauKdPt1738BRsCU0Z3dTc-afU-Hrk6EsBeYCljkaAQ,86904
+scipy/stats/_kde.py,sha256=IdzX_7UlcEoAYX0jfgsuYpCYPz_BVxrk6Ri4h3q6cxs,25691
+scipy/stats/_ksstats.py,sha256=8Oo_0BAAZnDkLgckkySAFGxUo51ksnDADzkBe4RdkmU,20140
+scipy/stats/_levy_stable/__init__.py,sha256=W4eb9-VmMdFYSfFgodM9b_ityynkNxKoAzz59vrvfeg,46226
+scipy/stats/_levy_stable/__pycache__/__init__.cpython-312.pyc,,
+scipy/stats/_levy_stable/levyst.cpython-312-darwin.so,sha256=lj_OexG_jgIrpqvfccPDwuBXBw2QuBUWo8ml4sZ5_TY,78160
+scipy/stats/_mannwhitneyu.py,sha256=aVllakdGa7DvBlfDfdwHxil8jaeYJ78PI40vXrjFD7M,19577
+scipy/stats/_mgc.py,sha256=CjCxNh9PIAETVGhTeOOkwqxXY76V1FFrq5uRJCNLg1k,21440
+scipy/stats/_morestats.py,sha256=kaJFz43tn3IbbsbyPZv9fP_quRwf6S9epq3HYawBhEg,184110
+scipy/stats/_mstats_basic.py,sha256=YeDjKinAg7Sav3Tuk8MNFO-Rf9ly-3ex1hWIrULpRyI,122946
+scipy/stats/_mstats_extras.py,sha256=0LL3I-tOG17fI5CKPBK7a8e5-yrgX4XLjfsHOs5MMQs,16362
+scipy/stats/_multicomp.py,sha256=jPMYXI0NDr636UyCxnsoKh1Asyz8-kgLNOS7qDL8C-g,16917
+scipy/stats/_multivariate.py,sha256=NJjTUpSwCPqlyf-jOA_e8gZgN3kp30PE8ZpTxhO1IPI,273926
+scipy/stats/_new_distributions.py,sha256=kchaaycgk1mxgAo1YzDKriytaC6vY4tMnDeElOpXxD4,18923
+scipy/stats/_odds_ratio.py,sha256=zZvZsD7ftKeWUrypXeUapcNoq006XldVAkMMC3RLbWE,17005
+scipy/stats/_page_trend_test.py,sha256=o5F_WZ6H2cpkJJOSlkhe9oFOPFULHbyvTS8BPLqgYNg,19315
+scipy/stats/_probability_distribution.py,sha256=Vo32L06njo2b01gBO8yYO-O3_iWv3CKmStTuwagu_wI,70023
+scipy/stats/_qmc.py,sha256=KyYRFHX00a_2ipIPw8eIETIbO4MVowLyeCtBH8L-iRE,107783
+scipy/stats/_qmc_cy.cpython-312-darwin.so,sha256=1tYsF04rJ3EO9jM5wqOQuKZhjMAzjkMrnwW2rMAH5Ko,122432
+scipy/stats/_qmc_cy.pyi,sha256=xOpTSlaG_1YDZhkJjQQtukbcgOTAR9FpcRMkU5g9mXc,1134
+scipy/stats/_qmvnt.py,sha256=y3SLZ70XHw8ks7n9jxxjTP9aOT2deMrUAj69r_H2mD0,16447
+scipy/stats/_qmvnt_cy.cpython-312-darwin.so,sha256=DqLAYqgNElq0j0e99cckiFizkQL4TnJZgc5MU0vcIm8,131584
+scipy/stats/_quantile.py,sha256=9DSll-bzgO6iNC2hafJVIayRQryYtu3TYZRkUwq3Fd0,21175
+scipy/stats/_rcont/__init__.py,sha256=dUzWdRuJNAxnGYVFjDqUB8DMYti3by1WziKEfBDOlB4,84
+scipy/stats/_rcont/__pycache__/__init__.cpython-312.pyc,,
+scipy/stats/_rcont/rcont.cpython-312-darwin.so,sha256=MiQqsZ6vm7a0syyaa3uqF4JbtKBYiHaF8eBiTucygwQ,96552
+scipy/stats/_relative_risk.py,sha256=5zeYBMshYwtomiLTkaXc1nmWYD0FsaQNjf0iuDadtSc,9571
+scipy/stats/_resampling.py,sha256=TvmkTtuqKlH4O1XfJrWP5l8ZNimKBlWfkd1xYQSyq_E,106090
+scipy/stats/_result_classes.py,sha256=_ghuGdpFsCMuEmnfHg1AeorR-fASc77ACXYWEmQzXjI,1085
+scipy/stats/_sampling.py,sha256=jVdGtsHyII1GPTwHFKba_aUQAEUIYnaPKz_3v0yKGfI,46407
+scipy/stats/_sensitivity_analysis.py,sha256=mRco8OcaVAgapjufLoDT1a2dTsL4F3EAzKSi-4F79AU,25123
+scipy/stats/_sobol.cpython-312-darwin.so,sha256=7rZgxsjqj6s01QNgYSp7hMizW787Kew5syIlYPrSyFs,167600
+scipy/stats/_sobol.pyi,sha256=TAywylI75AF9th9QZY8TYfHvIQ1cyM5QZi7eBOAkrbg,971
+scipy/stats/_sobol_direction_numbers.npz,sha256=SFmTEUfULORluGBcsnf5V9mLg50DGU_fBleTV5BtGTs,589334
+scipy/stats/_stats.cpython-312-darwin.so,sha256=QQUTKVmAHNe5uyOCAOH6wd3_CttKm05_a9e61xYUlHo,390464
+scipy/stats/_stats.pxd,sha256=T_7IrDqgIahKMECV5WAtxtsoV91XBVRM359kAXPIhww,709
+scipy/stats/_stats_mstats_common.py,sha256=2CFrWyPzisPZLbUjpmr3R5NFe_NIpJCZwHmB83cFNW0,12580
+scipy/stats/_stats_py.py,sha256=jVByQD8L96iJXCho_eXPhCoPBemKMG1roA-dnAq2zG4,418343
+scipy/stats/_stats_pythran.cpython-312-darwin.so,sha256=zda4syeZtHhxPdmV-KAXcQKhHI9-GV5ZomyOtba9RwU,188136
+scipy/stats/_survival.py,sha256=gBGsHonhgUxAik7Ww75C-deozqmwdY6RMUen_6J0myI,26051
+scipy/stats/_tukeylambda_stats.py,sha256=l-PPBlFs40R6mw8AaQhXsRGRInrSRIcocHrg__uTG5A,6881
+scipy/stats/_unuran/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/stats/_unuran/__pycache__/__init__.cpython-312.pyc,,
+scipy/stats/_unuran/unuran_wrapper.cpython-312-darwin.so,sha256=_zSSAuxtBRuFE4qcCS-P1oqNzTYTaErx7K2P0AgDtDE,521384
+scipy/stats/_unuran/unuran_wrapper.pyi,sha256=KFcmefkNMDwGB6BDttAzcvi7vZrU6XuD23BcYFdsyBQ,5615
+scipy/stats/_variation.py,sha256=v8Np0iJJIAEcI1_wwY8V2IfaLut0niSpsdoR8XUYrNQ,4856
+scipy/stats/_warnings_errors.py,sha256=MpucxNFYEDytXh7vrZCMqTkRfuXTvvMpQ2W_Ak2OnPk,1196
+scipy/stats/_wilcoxon.py,sha256=MHB8k3Ppg6NdHiZZPCiE_4-CXnX-OqgR4iiRfWtdw6M,10459
+scipy/stats/biasedurn.py,sha256=ECfilE4KrIhU2sK-KWtr8yxqthfVsyz_-o4F2TnMXU4,431
+scipy/stats/contingency.py,sha256=G0XVk8sbDQRvdHrxgspcg6I-PYrOceoZs8bHVbGY_zQ,18823
+scipy/stats/distributions.py,sha256=9Kt2fyTohorJcf6a7M9DYH8Nu4jEU66nKP01cRhKmuE,859
+scipy/stats/kde.py,sha256=8ZThSc3lz-l1Gb2jzIvy1J87_HTd7eXzxuPLClVpo7c,516
+scipy/stats/morestats.py,sha256=sDSu5RfajS5a-iLN-46xvL_aoWwqI-2TPzCRY4cxQZg,957
+scipy/stats/mstats.py,sha256=aRbrykjrvl-qOBkmGjlFMH4rbWYSqBBQHReanSAomFg,2466
+scipy/stats/mstats_basic.py,sha256=PjgL37PCPwiDx_ptqnmKXc1W3QGlRjjPrG0nI5FA4So,1394
+scipy/stats/mstats_extras.py,sha256=925lNnnf_NTRoyAnXql-k9syzhv7MF6T2kPGsdE2FHc,721
+scipy/stats/mvn.py,sha256=pOcB_Dd_DHpfbYnuJKq-wqmNNGCun1M0294xK1bX0KQ,498
+scipy/stats/qmc.py,sha256=b6gLkc_FSm11Ssb9uIai4XxLk4XL_qqK6Jc2k4RSeN0,11703
+scipy/stats/sampling.py,sha256=VYwxxGosFs-T3qdCmdw4tJYEFLlegwj-JgDin7iwndE,1939
+scipy/stats/stats.py,sha256=wa4-yBcaUfv85bJiP53REdEswpu5i92Ak7JXtKrag8M,1496
+scipy/stats/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+scipy/stats/tests/__pycache__/__init__.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/common_tests.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_axis_nan_policy.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_binned_statistic.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_censored_data.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_contingency.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_continued_fraction.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_continuous.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_continuous_basic.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_continuous_fit_censored.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_correlation.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_crosstab.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_device_dtype.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_discrete_basic.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_discrete_distns.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_distributions.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_entropy.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_fast_gen_inversion.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_fit.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_hypotests.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_kdeoth.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_marray.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_mgc.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_morestats.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_mstats_basic.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_mstats_extras.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_multicomp.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_multivariate.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_new_distributions.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_odds_ratio.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_qmc.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_quantile.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_rank.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_relative_risk.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_resampling.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_sampling.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_sensitivity_analysis.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_stats.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_survival.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_tukeylambda_stats.cpython-312.pyc,,
+scipy/stats/tests/__pycache__/test_variation.cpython-312.pyc,,
+scipy/stats/tests/common_tests.py,sha256=o9V7L6feUUwUqDCjMy3sSsDtCg2W8R0bLZItC8OjO-Y,12327
+scipy/stats/tests/data/__pycache__/_mvt.cpython-312.pyc,,
+scipy/stats/tests/data/__pycache__/fisher_exact_results_from_r.cpython-312.pyc,,
+scipy/stats/tests/data/_mvt.py,sha256=OvFCmMqI74DWIgo32UV55dP1nzvFvYBSyYcmKJes9pI,6905
+scipy/stats/tests/data/fisher_exact_results_from_r.py,sha256=BKxPAi4h3IOebcZYGxCbutYuAX0tlb40P0DEkfEi918,27349
+scipy/stats/tests/data/jf_skew_t_gamlss_pdf_data.npy,sha256=JU0t7kpNVHuTMcYCQ8b8_K_9JsixBNCNT2BFp2RbO7o,4064
+scipy/stats/tests/data/levy_stable/stable-Z1-cdf-sample-data.npy,sha256=zxjB8tZaIyvyxxISgt8xvyqL6Cevr8TtgQ7TdFfuiYo,183728
+scipy/stats/tests/data/levy_stable/stable-Z1-pdf-sample-data.npy,sha256=_umVErq0zMZWm0e5JOSwNOHNurViT6_H4SBki9X3oSg,183688
+scipy/stats/tests/data/levy_stable/stable-loc-scale-sample-data.npy,sha256=88cZ7dVDH7nnuey20Z48p6kJUpi9GfImaFsPykDwwHM,9328
+scipy/stats/tests/data/nist_anova/AtmWtAg.dat,sha256=Qdd0i7H4cNhAABfFOZPuplhi_9SCquFpO-hNkyRcMD8,3063
+scipy/stats/tests/data/nist_anova/SiRstv.dat,sha256=x9wJ2g1qnzf4DK_w9F_WiOiDMDEg4td2z6uU77G07xM,1947
+scipy/stats/tests/data/nist_anova/SmLs01.dat,sha256=KdnJedRthF7XLA-w7XkIPIMTgzu89yBAMmZA2H4uQOQ,6055
+scipy/stats/tests/data/nist_anova/SmLs02.dat,sha256=nCPyxRk1dAoSPWiC7kG4dLaXs2GL3-KRXRt2NwgXoIA,46561
+scipy/stats/tests/data/nist_anova/SmLs03.dat,sha256=6yPHiQSk0KI4oURQOk99t-uEm-IZN-8eIPHb_y0mQ1U,451566
+scipy/stats/tests/data/nist_anova/SmLs04.dat,sha256=fI-HpgJF9cdGdBinclhVzOcWCCc5ZJZuXalUwirV-lc,6815
+scipy/stats/tests/data/nist_anova/SmLs05.dat,sha256=iJTaAWUFn7DPLTd9bQh_EMKEK1DPG0fnN8xk7BQlPRE,53799
+scipy/stats/tests/data/nist_anova/SmLs06.dat,sha256=riOkYT-LRgmJhPpCK32x7xYnD38gwnh_Eo1X8OK3eN8,523605
+scipy/stats/tests/data/nist_anova/SmLs07.dat,sha256=QtSS11d-vkVvqaIEeJ6oNwyET1CKoyQqjlfBl2sTOJA,7381
+scipy/stats/tests/data/nist_anova/SmLs08.dat,sha256=qrxQQ0I6gnhrefygKwT48x-bz-8laD8Vpn7c81nITRg,59228
+scipy/stats/tests/data/nist_anova/SmLs09.dat,sha256=qmELOQyNlH7CWOMt8PQ0Z_yxgg9Hxc4lqZOuHZxxWuc,577633
+scipy/stats/tests/data/nist_linregress/Norris.dat,sha256=zD_RTRxfqJHVZTAAyddzLDDbhCzKSfwFGr3hwZ1nq30,2591
+scipy/stats/tests/data/rel_breitwigner_pdf_sample_data_ROOT.npy,sha256=7vTccC3YxuMcGMdOH4EoTD6coqtQKC3jnJrTC3u4520,38624
+scipy/stats/tests/data/studentized_range_mpmath_ref.json,sha256=icZGNBodwmJNzOyEki9MreI2lS6nQJNWfnVJiHRNRNM,29239
+scipy/stats/tests/test_axis_nan_policy.py,sha256=uEENifw0Lss7PIoLcS0r_JPji_kzE4GWxx0n6mz6Q1w,64097
+scipy/stats/tests/test_binned_statistic.py,sha256=JZSu4MtS4KxgaFvAI_ZuFvf6UFuwY0wR5OpE70qrsMY,18845
+scipy/stats/tests/test_censored_data.py,sha256=pAQfSHhmcetcxoS1ZgIHVm1pEbapW7az7I-y_8phb5w,6935
+scipy/stats/tests/test_contingency.py,sha256=00QIN99yybM_HhrLf8kck85gWPUAQmYIKI7XnVzPF94,10937
+scipy/stats/tests/test_continued_fraction.py,sha256=GGRwIZ6zhsVNaR0Kbc7x2GFpOxSV48URXKz7B5_kEBQ,6709
+scipy/stats/tests/test_continuous.py,sha256=MYvWWe-uAlDx9yiX_98Tdv1BC5ij-QFrD9JDtttr1ow,92928
+scipy/stats/tests/test_continuous_basic.py,sha256=CFIWABN3Smq-dhlFZFi1zgVfOhx4gFuokbiFlxkVeOg,43541
+scipy/stats/tests/test_continuous_fit_censored.py,sha256=7hu1sSo9hhh0g9pmPMmjj2BI2rkxvA1h20XdMYZeyog,24188
+scipy/stats/tests/test_correlation.py,sha256=YsppqXAkNgjoNeRLOpVZ6fTi1-MpoHXAKFZNC-1tzp4,10762
+scipy/stats/tests/test_crosstab.py,sha256=2zqnoWW70MkvFjxAQlpW4vzWI624rcYLAlAVf7vZ9DU,3906
+scipy/stats/tests/test_device_dtype.py,sha256=porleR1Buj-qpFfoUEuSDZse-Sxuy5ymSGuLNQJCGQU,9273
+scipy/stats/tests/test_discrete_basic.py,sha256=FkvPFDudDv4AKbCikoBWuOzw4TwS14vFxEf76zQTtwQ,22743
+scipy/stats/tests/test_discrete_distns.py,sha256=8izg9bocSopchnn8dQYjBP01MperIsA1V7EaslBv7OY,27016
+scipy/stats/tests/test_distributions.py,sha256=oQ2ToNOgMC-Ld-jzlCvbwp2RfnX1HOxzPsJq2ZSrGhM,419240
+scipy/stats/tests/test_entropy.py,sha256=i-yAfk89DRVY_8ywUhjGF9JoAhg3jYaYqcaxNFnAwcU,12840
+scipy/stats/tests/test_fast_gen_inversion.py,sha256=IfVEHASa8hWmgJOIDna8lhI5bouQyz2-o2qRfIbetmI,16062
+scipy/stats/tests/test_fit.py,sha256=dbLw0YWVHyw5l5M6Rsvq0wjmxp7kXR2zNBPA_h5DWH4,48935
+scipy/stats/tests/test_hypotests.py,sha256=yzmNvfG8CI9Q7DL6E7nT2mEwV_vl3T1sw0dPaPB_SC0,97163
+scipy/stats/tests/test_kdeoth.py,sha256=x5pcnbT0R1oOi_IeHW9q7yws64cu68t81Zpsfv5RnGs,22863
+scipy/stats/tests/test_marray.py,sha256=KFN16jpgVWr8EIyJ4b7bFXmNqohq39DKhb0kYnCXE68,17408
+scipy/stats/tests/test_mgc.py,sha256=5c_jMKD69zKK8-f1GrRIKJTkUy9AUa20-ojO2ANuWC4,8373
+scipy/stats/tests/test_morestats.py,sha256=ONaQVocgm9LKK1JxOQtfgZUrdcPdVsb4c73t6Hz-nYM,156735
+scipy/stats/tests/test_mstats_basic.py,sha256=NFGgWMGxKCuiR1qtOZRL0JX82bBTHHToZGKyHgYLgu8,89805
+scipy/stats/tests/test_mstats_extras.py,sha256=AWojnbc60PG-JVhWkHp7uwDePeKg-oeLG4VWqjaX9U0,7317
+scipy/stats/tests/test_multicomp.py,sha256=s5mL9NQMvD4khQ12n2_maXKX9Q5pI0HFjcaYMZyhcJ0,17826
+scipy/stats/tests/test_multivariate.py,sha256=b678Zz7x_NeWavFkktkTJ1pdpp68XXYvHf04hwliB7k,198121
+scipy/stats/tests/test_new_distributions.py,sha256=vv-L8STWshYz4GEXh0ws2BwgO0A8nfu6us5h0g8CZoE,874
+scipy/stats/tests/test_odds_ratio.py,sha256=ZII-yvP_vhuaNa3qPB0Q5lh9yzRF-08ZcdkAwuu5E94,6727
+scipy/stats/tests/test_qmc.py,sha256=xPoyWSyFzg7oGDxBHIOoG3SEaoPyMJaAPuvDDJv8jBA,59205
+scipy/stats/tests/test_quantile.py,sha256=IhOvFNsHIA0MXAEM6xsMQTUTZXkpTz6ip4KlCHHC22I,17897
+scipy/stats/tests/test_rank.py,sha256=jSEzXc-KUyHiw1A58ct0IX_DkYwZobGGZFyOx539oPU,12775
+scipy/stats/tests/test_relative_risk.py,sha256=jzOGNQ2y9_YfFnXiGAiRDrgahy66qQkw6ZkHgygCJMA,3646
+scipy/stats/tests/test_resampling.py,sha256=FrY8A1IwwhoMV03YiCiu4caPckEsRUfPsedo8fg38ww,92370
+scipy/stats/tests/test_sampling.py,sha256=rWfN1HH-17jIB3lpyCOvYhTSMemFhqywxKVcTEIJzYg,54874
+scipy/stats/tests/test_sensitivity_analysis.py,sha256=nNF_B6Zl5YxmvppI8TEPOGroDsbgyLTF6jBmdJH2AUw,10678
+scipy/stats/tests/test_stats.py,sha256=hz2veCHRerVhRL99gLx074q2reJnQDDOzQGOqOzmoac,403192
+scipy/stats/tests/test_survival.py,sha256=Wmig-n93Y2wCuye9btK4QqXwUAdzF0xR_MO9iYZARjU,21958
+scipy/stats/tests/test_tukeylambda_stats.py,sha256=6WUBNVoTseVjfrHfWXtU11gTgmRcdnwAPLQOI0y_5U8,3231
+scipy/stats/tests/test_variation.py,sha256=Q-t49HELEgydYzY7Tq0ZJD5mwEPsDP8iMsskF8YSM_4,9360
+scipy/version.py,sha256=zJSXFTu37JGBuGs2fl69G_-NwCpgCS1UkFLxnJ1wvwY,318
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/WHEEL b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/WHEEL
new file mode 100644
index 0000000000000000000000000000000000000000..82bc2ec6f0444b626656e7f729bc3314146e0889
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy-1.17.1.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: meson
+Root-Is-Purelib: false
+Tag: cp312-cp312-macosx_14_0_arm64
+Generator: delocate 0.13.0
+
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__comb.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__comb.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__comb.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm_2.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm_2.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ellip_harm_2.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__gufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__gufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__gufuncs.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__input_validation.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__input_validation.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__input_validation.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__lambertw.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__lambertw.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__lambertw.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__logsumexp.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__logsumexp.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__logsumexp.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__mptestutils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__mptestutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__mptestutils.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__multiufuncs.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__multiufuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__multiufuncs.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__orthogonal.pyi differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__precompute b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__precompute
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__precompute differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__sf_error.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__sf_error.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__sf_error.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__specfun.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__specfun.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__specfun.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__special_ufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__special_ufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__special_ufuncs.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spfun_stats.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spfun_stats.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spfun_stats.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spherical_bessel.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spherical_bessel.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__spherical_bessel.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__support_alternative_backends.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__support_alternative_backends.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__support_alternative_backends.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__test_internal.pyi differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__testutils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__testutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__testutils.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyi differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyx b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs.pyx differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pxd b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pxd differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pyx b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx.pyx differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx_defs.h b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx_defs.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_cxx_defs.h differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_defs.h b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_defs.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/.__ufuncs_defs.h differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._add_newdocs.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._add_newdocs.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._add_newdocs.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._basic.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._basic.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pxd b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pxd differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._cython_special.pyi differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._orthogonal.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._orthogonal.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._orthogonal.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._sf_error.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._sf_error.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._sf_error.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._specfun.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._specfun.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._specfun.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._spfun_stats.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._spfun_stats.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._spfun_stats.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/._tests b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._tests
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/._tests differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.pxd b/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..1daa9fb379572aac4bc9b6d74330a18c5c52bf79
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.pxd
@@ -0,0 +1 @@
+from scipy.special cimport cython_special
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..29b7c89781a221779b7ccd7cab34e1b2bd98b0d5
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/__init__.py
@@ -0,0 +1,842 @@
+"""
+========================================
+Special functions (:mod:`scipy.special`)
+========================================
+
+.. currentmodule:: scipy.special
+
+.. toctree::
+ :hidden:
+
+ special.cython_special
+
+Almost all of the functions below accept NumPy arrays as input
+arguments as well as single numbers. This means they follow
+broadcasting and automatic array-looping rules. Technically,
+they are `NumPy universal functions
+`_.
+Functions which do not accept NumPy arrays are marked by a warning
+in the section description.
+
+.. seealso::
+
+ `scipy.special.cython_special` -- Typed Cython versions of special functions
+
+
+Error handling
+==============
+
+Errors are handled by returning NaNs or other appropriate values.
+Some of the special function routines can emit warnings or raise
+exceptions when an error occurs. By default this is disabled, except
+for memory allocation errors, which result in an exception being raised.
+To query and control the current error handling state the following
+functions are provided.
+
+.. autosummary::
+ :toctree: generated/
+
+ geterr -- Get the current way of handling special-function errors.
+ seterr -- Set how special-function errors are handled.
+ errstate -- Context manager for special-function error handling.
+ SpecialFunctionWarning -- Warning that can be emitted by special functions.
+ SpecialFunctionError -- Exception that can be raised by special functions.
+
+Available functions
+===================
+
+Airy functions
+--------------
+
+.. autosummary::
+ :toctree: generated/
+
+ airy -- Airy functions and their derivatives.
+ airye -- Exponentially scaled Airy functions and their derivatives.
+ ai_zeros -- Compute `nt` zeros and values of the Airy function Ai and its derivative.
+ bi_zeros -- Compute `nt` zeros and values of the Airy function Bi and its derivative.
+ itairy -- Integrals of Airy functions
+
+
+Elliptic functions and integrals
+--------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ ellipj -- Jacobian elliptic functions.
+ ellipk -- Complete elliptic integral of the first kind.
+ ellipkm1 -- Complete elliptic integral of the first kind around `m` = 1.
+ ellipkinc -- Incomplete elliptic integral of the first kind.
+ ellipe -- Complete elliptic integral of the second kind.
+ ellipeinc -- Incomplete elliptic integral of the second kind.
+ elliprc -- Degenerate symmetric integral RC.
+ elliprd -- Symmetric elliptic integral of the second kind.
+ elliprf -- Completely-symmetric elliptic integral of the first kind.
+ elliprg -- Completely-symmetric elliptic integral of the second kind.
+ elliprj -- Symmetric elliptic integral of the third kind.
+
+Bessel functions
+----------------
+
+.. autosummary::
+ :toctree: generated/
+
+ jv -- Bessel function of the first kind of real order and \
+ complex argument.
+ jve -- Exponentially scaled Bessel function of order `v`.
+ yn -- Bessel function of the second kind of integer order and \
+ real argument.
+ yv -- Bessel function of the second kind of real order and \
+ complex argument.
+ yve -- Exponentially scaled Bessel function of the second kind \
+ of real order.
+ iv -- Modified Bessel function of the first kind of real order.
+ ive -- Exponentially scaled modified Bessel function of the \
+ first kind.
+ kn -- Modified Bessel function of the second kind of integer \
+ order `n`
+ kv -- Modified Bessel function of the second kind of real order \
+ `v`
+ kve -- Exponentially scaled modified Bessel function of the \
+ second kind.
+ hankel1 -- Hankel function of the first kind.
+ hankel1e -- Exponentially scaled Hankel function of the first kind.
+ hankel2 -- Hankel function of the second kind.
+ hankel2e -- Exponentially scaled Hankel function of the second kind.
+ wright_bessel -- Wright's generalized Bessel function.
+ log_wright_bessel -- Logarithm of Wright's generalized Bessel function.
+
+The following function does not accept NumPy arrays (it is not a
+universal function):
+
+.. autosummary::
+ :toctree: generated/
+
+ lmbda -- Jahnke-Emden Lambda function, Lambdav(x).
+
+Zeros of Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ jnjnp_zeros -- Compute zeros of integer-order Bessel functions Jn and Jn'.
+ jnyn_zeros -- Compute nt zeros of Bessel functions Jn(x), Jn'(x), Yn(x), and Yn'(x).
+ jn_zeros -- Compute zeros of integer-order Bessel function Jn(x).
+ jnp_zeros -- Compute zeros of integer-order Bessel function derivative Jn'(x).
+ yn_zeros -- Compute zeros of integer-order Bessel function Yn(x).
+ ynp_zeros -- Compute zeros of integer-order Bessel function derivative Yn'(x).
+ y0_zeros -- Compute nt zeros of Bessel function Y0(z), and derivative at each zero.
+ y1_zeros -- Compute nt zeros of Bessel function Y1(z), and derivative at each zero.
+ y1p_zeros -- Compute nt zeros of Bessel derivative Y1'(z), and value at each zero.
+
+Faster versions of common Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ j0 -- Bessel function of the first kind of order 0.
+ j1 -- Bessel function of the first kind of order 1.
+ y0 -- Bessel function of the second kind of order 0.
+ y1 -- Bessel function of the second kind of order 1.
+ i0 -- Modified Bessel function of order 0.
+ i0e -- Exponentially scaled modified Bessel function of order 0.
+ i1 -- Modified Bessel function of order 1.
+ i1e -- Exponentially scaled modified Bessel function of order 1.
+ k0 -- Modified Bessel function of the second kind of order 0, :math:`K_0`.
+ k0e -- Exponentially scaled modified Bessel function K of order 0
+ k1 -- Modified Bessel function of the second kind of order 1, :math:`K_1(x)`.
+ k1e -- Exponentially scaled modified Bessel function K of order 1.
+
+Integrals of Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ itj0y0 -- Integrals of Bessel functions of order 0.
+ it2j0y0 -- Integrals related to Bessel functions of order 0.
+ iti0k0 -- Integrals of modified Bessel functions of order 0.
+ it2i0k0 -- Integrals related to modified Bessel functions of order 0.
+ besselpoly -- Weighted integral of a Bessel function.
+
+Derivatives of Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ jvp -- Compute nth derivative of Bessel function Jv(z) with respect to `z`.
+ yvp -- Compute nth derivative of Bessel function Yv(z) with respect to `z`.
+ ivp -- Compute nth derivative of modified Bessel function Iv(z) with respect to `z`.
+ kvp -- Compute nth derivative of real-order modified Bessel function Kv(z)
+ h1vp -- Compute nth derivative of Hankel function H1v(z) with respect to `z`.
+ h2vp -- Compute nth derivative of Hankel function H2v(z) with respect to `z`.
+
+Spherical Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ spherical_jn -- Spherical Bessel function of the first kind or its derivative.
+ spherical_yn -- Spherical Bessel function of the second kind or its derivative.
+ spherical_in -- Modified spherical Bessel function of the first kind or its derivative.
+ spherical_kn -- Modified spherical Bessel function of the second kind or its derivative.
+
+Riccati-Bessel functions
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ riccati_jn -- Compute Riccati-Bessel function of the first kind and its derivative.
+ riccati_yn -- Compute Riccati-Bessel function of the second kind and its derivative.
+
+Struve functions
+----------------
+
+.. autosummary::
+ :toctree: generated/
+
+ struve -- Struve function.
+ modstruve -- Modified Struve function.
+ itstruve0 -- Integral of the Struve function of order 0.
+ it2struve0 -- Integral related to the Struve function of order 0.
+ itmodstruve0 -- Integral of the modified Struve function of order 0.
+
+
+Raw statistical functions
+-------------------------
+
+.. seealso:: :mod:`scipy.stats`: Friendly versions of these functions.
+
+Binomial distribution
+^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ bdtr -- Binomial distribution cumulative distribution function.
+ bdtrc -- Binomial distribution survival function.
+ bdtri -- Inverse function to `bdtr` with respect to `p`.
+ bdtrik -- Inverse function to `bdtr` with respect to `k`.
+ bdtrin -- Inverse function to `bdtr` with respect to `n`.
+
+Beta distribution
+^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ btdtria -- Inverse of `betainc` with respect to `a`.
+ btdtrib -- Inverse of `betainc` with respect to `b`.
+
+F distribution
+^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ fdtr -- F cumulative distribution function.
+ fdtrc -- F survival function.
+ fdtri -- The `p`-th quantile of the F-distribution.
+ fdtridfd -- Inverse to `fdtr` vs dfd.
+
+Gamma distribution
+^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ gdtr -- Gamma distribution cumulative distribution function.
+ gdtrc -- Gamma distribution survival function.
+ gdtria -- Inverse of `gdtr` vs a.
+ gdtrib -- Inverse of `gdtr` vs b.
+ gdtrix -- Inverse of `gdtr` vs x.
+
+Negative binomial distribution
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ nbdtr -- Negative binomial cumulative distribution function.
+ nbdtrc -- Negative binomial survival function.
+ nbdtri -- Inverse of `nbdtr` vs `p`.
+ nbdtrik -- Inverse of `nbdtr` vs `k`.
+ nbdtrin -- Inverse of `nbdtr` vs `n`.
+
+Noncentral F distribution
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ ncfdtr -- Cumulative distribution function of the non-central F distribution.
+ ncfdtridfd -- Calculate degrees of freedom (denominator) for the noncentral F-distribution.
+ ncfdtridfn -- Calculate degrees of freedom (numerator) for the noncentral F-distribution.
+ ncfdtri -- Inverse cumulative distribution function of the non-central F distribution.
+ ncfdtrinc -- Calculate non-centrality parameter for non-central F distribution.
+
+Noncentral t distribution
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ nctdtr -- Cumulative distribution function of the non-central `t` distribution.
+ nctdtridf -- Calculate degrees of freedom for non-central t distribution.
+ nctdtrit -- Inverse cumulative distribution function of the non-central t distribution.
+ nctdtrinc -- Calculate non-centrality parameter for non-central t distribution.
+
+Normal distribution
+^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ nrdtrimn -- Calculate mean of normal distribution given other params.
+ nrdtrisd -- Calculate standard deviation of normal distribution given other params.
+ ndtr -- Normal cumulative distribution function.
+ log_ndtr -- Logarithm of normal cumulative distribution function.
+ ndtri -- Inverse of `ndtr` vs x.
+ ndtri_exp -- Inverse of `log_ndtr` vs x.
+
+Poisson distribution
+^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ pdtr -- Poisson cumulative distribution function.
+ pdtrc -- Poisson survival function.
+ pdtri -- Inverse to `pdtr` vs m.
+ pdtrik -- Inverse to `pdtr` vs k.
+
+Student t distribution
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ stdtr -- Student t distribution cumulative distribution function.
+ stdtridf -- Inverse of `stdtr` vs df.
+ stdtrit -- Inverse of `stdtr` vs `t`.
+
+Chi square distribution
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ chdtr -- Chi square cumulative distribution function.
+ chdtrc -- Chi square survival function.
+ chdtri -- Inverse to `chdtrc`.
+ chdtriv -- Inverse to `chdtr` vs `v`.
+
+Non-central chi square distribution
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ chndtr -- Non-central chi square cumulative distribution function.
+ chndtridf -- Inverse to `chndtr` vs `df`.
+ chndtrinc -- Inverse to `chndtr` vs `nc`.
+ chndtrix -- Inverse to `chndtr` vs `x`.
+
+Kolmogorov distribution
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ smirnov -- Kolmogorov-Smirnov complementary cumulative distribution function.
+ smirnovi -- Inverse to `smirnov`.
+ kolmogorov -- Complementary cumulative distribution function of Kolmogorov distribution.
+ kolmogi -- Inverse function to `kolmogorov`.
+
+Box-Cox transformation
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ boxcox -- Compute the Box-Cox transformation.
+ boxcox1p -- Compute the Box-Cox transformation of 1 + `x`.
+ inv_boxcox -- Compute the inverse of the Box-Cox transformation.
+ inv_boxcox1p -- Compute the inverse of the Box-Cox transformation.
+
+
+Sigmoidal functions
+^^^^^^^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ logit -- Logit ufunc for ndarrays.
+ expit -- Logistic sigmoid function.
+ log_expit -- Logarithm of the logistic sigmoid function.
+
+Miscellaneous
+^^^^^^^^^^^^^
+
+.. autosummary::
+ :toctree: generated/
+
+ tklmbda -- Tukey-Lambda cumulative distribution function.
+ owens_t -- Owen's T Function.
+
+
+Information Theory functions
+----------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ entr -- Elementwise function for computing entropy.
+ rel_entr -- Elementwise function for computing relative entropy.
+ kl_div -- Elementwise function for computing Kullback-Leibler divergence.
+ huber -- Huber loss function.
+ pseudo_huber -- Pseudo-Huber loss function.
+
+
+Gamma and related functions
+---------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ gamma -- Gamma function.
+ gammaln -- Logarithm of the absolute value of the Gamma function for real inputs.
+ loggamma -- Principal branch of the logarithm of the Gamma function.
+ gammasgn -- Sign of the gamma function.
+ gammainc -- Regularized lower incomplete gamma function.
+ gammaincinv -- Inverse to `gammainc`.
+ gammaincc -- Regularized upper incomplete gamma function.
+ gammainccinv -- Inverse to `gammaincc`.
+ beta -- Beta function.
+ betaln -- Natural logarithm of absolute value of beta function.
+ betainc -- Incomplete beta integral.
+ betaincc -- Complemented incomplete beta integral.
+ betaincinv -- Inverse function to beta integral.
+ betainccinv -- Inverse of the complemented incomplete beta integral.
+ psi -- The digamma function.
+ rgamma -- Gamma function inverted.
+ polygamma -- Polygamma function n.
+ multigammaln -- Returns the log of multivariate gamma, also sometimes called the generalized gamma.
+ digamma -- psi(x[, out]).
+ poch -- Rising factorial (z)_m.
+
+Error function and Fresnel integrals
+------------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ erf -- Returns the error function of complex argument.
+ erfc -- Complementary error function, ``1 - erf(x)``.
+ erfcx -- Scaled complementary error function, ``exp(x**2) * erfc(x)``.
+ erfi -- Imaginary error function, ``-i erf(i z)``.
+ erfinv -- Inverse function for erf.
+ erfcinv -- Inverse function for erfc.
+ wofz -- Faddeeva function.
+ dawsn -- Dawson's integral.
+ fresnel -- Fresnel sin and cos integrals.
+ fresnel_zeros -- Compute nt complex zeros of sine and cosine Fresnel integrals S(z) and C(z).
+ modfresnelp -- Modified Fresnel positive integrals.
+ modfresnelm -- Modified Fresnel negative integrals.
+ voigt_profile -- Voigt profile.
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ erf_zeros -- Compute nt complex zeros of error function erf(z).
+ fresnelc_zeros -- Compute nt complex zeros of cosine Fresnel integral C(z).
+ fresnels_zeros -- Compute nt complex zeros of sine Fresnel integral S(z).
+
+Legendre functions
+------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ legendre_p -- Legendre polynomials of the first kind.
+ legendre_p_all -- All Legendre polynomials of the first kind up to a specified order.
+ assoc_legendre_p -- Associated Legendre polynomials of the first kind.
+ assoc_legendre_p_all -- All associated Legendre polynomials of the first kind up to a specified order and degree.
+ sph_legendre_p -- Spherical Legendre polynomials of the first kind.
+ sph_legendre_p_all -- All spherical Legendre polynomials of the first kind up to a specified order and degree.
+ sph_harm_y -- Spherical harmonics.
+ sph_harm_y_all -- All spherical harmonics up to a specified order and degree.
+
+The following functions are in the process of being deprecated in favor of the above,
+which provide a more flexible and consistent interface.
+
+.. autosummary::
+ :toctree: generated/
+
+ lpmv -- Associated Legendre function of integer order and real degree.
+ lqn -- Legendre function of the second kind.
+ lqmn -- Sequence of associated Legendre functions of the second kind.
+
+Ellipsoidal harmonics
+---------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ ellip_harm -- Ellipsoidal harmonic functions E^p_n(l).
+ ellip_harm_2 -- Ellipsoidal harmonic functions F^p_n(l).
+ ellip_normal -- Ellipsoidal harmonic normalization constants gamma^p_n.
+
+Orthogonal polynomials
+----------------------
+
+The following functions evaluate values of orthogonal polynomials:
+
+.. autosummary::
+ :toctree: generated/
+
+ assoc_laguerre -- Compute the generalized (associated) Laguerre polynomial of degree n and order k.
+ eval_legendre -- Evaluate Legendre polynomial at a point.
+ eval_chebyt -- Evaluate Chebyshev polynomial of the first kind at a point.
+ eval_chebyu -- Evaluate Chebyshev polynomial of the second kind at a point.
+ eval_chebyc -- Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a point.
+ eval_chebys -- Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a point.
+ eval_jacobi -- Evaluate Jacobi polynomial at a point.
+ eval_laguerre -- Evaluate Laguerre polynomial at a point.
+ eval_genlaguerre -- Evaluate generalized Laguerre polynomial at a point.
+ eval_hermite -- Evaluate physicist's Hermite polynomial at a point.
+ eval_hermitenorm -- Evaluate probabilist's (normalized) Hermite polynomial at a point.
+ eval_gegenbauer -- Evaluate Gegenbauer polynomial at a point.
+ eval_sh_legendre -- Evaluate shifted Legendre polynomial at a point.
+ eval_sh_chebyt -- Evaluate shifted Chebyshev polynomial of the first kind at a point.
+ eval_sh_chebyu -- Evaluate shifted Chebyshev polynomial of the second kind at a point.
+ eval_sh_jacobi -- Evaluate shifted Jacobi polynomial at a point.
+
+The following functions compute roots and quadrature weights for
+orthogonal polynomials:
+
+.. autosummary::
+ :toctree: generated/
+
+ roots_legendre -- Gauss-Legendre quadrature.
+ roots_chebyt -- Gauss-Chebyshev (first kind) quadrature.
+ roots_chebyu -- Gauss-Chebyshev (second kind) quadrature.
+ roots_chebyc -- Gauss-Chebyshev (first kind) quadrature.
+ roots_chebys -- Gauss-Chebyshev (second kind) quadrature.
+ roots_jacobi -- Gauss-Jacobi quadrature.
+ roots_laguerre -- Gauss-Laguerre quadrature.
+ roots_genlaguerre -- Gauss-generalized Laguerre quadrature.
+ roots_hermite -- Gauss-Hermite (physicist's) quadrature.
+ roots_hermitenorm -- Gauss-Hermite (statistician's) quadrature.
+ roots_gegenbauer -- Gauss-Gegenbauer quadrature.
+ roots_sh_legendre -- Gauss-Legendre (shifted) quadrature.
+ roots_sh_chebyt -- Gauss-Chebyshev (first kind, shifted) quadrature.
+ roots_sh_chebyu -- Gauss-Chebyshev (second kind, shifted) quadrature.
+ roots_sh_jacobi -- Gauss-Jacobi (shifted) quadrature.
+
+The functions below, in turn, return the polynomial coefficients in
+``orthopoly1d`` objects, which function similarly as `numpy.poly1d`.
+The ``orthopoly1d`` class also has an attribute ``weights``, which returns
+the roots, weights, and total weights for the appropriate form of Gaussian
+quadrature. These are returned in an ``n x 3`` array with roots in the first
+column, weights in the second column, and total weights in the final column.
+Note that ``orthopoly1d`` objects are converted to `~numpy.poly1d` when doing
+arithmetic, and lose information of the original orthogonal polynomial.
+
+.. autosummary::
+ :toctree: generated/
+
+ legendre -- Legendre polynomial.
+ chebyt -- Chebyshev polynomial of the first kind.
+ chebyu -- Chebyshev polynomial of the second kind.
+ chebyc -- Chebyshev polynomial of the first kind on :math:`[-2, 2]`.
+ chebys -- Chebyshev polynomial of the second kind on :math:`[-2, 2]`.
+ jacobi -- Jacobi polynomial.
+ laguerre -- Laguerre polynomial.
+ genlaguerre -- Generalized (associated) Laguerre polynomial.
+ hermite -- Physicist's Hermite polynomial.
+ hermitenorm -- Normalized (probabilist's) Hermite polynomial.
+ gegenbauer -- Gegenbauer (ultraspherical) polynomial.
+ sh_legendre -- Shifted Legendre polynomial.
+ sh_chebyt -- Shifted Chebyshev polynomial of the first kind.
+ sh_chebyu -- Shifted Chebyshev polynomial of the second kind.
+ sh_jacobi -- Shifted Jacobi polynomial.
+
+.. warning::
+
+ Computing values of high-order polynomials (around ``order > 20``) using
+ polynomial coefficients is numerically unstable. To evaluate polynomial
+ values, the ``eval_*`` functions should be used instead.
+
+
+Hypergeometric functions
+------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ hyp2f1 -- Gauss hypergeometric function 2F1(a, b; c; z).
+ hyp1f1 -- Confluent hypergeometric function 1F1(a, b; x).
+ hyperu -- Confluent hypergeometric function U(a, b, x) of the second kind.
+ hyp0f1 -- Confluent hypergeometric limit function 0F1.
+
+
+Parabolic cylinder functions
+----------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ pbdv -- Parabolic cylinder function D.
+ pbvv -- Parabolic cylinder function V.
+ pbwa -- Parabolic cylinder function W.
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ pbdv_seq -- Parabolic cylinder functions Dv(x) and derivatives.
+ pbvv_seq -- Parabolic cylinder functions Vv(x) and derivatives.
+ pbdn_seq -- Parabolic cylinder functions Dn(z) and derivatives.
+
+Mathieu and related functions
+-----------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ mathieu_a -- Characteristic value of even Mathieu functions.
+ mathieu_b -- Characteristic value of odd Mathieu functions.
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ mathieu_even_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
+ mathieu_odd_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
+
+The following return both function and first derivative:
+
+.. autosummary::
+ :toctree: generated/
+
+ mathieu_cem -- Even Mathieu function and its derivative.
+ mathieu_sem -- Odd Mathieu function and its derivative.
+ mathieu_modcem1 -- Even modified Mathieu function of the first kind and its derivative.
+ mathieu_modcem2 -- Even modified Mathieu function of the second kind and its derivative.
+ mathieu_modsem1 -- Odd modified Mathieu function of the first kind and its derivative.
+ mathieu_modsem2 -- Odd modified Mathieu function of the second kind and its derivative.
+
+Spheroidal wave functions
+-------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ pro_ang1 -- Prolate spheroidal angular function of the first kind and its derivative.
+ pro_rad1 -- Prolate spheroidal radial function of the first kind and its derivative.
+ pro_rad2 -- Prolate spheroidal radial function of the second kind and its derivative.
+ obl_ang1 -- Oblate spheroidal angular function of the first kind and its derivative.
+ obl_rad1 -- Oblate spheroidal radial function of the first kind and its derivative.
+ obl_rad2 -- Oblate spheroidal radial function of the second kind and its derivative.
+ pro_cv -- Characteristic value of prolate spheroidal function.
+ obl_cv -- Characteristic value of oblate spheroidal function.
+ pro_cv_seq -- Characteristic values for prolate spheroidal wave functions.
+ obl_cv_seq -- Characteristic values for oblate spheroidal wave functions.
+
+The following functions require pre-computed characteristic value:
+
+.. autosummary::
+ :toctree: generated/
+
+ pro_ang1_cv -- Prolate spheroidal angular function pro_ang1 for precomputed characteristic value.
+ pro_rad1_cv -- Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.
+ pro_rad2_cv -- Prolate spheroidal radial function pro_rad2 for precomputed characteristic value.
+ obl_ang1_cv -- Oblate spheroidal angular function obl_ang1 for precomputed characteristic value.
+ obl_rad1_cv -- Oblate spheroidal radial function obl_rad1 for precomputed characteristic value.
+ obl_rad2_cv -- Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.
+
+Kelvin functions
+----------------
+
+.. autosummary::
+ :toctree: generated/
+
+ kelvin -- Kelvin functions as complex numbers.
+ kelvin_zeros -- Compute nt zeros of all Kelvin functions.
+ ber -- Kelvin function ber.
+ bei -- Kelvin function bei
+ berp -- Derivative of the Kelvin function `ber`.
+ beip -- Derivative of the Kelvin function `bei`.
+ ker -- Kelvin function ker.
+ kei -- Kelvin function ker.
+ kerp -- Derivative of the Kelvin function ker.
+ keip -- Derivative of the Kelvin function kei.
+
+The following functions do not accept NumPy arrays (they are not
+universal functions):
+
+.. autosummary::
+ :toctree: generated/
+
+ ber_zeros -- Compute nt zeros of the Kelvin function ber(x).
+ bei_zeros -- Compute nt zeros of the Kelvin function bei(x).
+ berp_zeros -- Compute nt zeros of the Kelvin function ber'(x).
+ beip_zeros -- Compute nt zeros of the Kelvin function bei'(x).
+ ker_zeros -- Compute nt zeros of the Kelvin function ker(x).
+ kei_zeros -- Compute nt zeros of the Kelvin function kei(x).
+ kerp_zeros -- Compute nt zeros of the Kelvin function ker'(x).
+ keip_zeros -- Compute nt zeros of the Kelvin function kei'(x).
+
+Combinatorics
+-------------
+
+.. autosummary::
+ :toctree: generated/
+
+ comb -- The number of combinations of N things taken k at a time.
+ perm -- Permutations of N things taken k at a time, i.e., k-permutations of N.
+ stirling2 -- Stirling numbers of the second kind.
+
+Lambert W and related functions
+-------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ lambertw -- Lambert W function.
+ wrightomega -- Wright Omega function.
+
+Other special functions
+-----------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ agm -- Arithmetic, Geometric Mean.
+ bernoulli -- Bernoulli numbers B0..Bn (inclusive).
+ binom -- Binomial coefficient
+ diric -- Periodic sinc function, also called the Dirichlet kernel.
+ euler -- Euler numbers E0..En (inclusive).
+ expn -- Exponential integral E_n.
+ exp1 -- Exponential integral E_1 of complex argument z.
+ expi -- Exponential integral Ei.
+ factorial -- The factorial of a number or array of numbers.
+ factorial2 -- Double factorial.
+ factorialk -- Multifactorial of n of order k, n(!!...!).
+ shichi -- Hyperbolic sine and cosine integrals.
+ sici -- Sine and cosine integrals.
+ softmax -- Softmax function.
+ log_softmax -- Logarithm of softmax function.
+ spence -- Spence's function, also known as the dilogarithm.
+ zeta -- Riemann zeta function.
+ zetac -- Riemann zeta function minus 1.
+ softplus -- Softplus function.
+
+Convenience functions
+---------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ cbrt -- Cube root of `x`.
+ exp10 -- 10**x.
+ exp2 -- 2**x.
+ radian -- Convert from degrees to radians.
+ cosdg -- Cosine of the angle `x` given in degrees.
+ sindg -- Sine of angle given in degrees.
+ tandg -- Tangent of angle x given in degrees.
+ cotdg -- Cotangent of the angle `x` given in degrees.
+ log1p -- Calculates log(1+x) for use when `x` is near zero.
+ expm1 -- ``exp(x) - 1`` for use when `x` is near zero.
+ cosm1 -- ``cos(x) - 1`` for use when `x` is near zero.
+ powm1 -- ``x**y - 1`` for use when `y` is near zero or `x` is near 1.
+ round -- Round to nearest integer.
+ xlogy -- Compute ``x*log(y)`` so that the result is 0 if ``x = 0``.
+ xlog1py -- Compute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.
+ logsumexp -- Compute the log of the sum of exponentials of input elements.
+ exprel -- Relative error exponential, (exp(x)-1)/x, for use when `x` is near zero.
+ sinc -- Return the sinc function.
+
+""" # noqa: E501
+
+
+from ._sf_error import SpecialFunctionWarning, SpecialFunctionError
+
+from . import _ufuncs
+from ._ufuncs import *
+
+from . import _basic
+from ._basic import *
+
+# Replace some function definitions from _ufuncs and _basic
+# to add Array API support
+from ._support_alternative_backends import *
+
+from ._logsumexp import logsumexp, softmax, log_softmax
+
+from . import _multiufuncs
+from ._multiufuncs import *
+
+from . import _orthogonal
+from ._orthogonal import *
+
+from ._ellip_harm import (
+ ellip_harm,
+ ellip_harm_2,
+ ellip_normal
+)
+from ._lambertw import lambertw
+from ._spherical_bessel import (
+ spherical_jn,
+ spherical_yn,
+ spherical_in,
+ spherical_kn
+)
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import add_newdocs, basic, orthogonal, specfun, sf_error, spfun_stats
+
+# We replace some function definitions from _ufuncs with those from
+# _support_alternative_backends above, but those are all listed in _ufuncs.__all__,
+# so there is no need to consider _support_alternative_backends.__all__ here.
+__all__ = _ufuncs.__all__ + _basic.__all__ + _orthogonal.__all__ + _multiufuncs.__all__
+__all__ += [
+ 'SpecialFunctionWarning',
+ 'SpecialFunctionError',
+ 'logsumexp',
+ 'softmax',
+ 'log_softmax',
+ 'multigammaln',
+ 'ellip_harm',
+ 'ellip_harm_2',
+ 'ellip_normal',
+ 'lambertw',
+ 'spherical_jn',
+ 'spherical_yn',
+ 'spherical_in',
+ 'spherical_kn',
+]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_add_newdocs.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_add_newdocs.py
new file mode 100644
index 0000000000000000000000000000000000000000..1efe2d3390effdda6d019c2a1699be18c16bda6a
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_add_newdocs.py
@@ -0,0 +1,8850 @@
+# Docstrings for generated ufuncs
+#
+# The syntax is designed to look like the function add_newdoc is being
+# called from numpy.lib, but in this file add_newdoc puts the
+# docstrings in a dictionary. This dictionary is used in
+# _generate_pyx.py to generate the docstrings for the ufuncs in
+# scipy.special at the C level when the ufuncs are created at compile
+# time.
+
+docdict: dict[str, str] = {}
+
+
+def get(name):
+ return docdict.get(name)
+
+
+def add_newdoc(name, doc):
+ docdict[name] = doc
+
+
+add_newdoc("_sf_error_test_function",
+ """
+ Private function; do not use.
+ """)
+
+
+add_newdoc("_cosine_cdf",
+ """
+ _cosine_cdf(x)
+
+ Cumulative distribution function (CDF) of the cosine distribution::
+
+ { 0, x < -pi
+ cdf(x) = { (pi + x + sin(x))/(2*pi), -pi <= x <= pi
+ { 1, x > pi
+
+ Parameters
+ ----------
+ x : array_like
+ `x` must contain real numbers.
+
+ Returns
+ -------
+ scalar or ndarray
+ The cosine distribution CDF evaluated at `x`.
+
+ """)
+
+add_newdoc("_cosine_invcdf",
+ """
+ _cosine_invcdf(p)
+
+ Inverse of the cumulative distribution function (CDF) of the cosine
+ distribution.
+
+ The CDF of the cosine distribution is::
+
+ cdf(x) = (pi + x + sin(x))/(2*pi)
+
+ This function computes the inverse of cdf(x).
+
+ Parameters
+ ----------
+ p : array_like
+ `p` must contain real numbers in the interval ``0 <= p <= 1``.
+ `nan` is returned for values of `p` outside the interval [0, 1].
+
+ Returns
+ -------
+ scalar or ndarray
+ The inverse of the cosine distribution CDF evaluated at `p`.
+
+ """)
+
+add_newdoc("_ellip_harm",
+ """
+ Internal function, use `ellip_harm` instead.
+ """)
+
+add_newdoc("_ellip_norm",
+ """
+ Internal function, use `ellip_norm` instead.
+ """)
+
+add_newdoc("wrightomega",
+ r"""
+ wrightomega(z, out=None)
+
+ Wright Omega function.
+
+ Defined as the solution to
+
+ .. math::
+
+ \omega + \log(\omega) = z
+
+ where :math:`\log` is the principal branch of the complex logarithm.
+
+ Parameters
+ ----------
+ z : array_like
+ Points at which to evaluate the Wright Omega function
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ omega : scalar or ndarray
+ Values of the Wright Omega function
+
+ See Also
+ --------
+ lambertw : The Lambert W function
+
+ Notes
+ -----
+ .. versionadded:: 0.19.0
+
+ The function can also be defined as
+
+ .. math::
+
+ \omega(z) = W_{K(z)}(e^z)
+
+ where :math:`K(z) = \lceil (\Im(z) - \pi)/(2\pi) \rceil` is the
+ unwinding number and :math:`W` is the Lambert W function.
+
+ The implementation here is taken from [1]_.
+
+ References
+ ----------
+ .. [1] Lawrence, Corless, and Jeffrey, "Algorithm 917: Complex
+ Double-Precision Evaluation of the Wright :math:`\omega`
+ Function." ACM Transactions on Mathematical Software,
+ 2012. :doi:`10.1145/2168773.2168779`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import wrightomega, lambertw
+
+ >>> wrightomega([-2, -1, 0, 1, 2])
+ array([0.12002824, 0.27846454, 0.56714329, 1. , 1.5571456 ])
+
+ Complex input:
+
+ >>> wrightomega(3 + 5j)
+ (1.5804428632097158+3.8213626783287937j)
+
+ Verify that ``wrightomega(z)`` satisfies ``w + log(w) = z``:
+
+ >>> w = -5 + 4j
+ >>> wrightomega(w + np.log(w))
+ (-5+4j)
+
+ Verify the connection to ``lambertw``:
+
+ >>> z = 0.5 + 3j
+ >>> wrightomega(z)
+ (0.0966015889280649+1.4937828458191993j)
+ >>> lambertw(np.exp(z))
+ (0.09660158892806493+1.4937828458191993j)
+
+ >>> z = 0.5 + 4j
+ >>> wrightomega(z)
+ (-0.3362123489037213+2.282986001579032j)
+ >>> lambertw(np.exp(z), k=1)
+ (-0.33621234890372115+2.282986001579032j)
+ """)
+
+
+add_newdoc("agm",
+ """
+ agm(a, b, out=None)
+
+ Compute the arithmetic-geometric mean of `a` and `b`.
+
+ Start with a_0 = a and b_0 = b and iteratively compute::
+
+ a_{n+1} = (a_n + b_n)/2
+ b_{n+1} = sqrt(a_n*b_n)
+
+ a_n and b_n converge to the same limit as n increases; their common
+ limit is agm(a, b).
+
+ Parameters
+ ----------
+ a, b : array_like
+ Real values only. If the values are both negative, the result
+ is negative. If one value is negative and the other is positive,
+ `nan` is returned.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ scalar or ndarray
+ The arithmetic-geometric mean of `a` and `b`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import agm
+ >>> a, b = 24.0, 6.0
+ >>> agm(a, b)
+ 13.458171481725614
+
+ Compare that result to the iteration:
+
+ >>> while a != b:
+ ... a, b = (a + b)/2, np.sqrt(a*b)
+ ... print("a = %19.16f b=%19.16f" % (a, b))
+ ...
+ a = 15.0000000000000000 b=12.0000000000000000
+ a = 13.5000000000000000 b=13.4164078649987388
+ a = 13.4582039324993694 b=13.4581390309909850
+ a = 13.4581714817451772 b=13.4581714817060547
+ a = 13.4581714817256159 b=13.4581714817256159
+
+ When array-like arguments are given, broadcasting applies:
+
+ >>> a = np.array([[1.5], [3], [6]]) # a has shape (3, 1).
+ >>> b = np.array([6, 12, 24, 48]) # b has shape (4,).
+ >>> agm(a, b)
+ array([[ 3.36454287, 5.42363427, 9.05798751, 15.53650756],
+ [ 4.37037309, 6.72908574, 10.84726853, 18.11597502],
+ [ 6. , 8.74074619, 13.45817148, 21.69453707]])
+ """)
+
+add_newdoc("bdtr",
+ r"""
+ bdtr(k, n, p, out=None)
+
+ Binomial distribution cumulative distribution function.
+
+ Sum of the terms 0 through `floor(k)` of the Binomial probability density.
+
+ .. math::
+ \mathrm{bdtr}(k, n, p) =
+ \sum_{j=0}^{\lfloor k \rfloor} {{n}\choose{j}} p^j (1-p)^{n-j}
+
+ Parameters
+ ----------
+ k : array_like
+ Number of successes (double), rounded down to the nearest integer.
+ n : array_like
+ Number of events (int).
+ p : array_like
+ Probability of success in a single event (float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ Probability of `floor(k)` or fewer successes in `n` independent events with
+ success probabilities of `p`.
+
+ Notes
+ -----
+ The terms are not summed directly; instead the regularized incomplete beta
+ function is employed, according to the formula,
+
+ .. math::
+ \mathrm{bdtr}(k, n, p) =
+ I_{1 - p}(n - \lfloor k \rfloor, \lfloor k \rfloor + 1).
+
+ Wrapper for the Cephes [1]_ routine `bdtr`.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ """)
+
+add_newdoc("bdtrc",
+ r"""
+ bdtrc(k, n, p, out=None)
+
+ Binomial distribution survival function.
+
+ Sum of the terms `floor(k) + 1` through `n` of the binomial probability
+ density,
+
+ .. math::
+ \mathrm{bdtrc}(k, n, p) =
+ \sum_{j=\lfloor k \rfloor +1}^n {{n}\choose{j}} p^j (1-p)^{n-j}
+
+ Parameters
+ ----------
+ k : array_like
+ Number of successes (double), rounded down to nearest integer.
+ n : array_like
+ Number of events (int)
+ p : array_like
+ Probability of success in a single event.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ Probability of `floor(k) + 1` or more successes in `n` independent
+ events with success probabilities of `p`.
+
+ See Also
+ --------
+ bdtr
+ betainc
+
+ Notes
+ -----
+ The terms are not summed directly; instead the regularized incomplete beta
+ function is employed, according to the formula,
+
+ .. math::
+ \mathrm{bdtrc}(k, n, p) = I_{p}(\lfloor k \rfloor + 1, n - \lfloor k \rfloor).
+
+ Wrapper for the Cephes [1]_ routine `bdtrc`.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ """)
+
+add_newdoc("bdtri",
+ r"""
+ bdtri(k, n, y, out=None)
+
+ Inverse function to `bdtr` with respect to `p`.
+
+ Finds the event probability `p` such that the sum of the terms 0 through
+ `k` of the binomial probability density is equal to the given cumulative
+ probability `y`.
+
+ Parameters
+ ----------
+ k : array_like
+ Number of successes (float), rounded down to the nearest integer.
+ n : array_like
+ Number of events (float)
+ y : array_like
+ Cumulative probability (probability of `k` or fewer successes in `n`
+ events).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ p : scalar or ndarray
+ The event probability such that `bdtr(\lfloor k \rfloor, n, p) = y`.
+
+ See Also
+ --------
+ bdtr
+ betaincinv
+
+ Notes
+ -----
+ The computation is carried out using the inverse beta integral function
+ and the relation,::
+
+ 1 - p = betaincinv(n - k, k + 1, y).
+
+ Wrapper for the Cephes [1]_ routine `bdtri`.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+ """)
+
+add_newdoc("bdtrik",
+ """
+ bdtrik(y, n, p, out=None)
+
+ Inverse function to `bdtr` with respect to `k`.
+
+ Finds the number of successes `k` such that the sum of the terms 0 through
+ `k` of the Binomial probability density for `n` events with probability
+ `p` is equal to the given cumulative probability `y`.
+
+ Parameters
+ ----------
+ y : array_like
+ Cumulative probability (probability of `k` or fewer successes in `n`
+ events).
+ n : array_like
+ Number of events (float).
+ p : array_like
+ Success probability (float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ k : scalar or ndarray
+ The number of successes `k` such that `bdtr(k, n, p) = y`.
+
+ See Also
+ --------
+ bdtr
+
+ Notes
+ -----
+ Formula 26.5.24 of [1]_ (or equivalently [2]_) is used to reduce the binomial
+ distribution to the cumulative incomplete beta distribution.
+
+ Computation of `k` involves a search for a value that produces the desired
+ value of `y`. The search relies on the monotonicity of `y` with `k`.
+
+ Wrapper for the CDFLIB [3]_ Fortran routine `cdfbin`.
+
+ References
+ ----------
+ .. [1] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [2] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17.5#E5
+ .. [3] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+
+ """)
+
+add_newdoc("bdtrin",
+ """
+ bdtrin(k, y, p, out=None)
+
+ Inverse function to `bdtr` with respect to `n`.
+
+ Finds the number of events `n` such that the sum of the terms 0 through
+ `k` of the Binomial probability density for events with probability `p` is
+ equal to the given cumulative probability `y`.
+
+ Parameters
+ ----------
+ k : array_like
+ Number of successes (float).
+ y : array_like
+ Cumulative probability (probability of `k` or fewer successes in `n`
+ events).
+ p : array_like
+ Success probability (float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ n : scalar or ndarray
+ The number of events `n` such that `bdtr(k, n, p) = y`.
+
+ See Also
+ --------
+ bdtr
+
+ Notes
+ -----
+ Formula 26.5.24 of [1]_ (or equivalently [2]_) is used to reduce the binomial
+ distribution to the cumulative incomplete beta distribution.
+
+ Computation of `n` involves a search for a value that produces the desired
+ value of `y`. The search relies on the monotonicity of `y` with `n`.
+
+ Wrapper for the CDFLIB [3]_ Fortran routine `cdfbin`.
+
+ References
+ ----------
+ .. [1] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [2] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17.5#E5
+ .. [3] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+ """)
+
+add_newdoc("btdtria",
+ r"""
+ btdtria(p, b, x, out=None)
+
+ Inverse of `betainc` with respect to `a`.
+
+ This is the inverse of the beta cumulative distribution function, `betainc`,
+ considered as a function of `a`, returning the value of `a` for which
+ `betainc(a, b, x) = p`, or
+
+ .. math::
+ p = \int_0^x \frac{\Gamma(a + b)}{\Gamma(a)\Gamma(b)} t^{a-1} (1-t)^{b-1}\,dt
+
+ Parameters
+ ----------
+ p : array_like
+ Cumulative probability, in [0, 1].
+ b : array_like
+ Shape parameter (`b` > 0).
+ x : array_like
+ The quantile, in [0, 1].
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ a : scalar or ndarray
+ The value of the shape parameter `a` such that `betainc(a, b, x) = p`.
+
+ See Also
+ --------
+ betainc : Regularized incomplete beta function
+ betaincinv : Inverse of the regularized incomplete beta function
+ btdtrib : Inverse of the beta cumulative distribution function, with respect to `b`.
+
+ Notes
+ -----
+ This function wraps the ``ibeta_inva`` routine from the
+ Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ This function is the inverse of `betainc` for fixed
+ values of :math:`b` and :math:`x`.
+
+ >>> a, b, x = 1.2, 3.1, 0.2
+ >>> y = sc.betainc(a, b, x)
+ >>> sc.btdtria(y, b, x)
+ 1.2
+
+ """)
+
+add_newdoc("btdtrib",
+ r"""
+ btdtria(a, p, x, out=None)
+
+ Inverse of `betainc` with respect to `b`.
+
+ This is the inverse of the beta cumulative distribution function, `betainc`,
+ considered as a function of `b`, returning the value of `b` for which
+ `betainc(a, b, x) = p`, or
+
+ .. math::
+ p = \int_0^x \frac{\Gamma(a + b)}{\Gamma(a)\Gamma(b)} t^{a-1} (1-t)^{b-1}\,dt
+
+ Parameters
+ ----------
+ a : array_like
+ Shape parameter (`a` > 0).
+ p : array_like
+ Cumulative probability, in [0, 1].
+ x : array_like
+ The quantile, in [0, 1].
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ b : scalar or ndarray
+ The value of the shape parameter `b` such that `betainc(a, b, x) = p`.
+
+ See Also
+ --------
+ betainc : Regularized incomplete beta function
+ betaincinv : Inverse of the regularized incomplete beta function with
+ respect to `x`.
+ btdtria : Inverse of the beta cumulative distribution function, with respect to `a`.
+
+ Notes
+ -----
+ Wrapper for the `ibeta_invb` routine from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+ >>> a, b, x = 1.2, 3.1, 0.2
+ >>> y = sc.betainc(a, b, x)
+
+ `btdtrib` is the inverse of `betainc` for fixed values of :math:`a` and
+ :math:`x`:
+
+ >>> sc.btdtrib(a, y, x)
+ 3.1
+
+ """)
+
+add_newdoc(
+ "betainc",
+ r"""
+ betainc(a, b, x, out=None)
+
+ Regularized incomplete beta function.
+
+ Computes the regularized incomplete beta function, defined as [1]_:
+
+ .. math::
+
+ I_x(a, b) = \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} \int_0^x
+ t^{a-1}(1-t)^{b-1}dt,
+
+ for :math:`0 \leq x \leq 1`.
+
+ This function is the cumulative distribution function for the beta
+ distribution; its range is [0, 1].
+
+ Parameters
+ ----------
+ a, b : array_like
+ Positive, real-valued parameters
+ x : array_like
+ Real-valued such that :math:`0 \leq x \leq 1`,
+ the upper limit of integration
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the regularized incomplete beta function
+
+ See Also
+ --------
+ beta : beta function
+ betaincinv : inverse of the regularized incomplete beta function
+ betaincc : complement of the regularized incomplete beta function
+ scipy.stats.beta : beta distribution
+
+ Notes
+ -----
+ The term *regularized* in the name of this function refers to the
+ scaling of the function by the gamma function terms shown in the
+ formula. When not qualified as *regularized*, the name *incomplete
+ beta function* often refers to just the integral expression,
+ without the gamma terms. One can use the function `beta` from
+ `scipy.special` to get this "nonregularized" incomplete beta
+ function by multiplying the result of ``betainc(a, b, x)`` by
+ ``beta(a, b)``.
+
+ ``betainc(a, b, x)`` is treated as a two parameter family of functions
+ of a single variable `x`, rather than as a function of three variables.
+ This impacts only the limiting cases ``a = 0``, ``b = 0``, ``a = inf``,
+ ``b = inf``.
+
+ In general
+
+ .. math::
+
+ \lim_{(a, b) \rightarrow (a_0, b_0)} \mathrm{betainc}(a, b, x)
+
+ is treated as a pointwise limit in ``x``. Thus for example,
+ ``betainc(0, b, 0)`` equals ``0`` for ``b > 0``, although it would be
+ indeterminate when considering the simultaneous limit ``(a, x) -> (0+, 0+)``.
+
+ This function wraps the ``ibeta`` routine from the
+ Boost Math C++ library [2]_.
+
+ References
+ ----------
+ .. [1] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17
+ .. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+
+ Let :math:`B(a, b)` be the `beta` function.
+
+ >>> import scipy.special as sc
+
+ The coefficient in terms of `gamma` is equal to
+ :math:`1/B(a, b)`. Also, when :math:`x=1`
+ the integral is equal to :math:`B(a, b)`.
+ Therefore, :math:`I_{x=1}(a, b) = 1` for any :math:`a, b`.
+
+ >>> sc.betainc(0.2, 3.5, 1.0)
+ 1.0
+
+ It satisfies
+ :math:`I_x(a, b) = x^a F(a, 1-b, a+1, x)/ (aB(a, b))`,
+ where :math:`F` is the hypergeometric function `hyp2f1`:
+
+ >>> a, b, x = 1.4, 3.1, 0.5
+ >>> x**a * sc.hyp2f1(a, 1 - b, a + 1, x)/(a * sc.beta(a, b))
+ 0.8148904036225295
+ >>> sc.betainc(a, b, x)
+ 0.8148904036225296
+
+ This functions satisfies the relationship
+ :math:`I_x(a, b) = 1 - I_{1-x}(b, a)`:
+
+ >>> sc.betainc(2.2, 3.1, 0.4)
+ 0.49339638807619446
+ >>> 1 - sc.betainc(3.1, 2.2, 1 - 0.4)
+ 0.49339638807619446
+
+ """)
+
+
+add_newdoc(
+ "betaincc",
+ r"""
+ betaincc(a, b, x, out=None)
+
+ Complement of the regularized incomplete beta function.
+
+ Computes the complement of the regularized incomplete beta function,
+ defined as [1]_:
+
+ .. math::
+
+ \bar{I}_x(a, b) = 1 - I_x(a, b)
+ = 1 - \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} \int_0^x
+ t^{a-1}(1-t)^{b-1}dt,
+
+ for :math:`0 \leq x \leq 1`.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Positive, real-valued parameters
+ x : array_like
+ Real-valued such that :math:`0 \leq x \leq 1`,
+ the upper limit of integration
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the regularized incomplete beta function
+
+ See Also
+ --------
+ betainc : regularized incomplete beta function
+ betaincinv : inverse of the regularized incomplete beta function
+ betainccinv :
+ inverse of the complement of the regularized incomplete beta function
+ beta : beta function
+ scipy.stats.beta : beta distribution
+
+ Notes
+ -----
+ .. versionadded:: 1.11.0
+
+ Like `betainc`, ``betaincc(a, b, x)`` is treated as a two parameter
+ family of functions of a single variable `x`, rather than as a function of
+ three variables. See the `betainc` docstring for more info on how this
+ impacts limiting cases.
+
+ This function wraps the ``ibetac`` routine from the
+ Boost Math C++ library [2]_.
+
+ References
+ ----------
+ .. [1] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17
+ .. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import betaincc, betainc
+
+ The naive calculation ``1 - betainc(a, b, x)`` loses precision when
+ the values of ``betainc(a, b, x)`` are close to 1:
+
+ >>> 1 - betainc(0.5, 8, [0.9, 0.99, 0.999])
+ array([2.0574632e-09, 0.0000000e+00, 0.0000000e+00])
+
+ By using ``betaincc``, we get the correct values:
+
+ >>> betaincc(0.5, 8, [0.9, 0.99, 0.999])
+ array([2.05746321e-09, 1.97259354e-17, 1.96467954e-25])
+
+ """)
+
+add_newdoc(
+ "betaincinv",
+ r"""
+ betaincinv(a, b, y, out=None)
+
+ Inverse of the regularized incomplete beta function.
+
+ Computes :math:`x` such that:
+
+ .. math::
+
+ y = I_x(a, b) = \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}
+ \int_0^x t^{a-1}(1-t)^{b-1}dt,
+
+ where :math:`I_x` is the normalized incomplete beta function `betainc`
+ and :math:`\Gamma` is the `gamma` function [1]_.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Positive, real-valued parameters
+ y : array_like
+ Real-valued input
+ out : ndarray, optional
+ Optional output array for function values
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the inverse of the regularized incomplete beta function
+
+ See Also
+ --------
+ betainc : regularized incomplete beta function
+ gamma : gamma function
+
+ Notes
+ -----
+ This function wraps the ``ibeta_inv`` routine from the
+ Boost Math C++ library [2]_.
+
+ References
+ ----------
+ .. [1] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17
+ .. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ This function is the inverse of `betainc` for fixed
+ values of :math:`a` and :math:`b`.
+
+ >>> a, b = 1.2, 3.1
+ >>> y = sc.betainc(a, b, 0.2)
+ >>> sc.betaincinv(a, b, y)
+ 0.2
+ >>>
+ >>> a, b = 7.5, 0.4
+ >>> x = sc.betaincinv(a, b, 0.5)
+ >>> sc.betainc(a, b, x)
+ 0.5
+
+ """)
+
+
+add_newdoc(
+ "betainccinv",
+ r"""
+ betainccinv(a, b, y, out=None)
+
+ Inverse of the complemented regularized incomplete beta function.
+
+ Computes :math:`x` such that:
+
+ .. math::
+
+ y = 1 - I_x(a, b) = 1 - \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}
+ \int_0^x t^{a-1}(1-t)^{b-1}dt,
+
+ where :math:`I_x` is the normalized incomplete beta function `betainc`
+ and :math:`\Gamma` is the `gamma` function [1]_.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Positive, real-valued parameters
+ y : array_like
+ Real-valued input
+ out : ndarray, optional
+ Optional output array for function values
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the inverse of the regularized incomplete beta function
+
+ See Also
+ --------
+ betainc : regularized incomplete beta function
+ betaincc : complement of the regularized incomplete beta function
+
+ Notes
+ -----
+ .. versionadded:: 1.11.0
+
+ This function wraps the ``ibetac_inv`` routine from the
+ Boost Math C++ library [2]_.
+
+ References
+ ----------
+ .. [1] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17
+ .. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import betainccinv, betaincc
+
+ This function is the inverse of `betaincc` for fixed
+ values of :math:`a` and :math:`b`.
+
+ >>> a, b = 1.2, 3.1
+ >>> y = betaincc(a, b, 0.2)
+ >>> betainccinv(a, b, y)
+ 0.2
+
+ >>> a, b = 7, 2.5
+ >>> x = betainccinv(a, b, 0.875)
+ >>> betaincc(a, b, x)
+ 0.875
+
+ """)
+
+add_newdoc("boxcox",
+ """
+ boxcox(x, lmbda, out=None)
+
+ Compute the Box-Cox transformation.
+
+ The Box-Cox transformation is::
+
+ y = (x**lmbda - 1) / lmbda if lmbda != 0
+ log(x) if lmbda == 0
+
+ Returns `nan` if ``x < 0``.
+ Returns `-inf` if ``x == 0`` and ``lmbda < 0``.
+
+ Parameters
+ ----------
+ x : array_like
+ Data to be transformed.
+ lmbda : array_like
+ Power parameter of the Box-Cox transform.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ Transformed data.
+
+ Notes
+ -----
+
+ .. versionadded:: 0.14.0
+
+ Examples
+ --------
+ >>> from scipy.special import boxcox
+ >>> boxcox([1, 4, 10], 2.5)
+ array([ 0. , 12.4 , 126.09110641])
+ >>> boxcox(2, [0, 1, 2])
+ array([ 0.69314718, 1. , 1.5 ])
+ """)
+
+add_newdoc("boxcox1p",
+ """
+ boxcox1p(x, lmbda, out=None)
+
+ Compute the Box-Cox transformation of 1 + `x`.
+
+ The Box-Cox transformation computed by `boxcox1p` is::
+
+ y = ((1+x)**lmbda - 1) / lmbda if lmbda != 0
+ log(1+x) if lmbda == 0
+
+ Returns `nan` if ``x < -1``.
+ Returns `-inf` if ``x == -1`` and ``lmbda < 0``.
+
+ Parameters
+ ----------
+ x : array_like
+ Data to be transformed.
+ lmbda : array_like
+ Power parameter of the Box-Cox transform.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ Transformed data.
+
+ Notes
+ -----
+
+ .. versionadded:: 0.14.0
+
+ Examples
+ --------
+ >>> from scipy.special import boxcox1p
+ >>> boxcox1p(1e-4, [0, 0.5, 1])
+ array([ 9.99950003e-05, 9.99975001e-05, 1.00000000e-04])
+ >>> boxcox1p([0.01, 0.1], 0.25)
+ array([ 0.00996272, 0.09645476])
+ """)
+
+add_newdoc("inv_boxcox",
+ """
+ inv_boxcox(y, lmbda, out=None)
+
+ Compute the inverse of the Box-Cox transformation.
+
+ Find ``x`` such that::
+
+ y = (x**lmbda - 1) / lmbda if lmbda != 0
+ log(x) if lmbda == 0
+
+ Parameters
+ ----------
+ y : array_like
+ Data to be transformed.
+ lmbda : array_like
+ Power parameter of the Box-Cox transform.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Transformed data.
+
+ Notes
+ -----
+
+ .. versionadded:: 0.16.0
+
+ Examples
+ --------
+ >>> from scipy.special import boxcox, inv_boxcox
+ >>> y = boxcox([1, 4, 10], 2.5)
+ >>> inv_boxcox(y, 2.5)
+ array([1., 4., 10.])
+ """)
+
+add_newdoc("inv_boxcox1p",
+ """
+ inv_boxcox1p(y, lmbda, out=None)
+
+ Compute the inverse of the Box-Cox transformation.
+
+ Find ``x`` such that::
+
+ y = ((1+x)**lmbda - 1) / lmbda if lmbda != 0
+ log(1+x) if lmbda == 0
+
+ Parameters
+ ----------
+ y : array_like
+ Data to be transformed.
+ lmbda : array_like
+ Power parameter of the Box-Cox transform.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Transformed data.
+
+ Notes
+ -----
+
+ .. versionadded:: 0.16.0
+
+ Examples
+ --------
+ >>> from scipy.special import boxcox1p, inv_boxcox1p
+ >>> y = boxcox1p([1, 4, 10], 2.5)
+ >>> inv_boxcox1p(y, 2.5)
+ array([1., 4., 10.])
+ """)
+
+add_newdoc("chdtr",
+ r"""
+ chdtr(v, x, out=None)
+
+ Chi square cumulative distribution function.
+
+ Returns the area under the left tail (from 0 to `x`) of the Chi
+ square probability density function with `v` degrees of freedom:
+
+ .. math::
+
+ \frac{1}{2^{v/2} \Gamma(v/2)} \int_0^x t^{v/2 - 1} e^{-t/2} dt
+
+ Here :math:`\Gamma` is the Gamma function; see `gamma`. This
+ integral can be expressed in terms of the regularized lower
+ incomplete gamma function `gammainc` as
+ ``gammainc(v / 2, x / 2)``. [1]_
+
+ Parameters
+ ----------
+ v : array_like
+ Degrees of freedom.
+ x : array_like
+ Upper bound of the integral.
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the cumulative distribution function.
+
+ See Also
+ --------
+ chdtrc, chdtri, chdtriv, gammainc
+
+ References
+ ----------
+ .. [1] Chi-Square distribution,
+ https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It can be expressed in terms of the regularized lower incomplete
+ gamma function.
+
+ >>> v = 1
+ >>> x = np.arange(4)
+ >>> sc.chdtr(v, x)
+ array([0. , 0.68268949, 0.84270079, 0.91673548])
+ >>> sc.gammainc(v / 2, x / 2)
+ array([0. , 0.68268949, 0.84270079, 0.91673548])
+
+ """)
+
+add_newdoc("chdtrc",
+ r"""
+ chdtrc(v, x, out=None)
+
+ Chi square survival function.
+
+ Returns the area under the right hand tail (from `x` to infinity)
+ of the Chi square probability density function with `v` degrees of
+ freedom:
+
+ .. math::
+
+ \frac{1}{2^{v/2} \Gamma(v/2)} \int_x^\infty t^{v/2 - 1} e^{-t/2} dt
+
+ Here :math:`\Gamma` is the Gamma function; see `gamma`. This
+ integral can be expressed in terms of the regularized upper
+ incomplete gamma function `gammaincc` as
+ ``gammaincc(v / 2, x / 2)``. [1]_
+
+ Parameters
+ ----------
+ v : array_like
+ Degrees of freedom.
+ x : array_like
+ Lower bound of the integral.
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the survival function.
+
+ See Also
+ --------
+ chdtr, chdtri, chdtriv, gammaincc
+
+ References
+ ----------
+ .. [1] Chi-Square distribution,
+ https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It can be expressed in terms of the regularized upper incomplete
+ gamma function.
+
+ >>> v = 1
+ >>> x = np.arange(4)
+ >>> sc.chdtrc(v, x)
+ array([1. , 0.31731051, 0.15729921, 0.08326452])
+ >>> sc.gammaincc(v / 2, x / 2)
+ array([1. , 0.31731051, 0.15729921, 0.08326452])
+
+ """)
+
+add_newdoc("chdtri",
+ """
+ chdtri(v, p, out=None)
+
+ Inverse to `chdtrc` with respect to `x`.
+
+ Returns `x` such that ``chdtrc(v, x) == p``.
+
+ Parameters
+ ----------
+ v : array_like
+ Degrees of freedom.
+ p : array_like
+ Probability.
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Value so that the probability a Chi square random variable
+ with `v` degrees of freedom is greater than `x` equals `p`.
+
+ See Also
+ --------
+ chdtrc, chdtr, chdtriv
+
+ References
+ ----------
+ .. [1] Chi-Square distribution,
+ https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ It inverts `chdtrc`.
+
+ >>> v, p = 1, 0.3
+ >>> sc.chdtrc(v, sc.chdtri(v, p))
+ 0.3
+ >>> x = 1
+ >>> sc.chdtri(v, sc.chdtrc(v, x))
+ 1.0
+
+ """)
+
+add_newdoc("chdtriv",
+ """
+ chdtriv(p, x, out=None)
+
+ Inverse to `chdtr` with respect to `v`.
+
+ Returns `v` such that ``chdtr(v, x) == p``.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability that the Chi square random variable is less than
+ or equal to `x`.
+ x : array_like
+ Nonnegative input.
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ scalar or ndarray
+ Degrees of freedom.
+
+ See Also
+ --------
+ chdtr, chdtrc, chdtri
+
+ Notes
+ -----
+ This function wraps routines from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+ .. [2] Chi-Square distribution,
+ https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ It inverts `chdtr`.
+
+ >>> p, x = 0.5, 1
+ >>> sc.chdtr(sc.chdtriv(p, x), x)
+ 0.5000000000000003
+ >>> v = 1
+ >>> sc.chdtriv(sc.chdtr(v, x), v)
+ 1.0
+
+ """)
+
+add_newdoc("chndtr",
+ r"""
+ chndtr(x, df, nc, out=None)
+
+ Non-central chi square cumulative distribution function
+
+ The cumulative distribution function is given by:
+
+ .. math::
+
+ P(\chi^{\prime 2} \vert \nu, \lambda) =\sum_{j=0}^{\infty}
+ e^{-\lambda /2}
+ \frac{(\lambda /2)^j}{j!} P(\chi^{\prime 2} \vert \nu + 2j),
+
+ where :math:`\nu > 0` is the degrees of freedom (``df``) and
+ :math:`\lambda \geq 0` is the non-centrality parameter (``nc``).
+
+ Parameters
+ ----------
+ x : array_like
+ Upper bound of the integral; must satisfy ``x >= 0``
+ df : array_like
+ Degrees of freedom; must satisfy ``df > 0``
+ nc : array_like
+ Non-centrality parameter; must satisfy ``nc >= 0``
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Value of the non-central chi square cumulative distribution function.
+
+ See Also
+ --------
+ chndtrix: Noncentral Chi Squared distribution quantile
+ chndtridf: Inverse of `chndtr` with respect to `df`
+ chndtrinc: Inverse of `chndtr` with respect to `nc`
+ scipy.stats.ncx2: Non-central chi-squared distribution
+
+ Notes
+ -----
+ The noncentral chi squared distribution is also available in
+ `scipy.stats.ncx2`. ``scipy.stats.ncx2.cdf`` is equivalent to `chndtr`.
+
+ This function wraps routines from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ Compute the noncentral chi squared distribution CDF at one point.
+
+ >>> x = 4.0
+ >>> df = 1.0
+ >>> nc = 5.0
+ >>> sc.chndtr(x, df, nc)
+ 0.40667858759710945
+
+ Plot the noncentral chi squared distribution CDF for different parameters.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(0, 40, 1000)
+ >>> plt.plot(x, sc.chndtr(x, 1, 5), label=r"$df=1,\ nc=5$")
+ >>> plt.plot(x, sc.chndtr(x, 5, 10), label=r"$df=5,\ nc=10$")
+ >>> plt.legend()
+ >>> plt.show()
+
+ """)
+
+add_newdoc("chndtrix",
+ """
+ chndtrix(p, df, nc, out=None)
+
+ Inverse to `chndtr` vs `x`
+
+ Calculated using a search to find a value for `x` that produces the
+ desired value of `p`.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability; must satisfy ``0 <= p < 1``
+ df : array_like
+ Degrees of freedom; must satisfy ``df > 0``
+ nc : array_like
+ Non-centrality parameter; must satisfy ``nc >= 0``
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Value so that the probability a non-central Chi square random variable
+ with `df` degrees of freedom and non-centrality, `nc`, is greater than
+ `x` equals `p`.
+
+ See Also
+ --------
+ chndtr : Noncentral chi-squared distribution CDF
+ chndtridf : inverse of `chndtr` with respect to `cdf`
+ chndtrinc : inverse of `chndtr` with respect to `nc`
+ scipy.stats.ncx2 : Non-central chi-squared distribution
+
+ Notes
+ -----
+ The noncentral chi squared distribution is also available in
+ `scipy.stats.ncx2`. ``scipy.stats.ncx2.ppf`` is equivalent to `chndtrix`.
+
+ This function wraps routines from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import chndtrix, chndtr
+
+ Compute the noncentral chi squared distribution CDF at one point.
+ >>> x, df, nc = 3, 5, 10
+ >>> p = chndtr(x, df, nc)
+
+ `chndtrix` is the inverse of `chndtr` with respect to `x`:
+
+ >>> chndtrix(p, df, nc)
+ 3.0
+
+ """)
+
+add_newdoc("chndtridf",
+ """
+ chndtridf(x, p, nc, out=None)
+
+ Inverse to `chndtr` vs `df`
+
+ Calculated using a search to find a value for `df` that produces the
+ desired value of `p`.
+
+ Parameters
+ ----------
+ x : array_like
+ Upper bound of the integral; must satisfy ``x >= 0``
+ p : array_like
+ Probability; must satisfy ``0 <= p < 1``
+ nc : array_like
+ Non-centrality parameter; must satisfy ``nc >= 0``
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ df : scalar or ndarray
+ Degrees of freedom
+
+ See Also
+ --------
+ chndtr : Noncentral chi-squared distribution CDF
+ chndtrix : inverse of `chndtr` with respect to `x`
+ chndtrinc : inverse of `chndtr` with respect to `nc`
+ scipy.stats.ncx2 : Non-central chi-squared distribution
+
+ Notes
+ -----
+ The noncentral chi squared distribution is also available in
+ `scipy.stats.ncx2`.
+
+ This function wraps routines from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import chndtridf, chndtr
+
+ Compute the noncentral chi squared distribution CDF at one point.
+
+ >>> x, df, nc = 3, 5, 10
+ >>> p = chndtr(x, df, nc)
+
+ `chndtridf` is the inverse of `chndtr` with respect to `df`:
+
+ >>> chndtridf(x, p, nc)
+ 5.0
+
+ """)
+
+add_newdoc("chndtrinc",
+ """
+ chndtrinc(x, df, p, out=None)
+
+ Inverse to `chndtr` vs `nc`
+
+ Calculated using a search to find a value for `df` that produces the
+ desired value of `p`.
+
+ Parameters
+ ----------
+ x : array_like
+ Upper bound of the integral; must satisfy ``x >= 0``
+ df : array_like
+ Degrees of freedom; must satisfy ``df > 0``
+ p : array_like
+ Probability; must satisfy ``0 <= p < 1``
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ nc : scalar or ndarray
+ Non-centrality
+
+ See Also
+ --------
+ chndtr : Noncentral chi-squared distribution CDF
+ chndtridf : inverse of `chndtr` with respect to `df`
+ chndtrinc : inverse of `chndtr` with respect to `nc`
+ scipy.stats.ncx2 : Non-central chi-squared distribution
+
+ Notes
+ -----
+ The noncentral chi squared distribution is also available in
+ `scipy.stats.ncx2`.
+
+ This function wraps routines from the Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import chndtrinc, chndtr
+
+ Compute the noncentral chi squared distribution CDF at one point.
+
+ >>> x, df, nc = 3, 5, 10
+ >>> p = chndtr(x, df, nc)
+
+ `chndtrinc` is the inverse of `chndtr` with respect to `nc`:
+
+ >>> chndtrinc(x, df, p)
+ 10.0
+
+ """)
+
+add_newdoc(
+ "elliprc",
+ r"""
+ elliprc(x, y, out=None)
+
+ Degenerate symmetric elliptic integral.
+
+ The function RC is defined as [1]_
+
+ .. math::
+
+ R_{\mathrm{C}}(x, y) =
+ \frac{1}{2} \int_0^{+\infty} (t + x)^{-1/2} (t + y)^{-1} dt
+ = R_{\mathrm{F}}(x, y, y)
+
+ Parameters
+ ----------
+ x, y : array_like
+ Real or complex input parameters. `x` can be any number in the
+ complex plane cut along the negative real axis. `y` must be non-zero.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ R : scalar or ndarray
+ Value of the integral. If `y` is real and negative, the Cauchy
+ principal value is returned. If both of `x` and `y` are real, the
+ return value is real. Otherwise, the return value is complex.
+
+ See Also
+ --------
+ elliprf : Completely-symmetric elliptic integral of the first kind.
+ elliprd : Symmetric elliptic integral of the second kind.
+ elliprg : Completely-symmetric elliptic integral of the second kind.
+ elliprj : Symmetric elliptic integral of the third kind.
+
+ Notes
+ -----
+ RC is a degenerate case of the symmetric integral RF: ``elliprc(x, y) ==
+ elliprf(x, y, y)``. It is an elementary function rather than an elliptic
+ integral.
+
+ The code implements Carlson's algorithm based on the duplication theorems
+ and series expansion up to the 7th order. [2]_
+
+ .. versionadded:: 1.8.0
+
+ References
+ ----------
+ .. [1] B. C. Carlson, ed., Chapter 19 in "Digital Library of Mathematical
+ Functions," NIST, US Dept. of Commerce.
+ https://dlmf.nist.gov/19.16.E6
+ .. [2] B. C. Carlson, "Numerical computation of real or complex elliptic
+ integrals," Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.
+ https://arxiv.org/abs/math/9409227
+ https://doi.org/10.1007/BF02198293
+
+ Examples
+ --------
+ Basic homogeneity property:
+
+ >>> import numpy as np
+ >>> from scipy.special import elliprc
+
+ >>> x = 1.2 + 3.4j
+ >>> y = 5.
+ >>> scale = 0.3 + 0.4j
+ >>> elliprc(scale*x, scale*y)
+ (0.5484493976710874-0.4169557678995833j)
+
+ >>> elliprc(x, y)/np.sqrt(scale)
+ (0.5484493976710874-0.41695576789958333j)
+
+ When the two arguments coincide, the integral is particularly
+ simple:
+
+ >>> x = 1.2 + 3.4j
+ >>> elliprc(x, x)
+ (0.4299173120614631-0.3041729818745595j)
+
+ >>> 1/np.sqrt(x)
+ (0.4299173120614631-0.30417298187455954j)
+
+ Another simple case: the first argument vanishes:
+
+ >>> y = 1.2 + 3.4j
+ >>> elliprc(0, y)
+ (0.6753125346116815-0.47779380263880866j)
+
+ >>> np.pi/2/np.sqrt(y)
+ (0.6753125346116815-0.4777938026388088j)
+
+ When `x` and `y` are both positive, we can express
+ :math:`R_C(x,y)` in terms of more elementary functions. For the
+ case :math:`0 \le x < y`,
+
+ >>> x = 3.2
+ >>> y = 6.
+ >>> elliprc(x, y)
+ 0.44942991498453444
+
+ >>> np.arctan(np.sqrt((y-x)/x))/np.sqrt(y-x)
+ 0.44942991498453433
+
+ And for the case :math:`0 \le y < x`,
+
+ >>> x = 6.
+ >>> y = 3.2
+ >>> elliprc(x,y)
+ 0.4989837501576147
+
+ >>> np.log((np.sqrt(x)+np.sqrt(x-y))/np.sqrt(y))/np.sqrt(x-y)
+ 0.49898375015761476
+
+ """)
+
+add_newdoc(
+ "elliprd",
+ r"""
+ elliprd(x, y, z, out=None)
+
+ Symmetric elliptic integral of the second kind.
+
+ The function RD is defined as [1]_
+
+ .. math::
+
+ R_{\mathrm{D}}(x, y, z) =
+ \frac{3}{2} \int_0^{+\infty} [(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}
+ dt
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Real or complex input parameters. `x` or `y` can be any number in the
+ complex plane cut along the negative real axis, but at most one of them
+ can be zero, while `z` must be non-zero.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ R : scalar or ndarray
+ Value of the integral. If all of `x`, `y`, and `z` are real, the
+ return value is real. Otherwise, the return value is complex.
+
+ See Also
+ --------
+ elliprc : Degenerate symmetric elliptic integral.
+ elliprf : Completely-symmetric elliptic integral of the first kind.
+ elliprg : Completely-symmetric elliptic integral of the second kind.
+ elliprj : Symmetric elliptic integral of the third kind.
+
+ Notes
+ -----
+ RD is a degenerate case of the elliptic integral RJ: ``elliprd(x, y, z) ==
+ elliprj(x, y, z, z)``.
+
+ The code implements Carlson's algorithm based on the duplication theorems
+ and series expansion up to the 7th order. [2]_
+
+ .. versionadded:: 1.8.0
+
+ References
+ ----------
+ .. [1] B. C. Carlson, ed., Chapter 19 in "Digital Library of Mathematical
+ Functions," NIST, US Dept. of Commerce.
+ https://dlmf.nist.gov/19.16.E5
+ .. [2] B. C. Carlson, "Numerical computation of real or complex elliptic
+ integrals," Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.
+ https://arxiv.org/abs/math/9409227
+ https://doi.org/10.1007/BF02198293
+
+ Examples
+ --------
+ Basic homogeneity property:
+
+ >>> import numpy as np
+ >>> from scipy.special import elliprd
+
+ >>> x = 1.2 + 3.4j
+ >>> y = 5.
+ >>> z = 6.
+ >>> scale = 0.3 + 0.4j
+ >>> elliprd(scale*x, scale*y, scale*z)
+ (-0.03703043835680379-0.24500934665683802j)
+
+ >>> elliprd(x, y, z)*np.power(scale, -1.5)
+ (-0.0370304383568038-0.24500934665683805j)
+
+ All three arguments coincide:
+
+ >>> x = 1.2 + 3.4j
+ >>> elliprd(x, x, x)
+ (-0.03986825876151896-0.14051741840449586j)
+
+ >>> np.power(x, -1.5)
+ (-0.03986825876151894-0.14051741840449583j)
+
+ The so-called "second lemniscate constant":
+
+ >>> elliprd(0, 2, 1)/3
+ 0.5990701173677961
+
+ >>> from scipy.special import gamma
+ >>> gamma(0.75)**2/np.sqrt(2*np.pi)
+ 0.5990701173677959
+
+ """)
+
+add_newdoc(
+ "elliprf",
+ r"""
+ elliprf(x, y, z, out=None)
+
+ Completely-symmetric elliptic integral of the first kind.
+
+ The function RF is defined as [1]_
+
+ .. math::
+
+ R_{\mathrm{F}}(x, y, z) =
+ \frac{1}{2} \int_0^{+\infty} [(t + x) (t + y) (t + z)]^{-1/2} dt
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Real or complex input parameters. `x`, `y`, or `z` can be any number in
+ the complex plane cut along the negative real axis, but at most one of
+ them can be zero.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ R : scalar or ndarray
+ Value of the integral. If all of `x`, `y`, and `z` are real, the return
+ value is real. Otherwise, the return value is complex.
+
+ See Also
+ --------
+ elliprc : Degenerate symmetric integral.
+ elliprd : Symmetric elliptic integral of the second kind.
+ elliprg : Completely-symmetric elliptic integral of the second kind.
+ elliprj : Symmetric elliptic integral of the third kind.
+
+ Notes
+ -----
+ The code implements Carlson's algorithm based on the duplication theorems
+ and series expansion up to the 7th order (cf.:
+ https://dlmf.nist.gov/19.36.i) and the AGM algorithm for the complete
+ integral. [2]_
+
+ .. versionadded:: 1.8.0
+
+ References
+ ----------
+ .. [1] B. C. Carlson, ed., Chapter 19 in "Digital Library of Mathematical
+ Functions," NIST, US Dept. of Commerce.
+ https://dlmf.nist.gov/19.16.E1
+ .. [2] B. C. Carlson, "Numerical computation of real or complex elliptic
+ integrals," Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.
+ https://arxiv.org/abs/math/9409227
+ https://doi.org/10.1007/BF02198293
+
+ Examples
+ --------
+ Basic homogeneity property:
+
+ >>> import numpy as np
+ >>> from scipy.special import elliprf
+
+ >>> x = 1.2 + 3.4j
+ >>> y = 5.
+ >>> z = 6.
+ >>> scale = 0.3 + 0.4j
+ >>> elliprf(scale*x, scale*y, scale*z)
+ (0.5328051227278146-0.4008623567957094j)
+
+ >>> elliprf(x, y, z)/np.sqrt(scale)
+ (0.5328051227278147-0.4008623567957095j)
+
+ All three arguments coincide:
+
+ >>> x = 1.2 + 3.4j
+ >>> elliprf(x, x, x)
+ (0.42991731206146316-0.30417298187455954j)
+
+ >>> 1/np.sqrt(x)
+ (0.4299173120614631-0.30417298187455954j)
+
+ The so-called "first lemniscate constant":
+
+ >>> elliprf(0, 1, 2)
+ 1.3110287771460598
+
+ >>> from scipy.special import gamma
+ >>> gamma(0.25)**2/(4*np.sqrt(2*np.pi))
+ 1.3110287771460598
+
+ """)
+
+add_newdoc(
+ "elliprg",
+ r"""
+ elliprg(x, y, z, out=None)
+
+ Completely-symmetric elliptic integral of the second kind.
+
+ The function RG is defined as [1]_
+
+ .. math::
+
+ R_{\mathrm{G}}(x, y, z) =
+ \frac{1}{4} \int_0^{+\infty} [(t + x) (t + y) (t + z)]^{-1/2}
+ \left(\frac{x}{t + x} + \frac{y}{t + y} + \frac{z}{t + z}\right) t
+ dt
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Real or complex input parameters. `x`, `y`, or `z` can be any number in
+ the complex plane cut along the negative real axis.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ R : scalar or ndarray
+ Value of the integral. If all of `x`, `y`, and `z` are real, the return
+ value is real. Otherwise, the return value is complex.
+
+ See Also
+ --------
+ elliprc : Degenerate symmetric integral.
+ elliprd : Symmetric elliptic integral of the second kind.
+ elliprf : Completely-symmetric elliptic integral of the first kind.
+ elliprj : Symmetric elliptic integral of the third kind.
+
+ Notes
+ -----
+ The implementation uses the relation [1]_
+
+ .. math::
+
+ 2 R_{\mathrm{G}}(x, y, z) =
+ z R_{\mathrm{F}}(x, y, z) -
+ \frac{1}{3} (x - z) (y - z) R_{\mathrm{D}}(x, y, z) +
+ \sqrt{\frac{x y}{z}}
+
+ and the symmetry of `x`, `y`, `z` when at least one non-zero parameter can
+ be chosen as the pivot. When one of the arguments is close to zero, the AGM
+ method is applied instead. Other special cases are computed following Ref.
+ [2]_
+
+ .. versionadded:: 1.8.0
+
+ References
+ ----------
+ .. [1] B. C. Carlson, "Numerical computation of real or complex elliptic
+ integrals," Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.
+ https://arxiv.org/abs/math/9409227
+ https://doi.org/10.1007/BF02198293
+ .. [2] B. C. Carlson, ed., Chapter 19 in "Digital Library of Mathematical
+ Functions," NIST, US Dept. of Commerce.
+ https://dlmf.nist.gov/19.16.E1
+ https://dlmf.nist.gov/19.20.ii
+
+ Examples
+ --------
+ Basic homogeneity property:
+
+ >>> import numpy as np
+ >>> from scipy.special import elliprg
+
+ >>> x = 1.2 + 3.4j
+ >>> y = 5.
+ >>> z = 6.
+ >>> scale = 0.3 + 0.4j
+ >>> elliprg(scale*x, scale*y, scale*z)
+ (1.195936862005246+0.8470988320464167j)
+
+ >>> elliprg(x, y, z)*np.sqrt(scale)
+ (1.195936862005246+0.8470988320464165j)
+
+ Simplifications:
+
+ >>> elliprg(0, y, y)
+ 1.756203682760182
+
+ >>> 0.25*np.pi*np.sqrt(y)
+ 1.7562036827601817
+
+ >>> elliprg(0, 0, z)
+ 1.224744871391589
+
+ >>> 0.5*np.sqrt(z)
+ 1.224744871391589
+
+ The surface area of a triaxial ellipsoid with semiaxes ``a``, ``b``, and
+ ``c`` is given by
+
+ .. math::
+
+ S = 4 \pi a b c R_{\mathrm{G}}(1 / a^2, 1 / b^2, 1 / c^2).
+
+ >>> def ellipsoid_area(a, b, c):
+ ... r = 4.0 * np.pi * a * b * c
+ ... return r * elliprg(1.0 / (a * a), 1.0 / (b * b), 1.0 / (c * c))
+ >>> print(ellipsoid_area(1, 3, 5))
+ 108.62688289491807
+ """)
+
+add_newdoc(
+ "elliprj",
+ r"""
+ elliprj(x, y, z, p, out=None)
+
+ Symmetric elliptic integral of the third kind.
+
+ The function RJ is defined as [1]_
+
+ .. math::
+
+ R_{\mathrm{J}}(x, y, z, p) =
+ \frac{3}{2} \int_0^{+\infty} [(t + x) (t + y) (t + z)]^{-1/2}
+ (t + p)^{-1} dt
+
+ .. warning::
+ This function should be considered experimental when the inputs are
+ unbalanced. Check correctness with another independent implementation.
+
+ Parameters
+ ----------
+ x, y, z, p : array_like
+ Real or complex input parameters. `x`, `y`, or `z` are numbers in
+ the complex plane cut along the negative real axis (subject to further
+ constraints, see Notes), and at most one of them can be zero. `p` must
+ be non-zero.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ R : scalar or ndarray
+ Value of the integral. If all of `x`, `y`, `z`, and `p` are real, the
+ return value is real. Otherwise, the return value is complex.
+
+ If `p` is real and negative, while `x`, `y`, and `z` are real,
+ non-negative, and at most one of them is zero, the Cauchy principal
+ value is returned. [1]_ [2]_
+
+ See Also
+ --------
+ elliprc : Degenerate symmetric integral.
+ elliprd : Symmetric elliptic integral of the second kind.
+ elliprf : Completely-symmetric elliptic integral of the first kind.
+ elliprg : Completely-symmetric elliptic integral of the second kind.
+
+ Notes
+ -----
+ The code implements Carlson's algorithm based on the duplication theorems
+ and series expansion up to the 7th order. [3]_ The algorithm is slightly
+ different from its earlier incarnation as it appears in [1]_, in that the
+ call to `elliprc` (or ``atan``/``atanh``, see [4]_) is no longer needed in
+ the inner loop. Asymptotic approximations are used where arguments differ
+ widely in the order of magnitude. [5]_
+
+ The input values are subject to certain sufficient but not necessary
+ constraints when input arguments are complex. Notably, ``x``, ``y``, and
+ ``z`` must have non-negative real parts, unless two of them are
+ non-negative and complex-conjugates to each other while the other is a real
+ non-negative number. [1]_ If the inputs do not satisfy the sufficient
+ condition described in Ref. [1]_ they are rejected outright with the output
+ set to NaN.
+
+ In the case where one of ``x``, ``y``, and ``z`` is equal to ``p``, the
+ function ``elliprd`` should be preferred because of its less restrictive
+ domain.
+
+ .. versionadded:: 1.8.0
+
+ References
+ ----------
+ .. [1] B. C. Carlson, "Numerical computation of real or complex elliptic
+ integrals," Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.
+ https://arxiv.org/abs/math/9409227
+ https://doi.org/10.1007/BF02198293
+ .. [2] B. C. Carlson, ed., Chapter 19 in "Digital Library of Mathematical
+ Functions," NIST, US Dept. of Commerce.
+ https://dlmf.nist.gov/19.20.iii
+ .. [3] B. C. Carlson, J. FitzSimmons, "Reduction Theorems for Elliptic
+ Integrands with the Square Root of Two Quadratic Factors," J.
+ Comput. Appl. Math., vol. 118, nos. 1-2, pp. 71-85, 2000.
+ https://doi.org/10.1016/S0377-0427(00)00282-X
+ .. [4] F. Johansson, "Numerical Evaluation of Elliptic Functions, Elliptic
+ Integrals and Modular Forms," in J. Blumlein, C. Schneider, P.
+ Paule, eds., "Elliptic Integrals, Elliptic Functions and Modular
+ Forms in Quantum Field Theory," pp. 269-293, 2019 (Cham,
+ Switzerland: Springer Nature Switzerland)
+ https://arxiv.org/abs/1806.06725
+ https://doi.org/10.1007/978-3-030-04480-0
+ .. [5] B. C. Carlson, J. L. Gustafson, "Asymptotic Approximations for
+ Symmetric Elliptic Integrals," SIAM J. Math. Anls., vol. 25, no. 2,
+ pp. 288-303, 1994.
+ https://arxiv.org/abs/math/9310223
+ https://doi.org/10.1137/S0036141092228477
+
+ Examples
+ --------
+ Basic homogeneity property:
+
+ >>> import numpy as np
+ >>> from scipy.special import elliprj
+
+ >>> x = 1.2 + 3.4j
+ >>> y = 5.
+ >>> z = 6.
+ >>> p = 7.
+ >>> scale = 0.3 - 0.4j
+ >>> elliprj(scale*x, scale*y, scale*z, scale*p)
+ (0.10834905565679157+0.19694950747103812j)
+
+ >>> elliprj(x, y, z, p)*np.power(scale, -1.5)
+ (0.10834905565679556+0.19694950747103854j)
+
+ Reduction to simpler elliptic integral:
+
+ >>> elliprj(x, y, z, z)
+ (0.08288462362195129-0.028376809745123258j)
+
+ >>> from scipy.special import elliprd
+ >>> elliprd(x, y, z)
+ (0.08288462362195136-0.028376809745123296j)
+
+ All arguments coincide:
+
+ >>> elliprj(x, x, x, x)
+ (-0.03986825876151896-0.14051741840449586j)
+
+ >>> np.power(x, -1.5)
+ (-0.03986825876151894-0.14051741840449583j)
+
+ """)
+
+add_newdoc("entr",
+ r"""
+ entr(x, out=None)
+
+ Elementwise function for computing entropy.
+
+ .. math:: \text{entr}(x) = \begin{cases} - x \log(x) & x > 0 \\ 0 & x = 0
+ \\ -\infty & \text{otherwise} \end{cases}
+
+ Parameters
+ ----------
+ x : ndarray
+ Input array.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ res : scalar or ndarray
+ The value of the elementwise entropy function at the given points `x`.
+
+ See Also
+ --------
+ kl_div, rel_entr, scipy.stats.entropy
+
+ Notes
+ -----
+ .. versionadded:: 0.15.0
+
+ This function is concave.
+
+ The origin of this function is in convex programming; see [1]_.
+ Given a probability distribution :math:`p_1, \ldots, p_n`,
+ the definition of entropy in the context of *information theory* is
+
+ .. math::
+
+ \sum_{i = 1}^n \mathrm{entr}(p_i).
+
+ To compute the latter quantity, use `scipy.stats.entropy`.
+
+ References
+ ----------
+ .. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.
+ Cambridge University Press, 2004.
+ :doi:`https://doi.org/10.1017/CBO9780511804441`
+
+ """)
+
+add_newdoc(
+ "erfinv",
+ """
+ erfinv(y, out=None)
+
+ Inverse of the error function.
+
+ Computes the inverse of the error function.
+
+ In the complex domain, there is no unique complex number w satisfying
+ erf(w)=z. This indicates a true inverse function would be multivalued.
+ When the domain restricts to the real, -1 < x < 1, there is a unique real
+ number satisfying erf(erfinv(x)) = x.
+
+ Parameters
+ ----------
+ y : ndarray
+ Argument at which to evaluate. Domain: [-1, 1]
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ erfinv : scalar or ndarray
+ The inverse of erf of y, element-wise
+
+ See Also
+ --------
+ erf : Error function of a complex argument
+ erfc : Complementary error function, ``1 - erf(x)``
+ erfcinv : Inverse of the complementary error function
+
+ Notes
+ -----
+ This function wraps the ``erf_inv`` routine from the
+ Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import erfinv, erf
+
+ >>> erfinv(0.5)
+ 0.4769362762044699
+
+ >>> y = np.linspace(-1.0, 1.0, num=9)
+ >>> x = erfinv(y)
+ >>> x
+ array([ -inf, -0.81341985, -0.47693628, -0.22531206, 0. ,
+ 0.22531206, 0.47693628, 0.81341985, inf])
+
+ Verify that ``erf(erfinv(y))`` is ``y``.
+
+ >>> erf(x)
+ array([-1. , -0.75, -0.5 , -0.25, 0. , 0.25, 0.5 , 0.75, 1. ])
+
+ Plot the function:
+
+ >>> y = np.linspace(-1, 1, 200)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(y, erfinv(y))
+ >>> ax.grid(True)
+ >>> ax.set_xlabel('y')
+ >>> ax.set_title('erfinv(y)')
+ >>> plt.show()
+
+ """)
+
+add_newdoc(
+ "erfcinv",
+ """
+ erfcinv(y, out=None)
+
+ Inverse of the complementary error function.
+
+ Computes the inverse of the complementary error function.
+
+ In the complex domain, there is no unique complex number w satisfying
+ erfc(w)=z. This indicates a true inverse function would be multivalued.
+ When the domain restricts to the real, 0 < x < 2, there is a unique real
+ number satisfying erfc(erfcinv(x)) = erfcinv(erfc(x)).
+
+ It is related to inverse of the error function by erfcinv(1-x) = erfinv(x)
+
+ Parameters
+ ----------
+ y : ndarray
+ Argument at which to evaluate. Domain: [0, 2]
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ erfcinv : scalar or ndarray
+ The inverse of erfc of y, element-wise
+
+ See Also
+ --------
+ erf : Error function of a complex argument
+ erfc : Complementary error function, ``1 - erf(x)``
+ erfinv : Inverse of the error function
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import erfcinv
+
+ >>> erfcinv(0.5)
+ 0.4769362762044699
+
+ >>> y = np.linspace(0.0, 2.0, num=11)
+ >>> erfcinv(y)
+ array([ inf, 0.9061938 , 0.59511608, 0.37080716, 0.17914345,
+ -0. , -0.17914345, -0.37080716, -0.59511608, -0.9061938 ,
+ -inf])
+
+ Plot the function:
+
+ >>> y = np.linspace(0, 2, 200)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(y, erfcinv(y))
+ >>> ax.grid(True)
+ >>> ax.set_xlabel('y')
+ >>> ax.set_title('erfcinv(y)')
+ >>> plt.show()
+
+ """)
+
+add_newdoc("eval_jacobi",
+ r"""
+ eval_jacobi(n, alpha, beta, x, out=None)
+
+ Evaluate Jacobi polynomial at a point.
+
+ The Jacobi polynomials can be defined via the Gauss hypergeometric
+ function :math:`{}_2F_1` as
+
+ .. math::
+
+ P_n^{(\alpha, \beta)}(x) = \frac{(\alpha + 1)_n}{\Gamma(n + 1)}
+ {}_2F_1(-n, 1 + \alpha + \beta + n; \alpha + 1; (1 - z)/2)
+
+ where :math:`(\cdot)_n` is the Pochhammer symbol; see `poch`. When
+ :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.42 in [AS]_ or [DLMF]_ for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer the result is
+ determined via the relation to the Gauss hypergeometric
+ function.
+ alpha : array_like
+ Parameter
+ beta : array_like
+ Parameter
+ x : array_like
+ Points at which to evaluate the polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ P : scalar or ndarray
+ Values of the Jacobi polynomial
+
+ See Also
+ --------
+ roots_jacobi : roots and quadrature weights of Jacobi polynomials
+ jacobi : Jacobi polynomial object
+ hyp2f1 : Gauss hypergeometric function
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E7
+
+ """)
+
+add_newdoc("eval_sh_jacobi",
+ r"""
+ eval_sh_jacobi(n, p, q, x, out=None)
+
+ Evaluate shifted Jacobi polynomial at a point.
+
+ Defined by
+
+ .. math::
+
+ G_n^{(p, q)}(x)
+ = \binom{2n + p - 1}{n}^{-1} P_n^{(p - q, q - 1)}(2x - 1),
+
+ where :math:`P_n^{(\cdot, \cdot)}` is the n-th Jacobi polynomial.
+ See 22.5.2 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to `binom` and `eval_jacobi`.
+ p : float
+ Parameter
+ q : float
+ Parameter
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ G : scalar or ndarray
+ Values of the shifted Jacobi polynomial.
+
+ See Also
+ --------
+ roots_sh_jacobi : roots and quadrature weights of shifted Jacobi
+ polynomials
+ sh_jacobi : shifted Jacobi polynomial object
+ eval_jacobi : evaluate Jacobi polynomials
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.1.E2
+
+ """)
+
+add_newdoc("eval_gegenbauer",
+ r"""
+ eval_gegenbauer(n, alpha, x, out=None)
+
+ Evaluate Gegenbauer polynomial at a point.
+
+ The Gegenbauer polynomials can be defined via the Gauss
+ hypergeometric function :math:`{}_2F_1` as
+
+ .. math::
+
+ C_n^{(\alpha)} = \frac{(2\alpha)_n}{\Gamma(n + 1)}
+ {}_2F_1(-n, 2\alpha + n; \alpha + 1/2; (1 - z)/2).
+
+ When :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.46 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to the Gauss hypergeometric
+ function.
+ alpha : array_like
+ Parameter
+ x : array_like
+ Points at which to evaluate the Gegenbauer polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ C : scalar or ndarray
+ Values of the Gegenbauer polynomial
+
+ See Also
+ --------
+ roots_gegenbauer : roots and quadrature weights of Gegenbauer
+ polynomials
+ gegenbauer : Gegenbauer polynomial object
+ hyp2f1 : Gauss hypergeometric function
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E9
+
+ """)
+
+add_newdoc("eval_chebyt",
+ r"""
+ eval_chebyt(n, x, out=None)
+
+ Evaluate Chebyshev polynomial of the first kind at a point.
+
+ The Chebyshev polynomials of the first kind can be defined via the
+ Gauss hypergeometric function :math:`{}_2F_1` as
+
+ .. math::
+
+ T_n(x) = {}_2F_1(n, -n; 1/2; (1 - x)/2).
+
+ When :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.47 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to the Gauss hypergeometric
+ function.
+ x : array_like
+ Points at which to evaluate the Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ T : scalar or ndarray
+ Values of the Chebyshev polynomial
+
+ See Also
+ --------
+ roots_chebyt : roots and quadrature weights of Chebyshev
+ polynomials of the first kind
+ chebyu : Chebychev polynomial object
+ eval_chebyu : evaluate Chebyshev polynomials of the second kind
+ hyp2f1 : Gauss hypergeometric function
+ numpy.polynomial.chebyshev.Chebyshev : Chebyshev series
+
+ Notes
+ -----
+ This routine is numerically stable for `x` in ``[-1, 1]`` at least
+ up to order ``10000``.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E11_2
+
+ """)
+
+add_newdoc("eval_chebyu",
+ r"""
+ eval_chebyu(n, x, out=None)
+
+ Evaluate Chebyshev polynomial of the second kind at a point.
+
+ The Chebyshev polynomials of the second kind can be defined via
+ the Gauss hypergeometric function :math:`{}_2F_1` as
+
+ .. math::
+
+ U_n(x) = (n + 1) {}_2F_1(-n, n + 2; 3/2; (1 - x)/2).
+
+ When :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.48 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to the Gauss hypergeometric
+ function.
+ x : array_like
+ Points at which to evaluate the Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ U : scalar or ndarray
+ Values of the Chebyshev polynomial
+
+ See Also
+ --------
+ roots_chebyu : roots and quadrature weights of Chebyshev
+ polynomials of the second kind
+ chebyu : Chebyshev polynomial object
+ eval_chebyt : evaluate Chebyshev polynomials of the first kind
+ hyp2f1 : Gauss hypergeometric function
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E11_4
+
+ """)
+
+add_newdoc("eval_chebys",
+ r"""
+ eval_chebys(n, x, out=None)
+
+ Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a
+ point.
+
+ These polynomials are defined as
+
+ .. math::
+
+ S_n(x) = U_n(x/2)
+
+ where :math:`U_n` is a Chebyshev polynomial of the second kind.
+ See 22.5.13 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to `eval_chebyu`.
+ x : array_like
+ Points at which to evaluate the Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ S : scalar or ndarray
+ Values of the Chebyshev polynomial
+
+ See Also
+ --------
+ roots_chebys : roots and quadrature weights of Chebyshev
+ polynomials of the second kind on [-2, 2]
+ chebys : Chebyshev polynomial object
+ eval_chebyu : evaluate Chebyshev polynomials of the second kind
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.1.E3
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ They are a scaled version of the Chebyshev polynomials of the
+ second kind.
+
+ >>> x = np.linspace(-2, 2, 6)
+ >>> sc.eval_chebys(3, x)
+ array([-4. , 0.672, 0.736, -0.736, -0.672, 4. ])
+ >>> sc.eval_chebyu(3, x / 2)
+ array([-4. , 0.672, 0.736, -0.736, -0.672, 4. ])
+
+ """)
+
+add_newdoc("eval_chebyc",
+ r"""
+ eval_chebyc(n, x, out=None)
+
+ Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a
+ point.
+
+ These polynomials are defined as
+
+ .. math::
+
+ C_n(x) = 2 T_n(x/2)
+
+ where :math:`T_n` is a Chebyshev polynomial of the first kind. See
+ 22.5.11 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to `eval_chebyt`.
+ x : array_like
+ Points at which to evaluate the Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ C : scalar or ndarray
+ Values of the Chebyshev polynomial
+
+ See Also
+ --------
+ roots_chebyc : roots and quadrature weights of Chebyshev
+ polynomials of the first kind on [-2, 2]
+ chebyc : Chebyshev polynomial object
+ numpy.polynomial.chebyshev.Chebyshev : Chebyshev series
+ eval_chebyt : evaluate Chebycshev polynomials of the first kind
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.1.E3
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ They are a scaled version of the Chebyshev polynomials of the
+ first kind.
+
+ >>> x = np.linspace(-2, 2, 6)
+ >>> sc.eval_chebyc(3, x)
+ array([-2. , 1.872, 1.136, -1.136, -1.872, 2. ])
+ >>> 2 * sc.eval_chebyt(3, x / 2)
+ array([-2. , 1.872, 1.136, -1.136, -1.872, 2. ])
+
+ """)
+
+add_newdoc("eval_sh_chebyt",
+ r"""
+ eval_sh_chebyt(n, x, out=None)
+
+ Evaluate shifted Chebyshev polynomial of the first kind at a
+ point.
+
+ These polynomials are defined as
+
+ .. math::
+
+ T_n^*(x) = T_n(2x - 1)
+
+ where :math:`T_n` is a Chebyshev polynomial of the first kind. See
+ 22.5.14 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to `eval_chebyt`.
+ x : array_like
+ Points at which to evaluate the shifted Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ T : scalar or ndarray
+ Values of the shifted Chebyshev polynomial
+
+ See Also
+ --------
+ roots_sh_chebyt : roots and quadrature weights of shifted
+ Chebyshev polynomials of the first kind
+ sh_chebyt : shifted Chebyshev polynomial object
+ eval_chebyt : evaluate Chebyshev polynomials of the first kind
+ numpy.polynomial.chebyshev.Chebyshev : Chebyshev series
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.7.E7
+
+ """)
+
+add_newdoc("eval_sh_chebyu",
+ r"""
+ eval_sh_chebyu(n, x, out=None)
+
+ Evaluate shifted Chebyshev polynomial of the second kind at a
+ point.
+
+ These polynomials are defined as
+
+ .. math::
+
+ U_n^*(x) = U_n(2x - 1)
+
+ where :math:`U_n` is a Chebyshev polynomial of the first kind. See
+ 22.5.15 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to `eval_chebyu`.
+ x : array_like
+ Points at which to evaluate the shifted Chebyshev polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ U : scalar or ndarray
+ Values of the shifted Chebyshev polynomial
+
+ See Also
+ --------
+ roots_sh_chebyu : roots and quadrature weights of shifted
+ Chebychev polynomials of the second kind
+ sh_chebyu : shifted Chebyshev polynomial object
+ eval_chebyu : evaluate Chebyshev polynomials of the second kind
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.7.E8
+
+ """)
+
+add_newdoc("eval_legendre",
+ r"""
+ eval_legendre(n, x, out=None)
+
+ Evaluate Legendre polynomial at a point.
+
+ The Legendre polynomials can be defined via the Gauss
+ hypergeometric function :math:`{}_2F_1` as
+
+ .. math::
+
+ P_n(x) = {}_2F_1(-n, n + 1; 1; (1 - x)/2).
+
+ When :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.49 in [AS]_ (or equivalently [DLMF]_) for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to the Gauss hypergeometric
+ function.
+ x : array_like
+ Points at which to evaluate the Legendre polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ P : scalar or ndarray
+ Values of the Legendre polynomial
+
+ See Also
+ --------
+ roots_legendre : roots and quadrature weights of Legendre
+ polynomials
+ legendre : Legendre polynomial object
+ hyp2f1 : Gauss hypergeometric function
+ numpy.polynomial.legendre.Legendre : Legendre series
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/15.9.E7
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import eval_legendre
+
+ Evaluate the zero-order Legendre polynomial at x = 0
+
+ >>> eval_legendre(0, 0)
+ 1.0
+
+ Evaluate the first-order Legendre polynomial between -1 and 1
+
+ >>> X = np.linspace(-1, 1, 5) # Domain of Legendre polynomials
+ >>> eval_legendre(1, X)
+ array([-1. , -0.5, 0. , 0.5, 1. ])
+
+ Evaluate Legendre polynomials of order 0 through 4 at x = 0
+
+ >>> N = range(0, 5)
+ >>> eval_legendre(N, 0)
+ array([ 1. , 0. , -0.5 , 0. , 0.375])
+
+ Plot Legendre polynomials of order 0 through 4
+
+ >>> X = np.linspace(-1, 1)
+
+ >>> import matplotlib.pyplot as plt
+ >>> for n in range(0, 5):
+ ... y = eval_legendre(n, X)
+ ... plt.plot(X, y, label=r'$P_{}(x)$'.format(n))
+
+ >>> plt.title("Legendre Polynomials")
+ >>> plt.xlabel("x")
+ >>> plt.ylabel(r'$P_n(x)$')
+ >>> plt.legend(loc='lower right')
+ >>> plt.show()
+
+ """)
+
+add_newdoc("eval_sh_legendre",
+ r"""
+ eval_sh_legendre(n, x, out=None)
+
+ Evaluate shifted Legendre polynomial at a point.
+
+ These polynomials are defined as
+
+ .. math::
+
+ P_n^*(x) = P_n(2x - 1)
+
+ where :math:`P_n` is a Legendre polynomial. See 2.2.11 in [AS]_
+ or [DLMF]_ for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the value is
+ determined via the relation to `eval_legendre`.
+ x : array_like
+ Points at which to evaluate the shifted Legendre polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ P : scalar or ndarray
+ Values of the shifted Legendre polynomial
+
+ See Also
+ --------
+ roots_sh_legendre : roots and quadrature weights of shifted
+ Legendre polynomials
+ sh_legendre : shifted Legendre polynomial object
+ eval_legendre : evaluate Legendre polynomials
+ numpy.polynomial.legendre.Legendre : Legendre series
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.7.E10
+
+ """)
+
+add_newdoc("eval_genlaguerre",
+ r"""
+ eval_genlaguerre(n, alpha, x, out=None)
+
+ Evaluate generalized Laguerre polynomial at a point.
+
+ The generalized Laguerre polynomials can be defined via the
+ confluent hypergeometric function :math:`{}_1F_1` as
+
+ .. math::
+
+ L_n^{(\alpha)}(x) = \binom{n + \alpha}{n}
+ {}_1F_1(-n, \alpha + 1, x).
+
+ When :math:`n` is an integer the result is a polynomial of degree
+ :math:`n`. See 22.5.54 in [AS]_ or [DLMF]_ for details. The Laguerre
+ polynomials are the special case where :math:`\alpha = 0`.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer, the result is
+ determined via the relation to the confluent hypergeometric
+ function.
+ alpha : array_like
+ Parameter; must have ``alpha > -1``
+ x : array_like
+ Points at which to evaluate the generalized Laguerre
+ polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ L : scalar or ndarray
+ Values of the generalized Laguerre polynomial
+
+ See Also
+ --------
+ roots_genlaguerre : roots and quadrature weights of generalized
+ Laguerre polynomials
+ genlaguerre : generalized Laguerre polynomial object
+ hyp1f1 : confluent hypergeometric function
+ eval_laguerre : evaluate Laguerre polynomials
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E12
+
+ """)
+
+add_newdoc("eval_laguerre",
+ r"""
+ eval_laguerre(n, x, out=None)
+
+ Evaluate Laguerre polynomial at a point.
+
+ The Laguerre polynomials can be defined via the confluent
+ hypergeometric function :math:`{}_1F_1` as
+
+ .. math::
+
+ L_n(x) = {}_1F_1(-n, 1, x).
+
+ See 22.5.16 and 22.5.54 in [AS]_ (or equivalently [DLMF1]_ and [DLMF2]_)
+ for details. When :math:`n` is an integer the result is a polynomial
+ of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial. If not an integer the result is
+ determined via the relation to the confluent hypergeometric
+ function.
+ x : array_like
+ Points at which to evaluate the Laguerre polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ L : scalar or ndarray
+ Values of the Laguerre polynomial
+
+ See Also
+ --------
+ roots_laguerre : roots and quadrature weights of Laguerre
+ polynomials
+ laguerre : Laguerre polynomial object
+ numpy.polynomial.laguerre.Laguerre : Laguerre series
+ eval_genlaguerre : evaluate generalized Laguerre polynomials
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF1] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.1#I1.ix7.p1
+ .. [DLMF2] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.E12
+
+ """)
+
+add_newdoc("eval_hermite",
+ r"""
+ eval_hermite(n, x, out=None)
+
+ Evaluate physicist's Hermite polynomial at a point.
+
+ Defined by
+
+ .. math::
+
+ H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2};
+
+ :math:`H_n` is a polynomial of degree :math:`n`. See 22.11.7 in
+ [AS]_ or [DLMF]_ for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial
+ x : array_like
+ Points at which to evaluate the Hermite polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ H : scalar or ndarray
+ Values of the Hermite polynomial
+
+ See Also
+ --------
+ roots_hermite : roots and quadrature weights of physicist's
+ Hermite polynomials
+ hermite : physicist's Hermite polynomial object
+ numpy.polynomial.hermite.Hermite : Physicist's Hermite series
+ eval_hermitenorm : evaluate Probabilist's Hermite polynomials
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.T1
+
+ """)
+
+add_newdoc("eval_hermitenorm",
+ r"""
+ eval_hermitenorm(n, x, out=None)
+
+ Evaluate probabilist's (normalized) Hermite polynomial at a
+ point.
+
+ Defined by
+
+ .. math::
+
+ He_n(x) = (-1)^n e^{x^2/2} \frac{d^n}{dx^n} e^{-x^2/2};
+
+ :math:`He_n` is a polynomial of degree :math:`n`. See 22.11.8 in
+ [AS]_ or [DLMF]_ for details.
+
+ Parameters
+ ----------
+ n : array_like
+ Degree of the polynomial
+ x : array_like
+ Points at which to evaluate the Hermite polynomial
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ He : scalar or ndarray
+ Values of the Hermite polynomial
+
+ See Also
+ --------
+ roots_hermitenorm : roots and quadrature weights of probabilist's
+ Hermite polynomials
+ hermitenorm : probabilist's Hermite polynomial object
+ numpy.polynomial.hermite_e.HermiteE : Probabilist's Hermite series
+ eval_hermite : evaluate physicist's Hermite polynomials
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [DLMF] NIST Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/18.5.T1
+
+ """)
+
+add_newdoc("expn",
+ r"""
+ expn(n, x, out=None)
+
+ Generalized exponential integral En.
+
+ For integer :math:`n \geq 0` and real :math:`x \geq 0` the
+ generalized exponential integral is defined as [DLMF]_
+
+ .. math::
+
+ E_n(x) = x^{n - 1} \int_x^\infty \frac{e^{-t}}{t^n} dt.
+
+ Parameters
+ ----------
+ n : array_like
+ Non-negative integers
+ x : array_like
+ Real argument
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the generalized exponential integral
+
+ See Also
+ --------
+ exp1 : special case of :math:`E_n` for :math:`n = 1`
+ expi : related to :math:`E_n` when :math:`n = 1`
+
+ References
+ ----------
+ .. [DLMF] Digital Library of Mathematical Functions, 8.19.2
+ https://dlmf.nist.gov/8.19#E2
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ Its domain is nonnegative n and x.
+
+ >>> sc.expn(-1, 1.0), sc.expn(1, -1.0)
+ (nan, nan)
+
+ It has a pole at ``x = 0`` for ``n = 1, 2``; for larger ``n`` it
+ is equal to ``1 / (n - 1)``.
+
+ >>> sc.expn([0, 1, 2, 3, 4], 0)
+ array([ inf, inf, 1. , 0.5 , 0.33333333])
+
+ For n equal to 0 it reduces to ``exp(-x) / x``.
+
+ >>> x = np.array([1, 2, 3, 4])
+ >>> sc.expn(0, x)
+ array([0.36787944, 0.06766764, 0.01659569, 0.00457891])
+ >>> np.exp(-x) / x
+ array([0.36787944, 0.06766764, 0.01659569, 0.00457891])
+
+ For n equal to 1 it reduces to `exp1`.
+
+ >>> sc.expn(1, x)
+ array([0.21938393, 0.04890051, 0.01304838, 0.00377935])
+ >>> sc.exp1(x)
+ array([0.21938393, 0.04890051, 0.01304838, 0.00377935])
+
+ """)
+
+add_newdoc("fdtr",
+ r"""
+ fdtr(dfn, dfd, x, out=None)
+
+ F cumulative distribution function.
+
+ Returns the value of the cumulative distribution function of the
+ F-distribution, also known as Snedecor's F-distribution or the
+ Fisher-Snedecor distribution.
+
+ The F-distribution with parameters :math:`d_n` and :math:`d_d` is the
+ distribution of the random variable,
+
+ .. math::
+ X = \frac{U_n/d_n}{U_d/d_d},
+
+ where :math:`U_n` and :math:`U_d` are random variables distributed
+ :math:`\chi^2`, with :math:`d_n` and :math:`d_d` degrees of freedom,
+ respectively.
+
+ Parameters
+ ----------
+ dfn : array_like
+ First parameter (positive float).
+ dfd : array_like
+ Second parameter (positive float).
+ x : array_like
+ Argument (nonnegative float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ The CDF of the F-distribution with parameters `dfn` and `dfd` at `x`.
+
+ See Also
+ --------
+ fdtrc : F distribution survival function
+ fdtri : F distribution inverse cumulative distribution
+ scipy.stats.f : F distribution
+
+ Notes
+ -----
+ The regularized incomplete beta function is used, according to the
+ formula,
+
+ .. math::
+ F(d_n, d_d; x) = I_{xd_n/(d_d + xd_n)}(d_n/2, d_d/2).
+
+ Wrapper for a routine from the Boost Math C++ library [1]_. The
+ F distribution is also available as `scipy.stats.f`. Calling
+ `fdtr` directly can improve performance compared to the ``cdf``
+ method of `scipy.stats.f` (see last example below).
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+
+ Examples
+ --------
+ Calculate the function for ``dfn=1`` and ``dfd=2`` at ``x=1``.
+
+ >>> import numpy as np
+ >>> from scipy.special import fdtr
+ >>> fdtr(1, 2, 1)
+ 0.5773502691896258
+
+ Calculate the function at several points by providing a NumPy array for
+ `x`.
+
+ >>> x = np.array([0.5, 2., 3.])
+ >>> fdtr(1, 2, x)
+ array([0.4472136 , 0.70710678, 0.77459667])
+
+ Plot the function for several parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> dfn_parameters = [1, 5, 10, 50]
+ >>> dfd_parameters = [1, 1, 2, 3]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(dfn_parameters, dfd_parameters,
+ ... linestyles))
+ >>> x = np.linspace(0, 30, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> for parameter_set in parameters_list:
+ ... dfn, dfd, style = parameter_set
+ ... fdtr_vals = fdtr(dfn, dfd, x)
+ ... ax.plot(x, fdtr_vals, label=rf"$d_n={dfn},\, d_d={dfd}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title("F distribution cumulative distribution function")
+ >>> plt.show()
+
+ The F distribution is also available as `scipy.stats.f`. Using `fdtr`
+ directly can be much faster than calling the ``cdf`` method of
+ `scipy.stats.f`, especially for small arrays or individual values.
+ To get the same results one must use the following parametrization:
+ ``stats.f(dfn, dfd).cdf(x)=fdtr(dfn, dfd, x)``.
+
+ >>> from scipy.stats import f
+ >>> dfn, dfd = 1, 2
+ >>> x = 1
+ >>> fdtr_res = fdtr(dfn, dfd, x) # this will often be faster than below
+ >>> f_dist_res = f(dfn, dfd).cdf(x)
+ >>> fdtr_res == f_dist_res # test that results are equal
+ True
+ """)
+
+add_newdoc("fdtrc",
+ r"""
+ fdtrc(dfn, dfd, x, out=None)
+
+ F survival function.
+
+ Returns the complemented F-distribution function (the integral of the
+ density from `x` to infinity).
+
+ Parameters
+ ----------
+ dfn : array_like
+ First parameter (positive float).
+ dfd : array_like
+ Second parameter (positive float).
+ x : array_like
+ Argument (nonnegative float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ y : scalar or ndarray
+ The complemented F-distribution function with parameters `dfn` and
+ `dfd` at `x`.
+
+ See Also
+ --------
+ fdtr : F distribution cumulative distribution function
+ fdtri : F distribution inverse cumulative distribution function
+ scipy.stats.f : F distribution
+
+ Notes
+ -----
+ The regularized incomplete beta function is used, according to the
+ formula,
+
+ .. math::
+ F(d_n, d_d; x) = I_{d_d/(d_d + xd_n)}(d_d/2, d_n/2).
+
+ Wrapper for a routine from the Boost Math C++ library [1]_. The
+ F distribution is also available as `scipy.stats.f`. Calling
+ `fdtrc` directly can improve performance compared to the ``sf``
+ method of `scipy.stats.f` (see last example below).
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ Calculate the function for ``dfn=1`` and ``dfd=2`` at ``x=1``.
+
+ >>> import numpy as np
+ >>> from scipy.special import fdtrc
+ >>> fdtrc(1, 2, 1)
+ 0.42264973081037427
+
+ Calculate the function at several points by providing a NumPy array for
+ `x`.
+
+ >>> x = np.array([0.5, 2., 3.])
+ >>> fdtrc(1, 2, x)
+ array([0.5527864 , 0.29289322, 0.22540333])
+
+ Plot the function for several parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> dfn_parameters = [1, 5, 10, 50]
+ >>> dfd_parameters = [1, 1, 2, 3]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(dfn_parameters, dfd_parameters,
+ ... linestyles))
+ >>> x = np.linspace(0, 30, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> for parameter_set in parameters_list:
+ ... dfn, dfd, style = parameter_set
+ ... fdtrc_vals = fdtrc(dfn, dfd, x)
+ ... ax.plot(x, fdtrc_vals, label=rf"$d_n={dfn},\, d_d={dfd}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title("F distribution survival function")
+ >>> plt.show()
+
+ The F distribution is also available as `scipy.stats.f`. Using `fdtrc`
+ directly can be much faster than calling the ``sf`` method of
+ `scipy.stats.f`, especially for small arrays or individual values.
+ To get the same results one must use the following parametrization:
+ ``stats.f(dfn, dfd).sf(x)=fdtrc(dfn, dfd, x)``.
+
+ >>> from scipy.stats import f
+ >>> dfn, dfd = 1, 2
+ >>> x = 1
+ >>> fdtrc_res = fdtrc(dfn, dfd, x) # this will often be faster than below
+ >>> f_dist_res = f(dfn, dfd).sf(x)
+ >>> f_dist_res == fdtrc_res # test that results are equal
+ True
+ """)
+
+add_newdoc("fdtri",
+ r"""
+ fdtri(dfn, dfd, p, out=None)
+
+ The `p`-th quantile of the F-distribution.
+
+ This function is the inverse of the F-distribution CDF, `fdtr`, returning
+ the `x` such that `fdtr(dfn, dfd, x) = p`.
+
+ Parameters
+ ----------
+ dfn : array_like
+ First parameter (positive float).
+ dfd : array_like
+ Second parameter (positive float).
+ p : array_like
+ Cumulative probability, in [0, 1].
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ x : scalar or ndarray
+ The quantile corresponding to `p`.
+
+ See Also
+ --------
+ fdtr : F distribution cumulative distribution function
+ fdtrc : F distribution survival function
+ scipy.stats.f : F distribution
+
+ Notes
+ -----
+ Wrapper for a routine from the Boost Math C++ library [1]_. The
+ F distribution is also available as `scipy.stats.f`. Calling
+ `fdtri` directly can improve performance compared to the ``ppf``
+ method of `scipy.stats.f` (see last example below).
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ `fdtri` represents the inverse of the F distribution CDF which is
+ available as `fdtr`. Here, we calculate the CDF for ``df1=1``, ``df2=2``
+ at ``x=3``. `fdtri` then returns ``3`` given the same values for `df1`,
+ `df2` and the computed CDF value.
+
+ >>> import numpy as np
+ >>> from scipy.special import fdtri, fdtr
+ >>> df1, df2 = 1, 2
+ >>> x = 3
+ >>> cdf_value = fdtr(df1, df2, x)
+ >>> fdtri(df1, df2, cdf_value)
+ 3.000000000000006
+
+ Calculate the function at several points by providing a NumPy array for
+ `x`.
+
+ >>> x = np.array([0.1, 0.4, 0.7])
+ >>> fdtri(1, 2, x)
+ array([0.02020202, 0.38095238, 1.92156863])
+
+ Plot the function for several parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> dfn_parameters = [50, 10, 1, 50]
+ >>> dfd_parameters = [0.5, 1, 1, 5]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(dfn_parameters, dfd_parameters,
+ ... linestyles))
+ >>> x = np.linspace(0, 1, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> for parameter_set in parameters_list:
+ ... dfn, dfd, style = parameter_set
+ ... fdtri_vals = fdtri(dfn, dfd, x)
+ ... ax.plot(x, fdtri_vals, label=rf"$d_n={dfn},\, d_d={dfd}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$x$")
+ >>> title = "F distribution inverse cumulative distribution function"
+ >>> ax.set_title(title)
+ >>> ax.set_ylim(0, 30)
+ >>> plt.show()
+
+ The F distribution is also available as `scipy.stats.f`. Using `fdtri`
+ directly can be much faster than calling the ``ppf`` method of
+ `scipy.stats.f`, especially for small arrays or individual values.
+ To get the same results one must use the following parametrization:
+ ``stats.f(dfn, dfd).ppf(x)=fdtri(dfn, dfd, x)``.
+
+ >>> from scipy.stats import f
+ >>> dfn, dfd = 1, 2
+ >>> x = 0.7
+ >>> fdtri_res = fdtri(dfn, dfd, x) # this will often be faster than below
+ >>> f_dist_res = f(dfn, dfd).ppf(x)
+ >>> f_dist_res == fdtri_res # test that results are equal
+ True
+ """)
+
+add_newdoc("fdtridfd",
+ """
+ fdtridfd(dfn, p, x, out=None)
+
+ Inverse to `fdtr` vs dfd
+
+ Finds the F density argument dfd such that ``fdtr(dfn, dfd, x) == p``.
+
+ Parameters
+ ----------
+ dfn : array_like
+ First parameter (positive float).
+ p : array_like
+ Cumulative probability, in [0, 1].
+ x : array_like
+ Argument (nonnegative float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ dfd : scalar or ndarray
+ `dfd` such that ``fdtr(dfn, dfd, x) == p``.
+
+ See Also
+ --------
+ fdtr : F distribution cumulative distribution function
+ fdtrc : F distribution survival function
+ fdtri : F distribution quantile function
+ scipy.stats.f : F distribution
+
+ Examples
+ --------
+ Compute the F distribution cumulative distribution function for one
+ parameter set.
+
+ >>> from scipy.special import fdtridfd, fdtr
+ >>> dfn, dfd, x = 10, 5, 2
+ >>> cdf_value = fdtr(dfn, dfd, x)
+ >>> cdf_value
+ 0.7700248806501017
+
+ Verify that `fdtridfd` recovers the original value for `dfd`:
+
+ >>> fdtridfd(dfn, cdf_value, x)
+ 5.0
+ """)
+
+'''
+commented out as fdtridfn seems to have bugs and is not in functions.json
+see: https://github.com/scipy/scipy/pull/15622#discussion_r811440983
+
+add_newdoc(
+ "fdtridfn",
+ """
+ fdtridfn(p, dfd, x, out=None)
+
+ Inverse to `fdtr` vs dfn
+
+ finds the F density argument dfn such that ``fdtr(dfn, dfd, x) == p``.
+
+
+ Parameters
+ ----------
+ p : array_like
+ Cumulative probability, in [0, 1].
+ dfd : array_like
+ Second parameter (positive float).
+ x : array_like
+ Argument (nonnegative float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ dfn : scalar or ndarray
+ `dfn` such that ``fdtr(dfn, dfd, x) == p``.
+
+ See Also
+ --------
+ fdtr, fdtrc, fdtri, fdtridfd
+
+
+ """)
+'''
+
+add_newdoc("gdtr",
+ r"""
+ gdtr(a, b, x, out=None)
+
+ Gamma distribution cumulative distribution function.
+
+ Returns the integral from zero to `x` of the gamma probability density
+ function,
+
+ .. math::
+
+ F = \int_0^x \frac{a^b}{\Gamma(b)} t^{b-1} e^{-at}\,dt,
+
+ where :math:`\Gamma` is the gamma function.
+
+ Parameters
+ ----------
+ a : array_like
+ The rate parameter of the gamma distribution, sometimes denoted
+ :math:`\beta` (float). It is also the reciprocal of the scale
+ parameter :math:`\theta`.
+ b : array_like
+ The shape parameter of the gamma distribution, sometimes denoted
+ :math:`\alpha` (float).
+ x : array_like
+ The quantile (upper limit of integration; float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ F : scalar or ndarray
+ The CDF of the gamma distribution with parameters `a` and `b`
+ evaluated at `x`.
+
+ See Also
+ --------
+ gdtrc : 1 - CDF of the gamma distribution.
+ scipy.stats.gamma: Gamma distribution
+
+ Notes
+ -----
+ The evaluation is carried out using the relation to the incomplete gamma
+ integral (regularized gamma function).
+
+ Wrapper for the Cephes [1]_ routine `gdtr`. Calling `gdtr` directly can
+ improve performance compared to the ``cdf`` method of `scipy.stats.gamma`
+ (see last example below).
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ Compute the function for ``a=1``, ``b=2`` at ``x=5``.
+
+ >>> import numpy as np
+ >>> from scipy.special import gdtr
+ >>> import matplotlib.pyplot as plt
+ >>> gdtr(1., 2., 5.)
+ 0.9595723180054873
+
+ Compute the function for ``a=1`` and ``b=2`` at several points by
+ providing a NumPy array for `x`.
+
+ >>> xvalues = np.array([1., 2., 3., 4])
+ >>> gdtr(1., 1., xvalues)
+ array([0.63212056, 0.86466472, 0.95021293, 0.98168436])
+
+ `gdtr` can evaluate different parameter sets by providing arrays with
+ broadcasting compatible shapes for `a`, `b` and `x`. Here we compute the
+ function for three different `a` at four positions `x` and ``b=3``,
+ resulting in a 3x4 array.
+
+ >>> a = np.array([[0.5], [1.5], [2.5]])
+ >>> x = np.array([1., 2., 3., 4])
+ >>> a.shape, x.shape
+ ((3, 1), (4,))
+
+ >>> gdtr(a, 3., x)
+ array([[0.01438768, 0.0803014 , 0.19115317, 0.32332358],
+ [0.19115317, 0.57680992, 0.82642193, 0.9380312 ],
+ [0.45618688, 0.87534798, 0.97974328, 0.9972306 ]])
+
+ Plot the function for four different parameter sets.
+
+ >>> a_parameters = [0.3, 1, 2, 6]
+ >>> b_parameters = [2, 10, 15, 20]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(a_parameters, b_parameters, linestyles))
+ >>> x = np.linspace(0, 30, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> for parameter_set in parameters_list:
+ ... a, b, style = parameter_set
+ ... gdtr_vals = gdtr(a, b, x)
+ ... ax.plot(x, gdtr_vals, label=fr"$a= {a},\, b={b}$", ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title("Gamma distribution cumulative distribution function")
+ >>> plt.show()
+
+ The gamma distribution is also available as `scipy.stats.gamma`. Using
+ `gdtr` directly can be much faster than calling the ``cdf`` method of
+ `scipy.stats.gamma`, especially for small arrays or individual values.
+ To get the same results one must use the following parametrization:
+ ``stats.gamma(b, scale=1/a).cdf(x)=gdtr(a, b, x)``.
+
+ >>> from scipy.stats import gamma
+ >>> a = 2.
+ >>> b = 3
+ >>> x = 1.
+ >>> gdtr_result = gdtr(a, b, x) # this will often be faster than below
+ >>> gamma_dist_result = gamma(b, scale=1/a).cdf(x)
+ >>> gdtr_result == gamma_dist_result # test that results are equal
+ True
+ """)
+
+add_newdoc("gdtrc",
+ r"""
+ gdtrc(a, b, x, out=None)
+
+ Gamma distribution survival function.
+
+ Integral from `x` to infinity of the gamma probability density function,
+
+ .. math::
+
+ F = \int_x^\infty \frac{a^b}{\Gamma(b)} t^{b-1} e^{-at}\,dt,
+
+ where :math:`\Gamma` is the gamma function.
+
+ Parameters
+ ----------
+ a : array_like
+ The rate parameter of the gamma distribution, sometimes denoted
+ :math:`\beta` (float). It is also the reciprocal of the scale
+ parameter :math:`\theta`.
+ b : array_like
+ The shape parameter of the gamma distribution, sometimes denoted
+ :math:`\alpha` (float).
+ x : array_like
+ The quantile (lower limit of integration; float).
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ F : scalar or ndarray
+ The survival function of the gamma distribution with parameters `a`
+ and `b` evaluated at `x`.
+
+ See Also
+ --------
+ gdtr: Gamma distribution cumulative distribution function
+ scipy.stats.gamma: Gamma distribution
+ gdtrix
+
+ Notes
+ -----
+ The evaluation is carried out using the relation to the incomplete gamma
+ integral (regularized gamma function).
+
+ Wrapper for the Cephes [1]_ routine `gdtrc`. Calling `gdtrc` directly can
+ improve performance compared to the ``sf`` method of `scipy.stats.gamma`
+ (see last example below).
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ Compute the function for ``a=1`` and ``b=2`` at ``x=5``.
+
+ >>> import numpy as np
+ >>> from scipy.special import gdtrc
+ >>> import matplotlib.pyplot as plt
+ >>> gdtrc(1., 2., 5.)
+ 0.04042768199451279
+
+ Compute the function for ``a=1``, ``b=2`` at several points by providing
+ a NumPy array for `x`.
+
+ >>> xvalues = np.array([1., 2., 3., 4])
+ >>> gdtrc(1., 1., xvalues)
+ array([0.36787944, 0.13533528, 0.04978707, 0.01831564])
+
+ `gdtrc` can evaluate different parameter sets by providing arrays with
+ broadcasting compatible shapes for `a`, `b` and `x`. Here we compute the
+ function for three different `a` at four positions `x` and ``b=3``,
+ resulting in a 3x4 array.
+
+ >>> a = np.array([[0.5], [1.5], [2.5]])
+ >>> x = np.array([1., 2., 3., 4])
+ >>> a.shape, x.shape
+ ((3, 1), (4,))
+
+ >>> gdtrc(a, 3., x)
+ array([[0.98561232, 0.9196986 , 0.80884683, 0.67667642],
+ [0.80884683, 0.42319008, 0.17357807, 0.0619688 ],
+ [0.54381312, 0.12465202, 0.02025672, 0.0027694 ]])
+
+ Plot the function for four different parameter sets.
+
+ >>> a_parameters = [0.3, 1, 2, 6]
+ >>> b_parameters = [2, 10, 15, 20]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(a_parameters, b_parameters, linestyles))
+ >>> x = np.linspace(0, 30, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> for parameter_set in parameters_list:
+ ... a, b, style = parameter_set
+ ... gdtrc_vals = gdtrc(a, b, x)
+ ... ax.plot(x, gdtrc_vals, label=fr"$a= {a},\, b={b}$", ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title("Gamma distribution survival function")
+ >>> plt.show()
+
+ The gamma distribution is also available as `scipy.stats.gamma`.
+ Using `gdtrc` directly can be much faster than calling the ``sf`` method
+ of `scipy.stats.gamma`, especially for small arrays or individual
+ values. To get the same results one must use the following parametrization:
+ ``stats.gamma(b, scale=1/a).sf(x)=gdtrc(a, b, x)``.
+
+ >>> from scipy.stats import gamma
+ >>> a = 2
+ >>> b = 3
+ >>> x = 1.
+ >>> gdtrc_result = gdtrc(a, b, x) # this will often be faster than below
+ >>> gamma_dist_result = gamma(b, scale=1/a).sf(x)
+ >>> gdtrc_result == gamma_dist_result # test that results are equal
+ True
+ """)
+
+add_newdoc("gdtria",
+ """
+ gdtria(p, b, x, out=None)
+
+ Inverse of `gdtr` vs a.
+
+ Returns the inverse with respect to the parameter `a` of ``p =
+ gdtr(a, b, x)``, the cumulative distribution function of the gamma
+ distribution.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability values.
+ b : array_like
+ `b` parameter values of `gdtr(a, b, x)`. `b` is the "shape" parameter
+ of the gamma distribution.
+ x : array_like
+ Nonnegative real values, from the domain of the gamma distribution.
+ out : ndarray, optional
+ If a fourth argument is given, it must be a numpy.ndarray whose size
+ matches the broadcast result of `a`, `b` and `x`. `out` is then the
+ array returned by the function.
+
+ Returns
+ -------
+ a : scalar or ndarray
+ Values of the `a` parameter such that ``p = gdtr(a, b, x)`. ``1/a``
+ is the "scale" parameter of the gamma distribution.
+
+ See Also
+ --------
+ gdtr : CDF of the gamma distribution.
+ gdtrib : Inverse with respect to `b` of `gdtr(a, b, x)`.
+ gdtrix : Inverse with respect to `x` of `gdtr(a, b, x)`.
+
+ Notes
+ -----
+ Wrapper for the CDFLIB [1]_ Fortran routine `cdfgam`.
+
+ The cumulative distribution function `p` is computed using a routine by
+ DiDinato and Morris [2]_. Computation of `a` involves a search for a value
+ that produces the desired value of `p`. The search relies on the
+ monotonicity of `p` with `a`.
+
+ References
+ ----------
+ .. [1] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+ .. [2] DiDinato, A. R. and Morris, A. H.,
+ Computation of the incomplete gamma function ratios and their
+ inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.
+
+ Examples
+ --------
+ First evaluate `gdtr`.
+
+ >>> from scipy.special import gdtr, gdtria
+ >>> p = gdtr(1.2, 3.4, 5.6)
+ >>> print(p)
+ 0.94378087442
+
+ Verify the inverse.
+
+ >>> gdtria(p, 3.4, 5.6)
+ 1.2
+ """)
+
+add_newdoc("gdtrib",
+ """
+ gdtrib(a, p, x, out=None)
+
+ Inverse of `gdtr` vs b.
+
+ Returns the inverse with respect to the parameter `b` of ``p =
+ gdtr(a, b, x)``, the cumulative distribution function of the gamma
+ distribution.
+
+ Parameters
+ ----------
+ a : array_like
+ `a` parameter values of ``gdtr(a, b, x)`. ``1/a`` is the "scale"
+ parameter of the gamma distribution.
+ p : array_like
+ Probability values.
+ x : array_like
+ Nonnegative real values, from the domain of the gamma distribution.
+ out : ndarray, optional
+ If a fourth argument is given, it must be a numpy.ndarray whose size
+ matches the broadcast result of `a`, `b` and `x`. `out` is then the
+ array returned by the function.
+
+ Returns
+ -------
+ b : scalar or ndarray
+ Values of the `b` parameter such that `p = gdtr(a, b, x)`. `b` is
+ the "shape" parameter of the gamma distribution.
+
+ See Also
+ --------
+ gdtr : CDF of the gamma distribution.
+ gdtria : Inverse with respect to `a` of `gdtr(a, b, x)`.
+ gdtrix : Inverse with respect to `x` of `gdtr(a, b, x)`.
+
+ Notes
+ -----
+
+ The cumulative distribution function `p` is computed using the Cephes [1]_
+ routines `igam` and `igamc`. Computation of `b` involves a search for a value
+ that produces the desired value of `p` using Chandrupatla's bracketing
+ root finding algorithm [2]_.
+
+ Note that there are some edge cases where `gdtrib` is extended by taking
+ limits where they are uniquely defined. In particular
+ ``x == 0`` with ``p > 0`` and ``p == 0`` with ``x > 0``.
+ For these edge cases, a numerical result will be returned for
+ ``gdtrib(a, p, x)`` even though ``gdtr(a, gdtrib(a, p, x), x)`` is
+ undefined.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+ .. [2] Chandrupatla, Tirupathi R.
+ "A new hybrid quadratic/bisection algorithm for finding the zero of a
+ nonlinear function without using derivatives".
+ Advances in Engineering Software, 28(3), 145-149.
+ https://doi.org/10.1016/s0965-9978(96)00051-8
+
+ Examples
+ --------
+ First evaluate `gdtr`.
+
+ >>> from scipy.special import gdtr, gdtrib
+ >>> p = gdtr(1.2, 3.4, 5.6)
+ >>> print(p)
+ 0.94378087442
+
+ Verify the inverse.
+
+ >>> gdtrib(1.2, p, 5.6)
+ 3.3999999999999995
+ """)
+
+add_newdoc("gdtrix",
+ """
+ gdtrix(a, b, p, out=None)
+
+ Inverse of `gdtr` vs x.
+
+ Returns the inverse with respect to the parameter `x` of ``p =
+ gdtr(a, b, x)``, the cumulative distribution function of the gamma
+ distribution. This is also known as the pth quantile of the
+ distribution.
+
+ Parameters
+ ----------
+ a : array_like
+ `a` parameter values of ``gdtr(a, b, x)``. ``1/a`` is the "scale"
+ parameter of the gamma distribution.
+ b : array_like
+ `b` parameter values of ``gdtr(a, b, x)``. `b` is the "shape" parameter
+ of the gamma distribution.
+ p : array_like
+ Probability values.
+ out : ndarray, optional
+ If a fourth argument is given, it must be a numpy.ndarray whose size
+ matches the broadcast result of `a`, `b` and `x`. `out` is then the
+ array returned by the function.
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Values of the `x` parameter such that `p = gdtr(a, b, x)`.
+
+ See Also
+ --------
+ gdtr : CDF of the gamma distribution.
+ gdtria : Inverse with respect to `a` of ``gdtr(a, b, x)``.
+ gdtrib : Inverse with respect to `b` of ``gdtr(a, b, x)``.
+
+ Notes
+ -----
+ Wrapper for the CDFLIB [1]_ Fortran routine `cdfgam`.
+
+ The cumulative distribution function `p` is computed using a routine by
+ DiDinato and Morris [2]_. Computation of `x` involves a search for a value
+ that produces the desired value of `p`. The search relies on the
+ monotonicity of `p` with `x`.
+
+ References
+ ----------
+ .. [1] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+ .. [2] DiDinato, A. R. and Morris, A. H.,
+ Computation of the incomplete gamma function ratios and their
+ inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.
+
+ Examples
+ --------
+ First evaluate `gdtr`.
+
+ >>> from scipy.special import gdtr, gdtrix
+ >>> p = gdtr(1.2, 3.4, 5.6)
+ >>> print(p)
+ 0.94378087442
+
+ Verify the inverse.
+
+ >>> gdtrix(1.2, 3.4, p)
+ 5.5999999999999996
+ """)
+
+
+
+add_newdoc("huber",
+ r"""
+ huber(delta, r, out=None)
+
+ Huber loss function.
+
+ .. math:: \text{huber}(\delta, r) = \begin{cases} \infty & \delta < 0 \\
+ \frac{1}{2}r^2 & 0 \le \delta, | r | \le \delta \\
+ \delta ( |r| - \frac{1}{2}\delta ) & \text{otherwise} \end{cases}
+
+ Parameters
+ ----------
+ delta : ndarray
+ Input array, indicating the quadratic vs. linear loss changepoint.
+ r : ndarray
+ Input array, possibly representing residuals.
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ scalar or ndarray
+ The computed Huber loss function values.
+
+ See Also
+ --------
+ pseudo_huber : smooth approximation of this function
+
+ Notes
+ -----
+ `huber` is useful as a loss function in robust statistics or machine
+ learning to reduce the influence of outliers as compared to the common
+ squared error loss, residuals with a magnitude higher than `delta` are
+ not squared [1]_.
+
+ Typically, `r` represents residuals, the difference
+ between a model prediction and data. Then, for :math:`|r|\leq\delta`,
+ `huber` resembles the squared error and for :math:`|r|>\delta` the
+ absolute error. This way, the Huber loss often achieves
+ a fast convergence in model fitting for small residuals like the squared
+ error loss function and still reduces the influence of outliers
+ (:math:`|r|>\delta`) like the absolute error loss. As :math:`\delta` is
+ the cutoff between squared and absolute error regimes, it has
+ to be tuned carefully for each problem. `huber` is also
+ convex, making it suitable for gradient based optimization.
+
+ .. versionadded:: 0.15.0
+
+ References
+ ----------
+ .. [1] Peter Huber. "Robust Estimation of a Location Parameter",
+ 1964. Annals of Statistics. 53 (1): 73 - 101.
+
+ Examples
+ --------
+ Import all necessary modules.
+
+ >>> import numpy as np
+ >>> from scipy.special import huber
+ >>> import matplotlib.pyplot as plt
+
+ Compute the function for ``delta=1`` at ``r=2``
+
+ >>> huber(1., 2.)
+ 1.5
+
+ Compute the function for different `delta` by providing a NumPy array or
+ list for `delta`.
+
+ >>> huber([1., 3., 5.], 4.)
+ array([3.5, 7.5, 8. ])
+
+ Compute the function at different points by providing a NumPy array or
+ list for `r`.
+
+ >>> huber(2., np.array([1., 1.5, 3.]))
+ array([0.5 , 1.125, 4. ])
+
+ The function can be calculated for different `delta` and `r` by
+ providing arrays for both with compatible shapes for broadcasting.
+
+ >>> r = np.array([1., 2.5, 8., 10.])
+ >>> deltas = np.array([[1.], [5.], [9.]])
+ >>> print(r.shape, deltas.shape)
+ (4,) (3, 1)
+
+ >>> huber(deltas, r)
+ array([[ 0.5 , 2. , 7.5 , 9.5 ],
+ [ 0.5 , 3.125, 27.5 , 37.5 ],
+ [ 0.5 , 3.125, 32. , 49.5 ]])
+
+ Plot the function for different `delta`.
+
+ >>> x = np.linspace(-4, 4, 500)
+ >>> deltas = [1, 2, 3]
+ >>> linestyles = ["dashed", "dotted", "dashdot"]
+ >>> fig, ax = plt.subplots()
+ >>> combined_plot_parameters = list(zip(deltas, linestyles))
+ >>> for delta, style in combined_plot_parameters:
+ ... ax.plot(x, huber(delta, x), label=fr"$\delta={delta}$", ls=style)
+ >>> ax.legend(loc="upper center")
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title(r"Huber loss function $h_{\delta}(x)$")
+ >>> ax.set_xlim(-4, 4)
+ >>> ax.set_ylim(0, 8)
+ >>> plt.show()
+ """)
+
+add_newdoc("hyp0f1",
+ r"""
+ hyp0f1(v, z, out=None)
+
+ Confluent hypergeometric limit function 0F1.
+
+ Parameters
+ ----------
+ v : array_like
+ Real-valued parameter
+ z : array_like
+ Real- or complex-valued argument
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The confluent hypergeometric limit function
+
+ Notes
+ -----
+ This function is defined as:
+
+ .. math:: _0F_1(v, z) = \sum_{k=0}^{\infty}\frac{z^k}{(v)_k k!}.
+
+ It's also the limit as :math:`q \to \infty` of :math:`_1F_1(q; v; z/q)`,
+ and satisfies the differential equation :math:`f''(z) + vf'(z) =
+ f(z)`. See [1]_ for more information.
+
+ References
+ ----------
+ .. [1] Wolfram MathWorld, "Confluent Hypergeometric Limit Function",
+ http://mathworld.wolfram.com/ConfluentHypergeometricLimitFunction.html
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It is one when `z` is zero.
+
+ >>> sc.hyp0f1(1, 0)
+ 1.0
+
+ It is the limit of the confluent hypergeometric function as `q`
+ goes to infinity.
+
+ >>> q = np.array([1, 10, 100, 1000])
+ >>> v = 1
+ >>> z = 1
+ >>> sc.hyp1f1(q, v, z / q)
+ array([2.71828183, 2.31481985, 2.28303778, 2.27992985])
+ >>> sc.hyp0f1(v, z)
+ 2.2795853023360673
+
+ It is related to Bessel functions.
+
+ >>> n = 1
+ >>> x = np.linspace(0, 1, 5)
+ >>> sc.jv(n, x)
+ array([0. , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])
+ >>> (0.5 * x)**n / sc.factorial(n) * sc.hyp0f1(n + 1, -0.25 * x**2)
+ array([0. , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])
+
+ """)
+
+add_newdoc("hyp1f1",
+ r"""
+ hyp1f1(a, b, x, out=None)
+
+ Confluent hypergeometric function 1F1.
+
+ The confluent hypergeometric function is defined by the series
+
+ .. math::
+
+ {}_1F_1(a; b; x) = \sum_{k = 0}^\infty \frac{(a)_k}{(b)_k k!} x^k.
+
+ See [DLMF]_ for more details. Here :math:`(\cdot)_k` is the
+ Pochhammer symbol; see `poch`.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Real parameters
+ x : array_like
+ Real or complex argument
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the confluent hypergeometric function
+
+ See Also
+ --------
+ hyperu : another confluent hypergeometric function
+ hyp0f1 : confluent hypergeometric limit function
+ hyp2f1 : Gaussian hypergeometric function
+
+ Notes
+ -----
+ For real values, this function uses the ``hyp1f1`` routine from the C++ Boost
+ library [2]_, for complex values a C translation of the specfun
+ Fortran library [3]_.
+
+ References
+ ----------
+ .. [DLMF] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/13.2#E2
+ .. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+ .. [3] Zhang, Jin, "Computation of Special Functions", John Wiley
+ and Sons, Inc, 1996.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It is one when `x` is zero:
+
+ >>> sc.hyp1f1(0.5, 0.5, 0)
+ 1.0
+
+ It is singular when `b` is a nonpositive integer.
+
+ >>> sc.hyp1f1(0.5, -1, 0)
+ inf
+
+ It is a polynomial when `a` is a nonpositive integer.
+
+ >>> a, b, x = -1, 0.5, np.array([1.0, 2.0, 3.0, 4.0])
+ >>> sc.hyp1f1(a, b, x)
+ array([-1., -3., -5., -7.])
+ >>> 1 + (a / b) * x
+ array([-1., -3., -5., -7.])
+
+ It reduces to the exponential function when ``a = b``.
+
+ >>> sc.hyp1f1(2, 2, [1, 2, 3, 4])
+ array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003])
+ >>> np.exp([1, 2, 3, 4])
+ array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003])
+
+ """)
+
+add_newdoc("hyperu",
+ r"""
+ hyperu(a, b, x, out=None)
+
+ Confluent hypergeometric function U
+
+ It is defined as the solution to the equation
+
+ .. math::
+
+ x \frac{d^2w}{dx^2} + (b - x) \frac{dw}{dx} - aw = 0
+
+ which satisfies the property
+
+ .. math::
+
+ U(a, b, x) \sim x^{-a}
+
+ as :math:`x \to \infty`. See [DLMF]_ for more details.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Real-valued parameters
+ x : array_like
+ Real-valued argument
+ out : ndarray, optional
+ Optional output array for the function values
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of `U`
+
+ References
+ ----------
+ .. [DLMF] NIST Digital Library of Mathematics Functions
+ https://dlmf.nist.gov/13.2#E6
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It has a branch cut along the negative `x` axis.
+
+ >>> x = np.linspace(-0.1, -10, 5)
+ >>> sc.hyperu(1, 1, x)
+ array([nan, nan, nan, nan, nan])
+
+ It approaches zero as `x` goes to infinity.
+
+ >>> x = np.array([1, 10, 100])
+ >>> sc.hyperu(1, 1, x)
+ array([0.59634736, 0.09156333, 0.00990194])
+
+ It satisfies Kummer's transformation.
+
+ >>> a, b, x = 2, 1, 1
+ >>> sc.hyperu(a, b, x)
+ 0.1926947246463881
+ >>> x**(1 - b) * sc.hyperu(a - b + 1, 2 - b, x)
+ 0.1926947246463881
+
+ """)
+
+add_newdoc("_igam_fac",
+ """
+ Internal function, do not use.
+ """)
+
+add_newdoc("kl_div",
+ r"""
+ kl_div(x, y, out=None)
+
+ Elementwise function for computing Kullback-Leibler divergence.
+
+ .. math::
+
+ \mathrm{kl\_div}(x, y) =
+ \begin{cases}
+ x \log(x / y) - x + y & x > 0, y > 0 \\
+ y & x = 0, y \ge 0 \\
+ \infty & \text{otherwise}
+ \end{cases}
+
+ Parameters
+ ----------
+ x, y : array_like
+ Real arguments
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the Kullback-Liebler divergence.
+
+ See Also
+ --------
+ entr, rel_entr, scipy.stats.entropy
+
+ Notes
+ -----
+ .. versionadded:: 0.15.0
+
+ This function is non-negative and is jointly convex in `x` and `y`.
+
+ The origin of this function is in convex programming; see [1]_ for
+ details. This is why the function contains the extra :math:`-x
+ + y` terms over what might be expected from the Kullback-Leibler
+ divergence. For a version of the function without the extra terms,
+ see `rel_entr`.
+
+ References
+ ----------
+ .. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.
+ Cambridge University Press, 2004.
+ :doi:`https://doi.org/10.1017/CBO9780511804441`
+
+ """)
+
+add_newdoc("kn",
+ r"""
+ kn(n, x, out=None)
+
+ Modified Bessel function of the second kind of integer order `n`
+
+ Returns the modified Bessel function of the second kind for integer order
+ `n` at real `z`.
+
+ These are also sometimes called functions of the third kind, Basset
+ functions, or Macdonald functions.
+
+ Parameters
+ ----------
+ n : array_like of int
+ Order of Bessel functions (floats will truncate with a warning)
+ x : array_like of float
+ Argument at which to evaluate the Bessel functions
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the Modified Bessel function of the second kind,
+ :math:`K_n(x)`.
+
+ See Also
+ --------
+ kv : Same function, but accepts real order and complex argument
+ kvp : Derivative of this function
+
+ Notes
+ -----
+ Wrapper for AMOS [1]_ routine `zbesk`. For a discussion of the
+ algorithm used, see [2]_ and the references therein.
+
+ References
+ ----------
+ .. [1] Donald E. Amos, "AMOS, A Portable Package for Bessel Functions
+ of a Complex Argument and Nonnegative Order",
+ http://netlib.org/amos/
+ .. [2] Donald E. Amos, "Algorithm 644: A portable package for Bessel
+ functions of a complex argument and nonnegative order", ACM
+ TOMS Vol. 12 Issue 3, Sept. 1986, p. 265
+
+ Examples
+ --------
+ Plot the function of several orders for real input:
+
+ >>> import numpy as np
+ >>> from scipy.special import kn
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(0, 5, 1000)
+ >>> for N in range(6):
+ ... plt.plot(x, kn(N, x), label='$K_{}(x)$'.format(N))
+ >>> plt.ylim(0, 10)
+ >>> plt.legend()
+ >>> plt.title(r'Modified Bessel function of the second kind $K_n(x)$')
+ >>> plt.show()
+
+ Calculate for a single value at multiple orders:
+
+ >>> kn([4, 5, 6], 1)
+ array([ 44.23241585, 360.9605896 , 3653.83831186])
+ """)
+
+add_newdoc("kolmogi",
+ """
+ kolmogi(p, out=None)
+
+ Inverse Survival Function of Kolmogorov distribution
+
+ It is the inverse function to `kolmogorov`.
+ Returns y such that ``kolmogorov(y) == p``.
+
+ Parameters
+ ----------
+ p : float array_like
+ Probability
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The value(s) of kolmogi(p)
+
+ See Also
+ --------
+ kolmogorov : The Survival Function for the distribution
+ scipy.stats.kstwobign : Provides the functionality as a continuous distribution
+ smirnov, smirnovi : Functions for the one-sided distribution
+
+ Notes
+ -----
+ `kolmogorov` is used by `stats.kstest` in the application of the
+ Kolmogorov-Smirnov Goodness of Fit test. For historical reasons this
+ function is exposed in `scpy.special`, but the recommended way to achieve
+ the most accurate CDF/SF/PDF/PPF/ISF computations is to use the
+ `stats.kstwobign` distribution.
+
+ Examples
+ --------
+ >>> from scipy.special import kolmogi
+ >>> kolmogi([0, 0.1, 0.25, 0.5, 0.75, 0.9, 1.0])
+ array([ inf, 1.22384787, 1.01918472, 0.82757356, 0.67644769,
+ 0.57117327, 0. ])
+
+ """)
+
+add_newdoc("kolmogorov",
+ r"""
+ kolmogorov(y, out=None)
+
+ Complementary cumulative distribution (Survival Function) function of
+ Kolmogorov distribution.
+
+ Returns the complementary cumulative distribution function of
+ Kolmogorov's limiting distribution (``D_n*\sqrt(n)`` as n goes to infinity)
+ of a two-sided test for equality between an empirical and a theoretical
+ distribution. It is equal to the (limit as n->infinity of the)
+ probability that ``sqrt(n) * max absolute deviation > y``.
+
+ Parameters
+ ----------
+ y : float array_like
+ Absolute deviation between the Empirical CDF (ECDF) and the target CDF,
+ multiplied by sqrt(n).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The value(s) of kolmogorov(y)
+
+ See Also
+ --------
+ kolmogi : The Inverse Survival Function for the distribution
+ scipy.stats.kstwobign : Provides the functionality as a continuous distribution
+ smirnov, smirnovi : Functions for the one-sided distribution
+
+ Notes
+ -----
+ `kolmogorov` is used by `stats.kstest` in the application of the
+ Kolmogorov-Smirnov Goodness of Fit test. For historical reasons this
+ function is exposed in `scpy.special`, but the recommended way to achieve
+ the most accurate CDF/SF/PDF/PPF/ISF computations is to use the
+ `stats.kstwobign` distribution.
+
+ Examples
+ --------
+ Show the probability of a gap at least as big as 0, 0.5 and 1.0.
+
+ >>> import numpy as np
+ >>> from scipy.special import kolmogorov
+ >>> from scipy.stats import kstwobign
+ >>> kolmogorov([0, 0.5, 1.0])
+ array([ 1. , 0.96394524, 0.26999967])
+
+ Compare a sample of size 1000 drawn from a Laplace(0, 1) distribution against
+ the target distribution, a Normal(0, 1) distribution.
+
+ >>> from scipy.stats import norm, laplace
+ >>> rng = np.random.default_rng()
+ >>> n = 1000
+ >>> lap01 = laplace(0, 1)
+ >>> x = np.sort(lap01.rvs(n, random_state=rng))
+ >>> np.mean(x), np.std(x)
+ (-0.05841730131499543, 1.3968109101997568)
+
+ Construct the Empirical CDF and the K-S statistic Dn.
+
+ >>> target = norm(0,1) # Normal mean 0, stddev 1
+ >>> cdfs = target.cdf(x)
+ >>> ecdfs = np.arange(n+1, dtype=float)/n
+ >>> gaps = np.column_stack([cdfs - ecdfs[:n], ecdfs[1:] - cdfs])
+ >>> Dn = np.max(gaps)
+ >>> Kn = np.sqrt(n) * Dn
+ >>> print('Dn=%f, sqrt(n)*Dn=%f' % (Dn, Kn))
+ Dn=0.043363, sqrt(n)*Dn=1.371265
+ >>> print(chr(10).join(['For a sample of size n drawn from a N(0, 1) distribution:',
+ ... ' the approximate Kolmogorov probability that sqrt(n)*Dn>=%f is %f' %
+ ... (Kn, kolmogorov(Kn)),
+ ... ' the approximate Kolmogorov probability that sqrt(n)*Dn<=%f is %f' %
+ ... (Kn, kstwobign.cdf(Kn))]))
+ For a sample of size n drawn from a N(0, 1) distribution:
+ the approximate Kolmogorov probability that sqrt(n)*Dn>=1.371265 is 0.046533
+ the approximate Kolmogorov probability that sqrt(n)*Dn<=1.371265 is 0.953467
+
+ Plot the Empirical CDF against the target N(0, 1) CDF.
+
+ >>> import matplotlib.pyplot as plt
+ >>> plt.step(np.concatenate([[-3], x]), ecdfs, where='post', label='Empirical CDF')
+ >>> x3 = np.linspace(-3, 3, 100)
+ >>> plt.plot(x3, target.cdf(x3), label='CDF for N(0, 1)')
+ >>> plt.ylim([0, 1]); plt.grid(True); plt.legend();
+ >>> # Add vertical lines marking Dn+ and Dn-
+ >>> iminus, iplus = np.argmax(gaps, axis=0)
+ >>> plt.vlines([x[iminus]], ecdfs[iminus], cdfs[iminus],
+ ... color='r', linestyle='dashed', lw=4)
+ >>> plt.vlines([x[iplus]], cdfs[iplus], ecdfs[iplus+1],
+ ... color='r', linestyle='dashed', lw=4)
+ >>> plt.show()
+ """)
+
+add_newdoc("_kolmogc",
+ r"""
+ Internal function, do not use.
+ """)
+
+add_newdoc("_kolmogci",
+ r"""
+ Internal function, do not use.
+ """)
+
+add_newdoc("_kolmogp",
+ r"""
+ Internal function, do not use.
+ """)
+
+add_newdoc("_lanczos_sum_expg_scaled",
+ """
+ Internal function, do not use.
+ """)
+
+add_newdoc(
+ "_landau_pdf",
+ """
+ _landau_pdf(x, loc, scale)
+
+ Probability density function of the Landau distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued argument
+ loc : array_like
+ Real-valued distribution location
+ scale : array_like
+ Positive, real-valued distribution scale
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_landau_cdf",
+ """
+ _landau_cdf(x, loc, scale)
+
+ Cumulative distribution function of the Landau distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued argument
+ loc : array_like
+ Real-valued distribution location
+ scale : array_like
+ Positive, real-valued distribution scale
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_landau_sf",
+ """
+ _landau_sf(x, loc, scale)
+
+ Survival function of the Landau distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued argument
+ loc : array_like
+ Real-valued distribution location
+ scale : array_like
+ Positive, real-valued distribution scale
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_landau_ppf",
+ """
+ _landau_ppf(p, loc, scale)
+
+ Percent point function of the Landau distribution.
+
+ Parameters
+ ----------
+ p : array_like
+ Real-valued argument between 0 and 1
+ loc : array_like
+ Real-valued distribution location
+ scale : array_like
+ Positive, real-valued distribution scale
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_landau_isf",
+ """
+ _landau_isf(p, loc, scale)
+
+ Inverse survival function of the Landau distribution.
+
+ Parameters
+ ----------
+ p : array_like
+ Real-valued argument between 0 and 1
+ loc : array_like
+ Real-valued distribution location
+ scale : array_like
+ Positive, real-valued distribution scale
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc("_lgam1p",
+ """
+ Internal function, do not use.
+ """)
+
+add_newdoc("lpmv",
+ r"""
+ lpmv(m, v, x, out=None)
+
+ Associated Legendre function of integer order and real degree.
+
+ Defined as
+
+ .. math::
+
+ P_v^m = (-1)^m (1 - x^2)^{m/2} \frac{d^m}{dx^m} P_v(x)
+
+ where
+
+ .. math::
+
+ P_v = \sum_{k = 0}^\infty \frac{(-v)_k (v + 1)_k}{(k!)^2}
+ \left(\frac{1 - x}{2}\right)^k
+
+ is the Legendre function of the first kind. Here :math:`(\cdot)_k`
+ is the Pochhammer symbol; see `poch`.
+
+ Parameters
+ ----------
+ m : array_like
+ Order (int or float). If passed a float not equal to an
+ integer the function returns NaN.
+ v : array_like
+ Degree (float).
+ x : array_like
+ Argument (float). Must have ``|x| <= 1``.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ pmv : scalar or ndarray
+ Value of the associated Legendre function.
+
+ Notes
+ -----
+ Note that this implementation includes the Condon-Shortley phase.
+
+ References
+ ----------
+ .. [1] Zhang, Jin, "Computation of Special Functions", John Wiley
+ and Sons, Inc, 1996.
+
+ """)
+
+add_newdoc("nbdtr",
+ r"""
+ nbdtr(k, n, p, out=None)
+
+ Negative binomial cumulative distribution function.
+
+ Returns the sum of the terms 0 through `k` of the negative binomial
+ distribution probability mass function,
+
+ .. math::
+
+ F = \sum_{j=0}^k {{n + j - 1}\choose{j}} p^n (1 - p)^j.
+
+ In a sequence of Bernoulli trials with individual success probabilities
+ `p`, this is the probability that `k` or fewer failures precede the nth
+ success.
+
+ Parameters
+ ----------
+ k : array_like
+ The maximum number of allowed failures (nonnegative int).
+ n : array_like
+ The target number of successes (positive int).
+ p : array_like
+ Probability of success in a single event (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ F : scalar or ndarray
+ The probability of `k` or fewer failures before `n` successes in a
+ sequence of events with individual success probability `p`.
+
+ See Also
+ --------
+ nbdtrc : Negative binomial survival function
+ nbdtrik : Negative binomial quantile function
+ scipy.stats.nbinom : Negative binomial distribution
+
+ Notes
+ -----
+ If floating point values are passed for `k` or `n`, they will be truncated
+ to integers.
+
+ The terms are not summed directly; instead the regularized incomplete beta
+ function is employed, according to the formula,
+
+ .. math::
+ \mathrm{nbdtr}(k, n, p) = I_{p}(n, k + 1).
+
+ Wrapper for the Cephes [1]_ routine `nbdtr`.
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. Using `nbdtr` directly can improve performance
+ compared to the ``cdf`` method of `scipy.stats.nbinom` (see last example).
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ Compute the function for ``k=10`` and ``n=5`` at ``p=0.5``.
+
+ >>> import numpy as np
+ >>> from scipy.special import nbdtr
+ >>> nbdtr(10, 5, 0.5)
+ 0.940765380859375
+
+ Compute the function for ``n=10`` and ``p=0.5`` at several points by
+ providing a NumPy array or list for `k`.
+
+ >>> nbdtr([5, 10, 15], 10, 0.5)
+ array([0.15087891, 0.58809853, 0.88523853])
+
+ Plot the function for four different parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> k = np.arange(130)
+ >>> n_parameters = [20, 20, 20, 80]
+ >>> p_parameters = [0.2, 0.5, 0.8, 0.5]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(p_parameters, n_parameters,
+ ... linestyles))
+ >>> fig, ax = plt.subplots(figsize=(8, 8))
+ >>> for parameter_set in parameters_list:
+ ... p, n, style = parameter_set
+ ... nbdtr_vals = nbdtr(k, n, p)
+ ... ax.plot(k, nbdtr_vals, label=rf"$n={n},\, p={p}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$k$")
+ >>> ax.set_title("Negative binomial cumulative distribution function")
+ >>> plt.show()
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. Using `nbdtr` directly can be much faster than
+ calling the ``cdf`` method of `scipy.stats.nbinom`, especially for small
+ arrays or individual values. To get the same results one must use the
+ following parametrization: ``nbinom(n, p).cdf(k)=nbdtr(k, n, p)``.
+
+ >>> from scipy.stats import nbinom
+ >>> k, n, p = 5, 3, 0.5
+ >>> nbdtr_res = nbdtr(k, n, p) # this will often be faster than below
+ >>> stats_res = nbinom(n, p).cdf(k)
+ >>> stats_res, nbdtr_res # test that results are equal
+ (0.85546875, 0.85546875)
+
+ `nbdtr` can evaluate different parameter sets by providing arrays with
+ shapes compatible for broadcasting for `k`, `n` and `p`. Here we compute
+ the function for three different `k` at four locations `p`, resulting in
+ a 3x4 array.
+
+ >>> k = np.array([[5], [10], [15]])
+ >>> p = np.array([0.3, 0.5, 0.7, 0.9])
+ >>> k.shape, p.shape
+ ((3, 1), (4,))
+
+ >>> nbdtr(k, 5, p)
+ array([[0.15026833, 0.62304687, 0.95265101, 0.9998531 ],
+ [0.48450894, 0.94076538, 0.99932777, 0.99999999],
+ [0.76249222, 0.99409103, 0.99999445, 1. ]])
+ """)
+
+add_newdoc("nbdtrc",
+ r"""
+ nbdtrc(k, n, p, out=None)
+
+ Negative binomial survival function.
+
+ Returns the sum of the terms `k + 1` to infinity of the negative binomial
+ distribution probability mass function,
+
+ .. math::
+
+ F = \sum_{j=k + 1}^\infty {{n + j - 1}\choose{j}} p^n (1 - p)^j.
+
+ In a sequence of Bernoulli trials with individual success probabilities
+ `p`, this is the probability that more than `k` failures precede the nth
+ success.
+
+ Parameters
+ ----------
+ k : array_like
+ The maximum number of allowed failures (nonnegative int).
+ n : array_like
+ The target number of successes (positive int).
+ p : array_like
+ Probability of success in a single event (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ F : scalar or ndarray
+ The probability of `k + 1` or more failures before `n` successes in a
+ sequence of events with individual success probability `p`.
+
+ See Also
+ --------
+ nbdtr : Negative binomial cumulative distribution function
+ nbdtrik : Negative binomial percentile function
+ scipy.stats.nbinom : Negative binomial distribution
+
+ Notes
+ -----
+ If floating point values are passed for `k` or `n`, they will be truncated
+ to integers.
+
+ The terms are not summed directly; instead the regularized incomplete beta
+ function is employed, according to the formula,
+
+ .. math::
+ \mathrm{nbdtrc}(k, n, p) = I_{1 - p}(k + 1, n).
+
+ Wrapper for the Cephes [1]_ routine `nbdtrc`.
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. Using `nbdtrc` directly can improve performance
+ compared to the ``sf`` method of `scipy.stats.nbinom` (see last example).
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ Compute the function for ``k=10`` and ``n=5`` at ``p=0.5``.
+
+ >>> import numpy as np
+ >>> from scipy.special import nbdtrc
+ >>> nbdtrc(10, 5, 0.5)
+ 0.059234619140624986
+
+ Compute the function for ``n=10`` and ``p=0.5`` at several points by
+ providing a NumPy array or list for `k`.
+
+ >>> nbdtrc([5, 10, 15], 10, 0.5)
+ array([0.84912109, 0.41190147, 0.11476147])
+
+ Plot the function for four different parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> k = np.arange(130)
+ >>> n_parameters = [20, 20, 20, 80]
+ >>> p_parameters = [0.2, 0.5, 0.8, 0.5]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(p_parameters, n_parameters,
+ ... linestyles))
+ >>> fig, ax = plt.subplots(figsize=(8, 8))
+ >>> for parameter_set in parameters_list:
+ ... p, n, style = parameter_set
+ ... nbdtrc_vals = nbdtrc(k, n, p)
+ ... ax.plot(k, nbdtrc_vals, label=rf"$n={n},\, p={p}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_xlabel("$k$")
+ >>> ax.set_title("Negative binomial distribution survival function")
+ >>> plt.show()
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. Using `nbdtrc` directly can be much faster than
+ calling the ``sf`` method of `scipy.stats.nbinom`, especially for small
+ arrays or individual values. To get the same results one must use the
+ following parametrization: ``nbinom(n, p).sf(k)=nbdtrc(k, n, p)``.
+
+ >>> from scipy.stats import nbinom
+ >>> k, n, p = 3, 5, 0.5
+ >>> nbdtr_res = nbdtrc(k, n, p) # this will often be faster than below
+ >>> stats_res = nbinom(n, p).sf(k)
+ >>> stats_res, nbdtr_res # test that results are equal
+ (0.6367187499999999, 0.6367187499999999)
+
+ `nbdtrc` can evaluate different parameter sets by providing arrays with
+ shapes compatible for broadcasting for `k`, `n` and `p`. Here we compute
+ the function for three different `k` at four locations `p`, resulting in
+ a 3x4 array.
+
+ >>> k = np.array([[5], [10], [15]])
+ >>> p = np.array([0.3, 0.5, 0.7, 0.9])
+ >>> k.shape, p.shape
+ ((3, 1), (4,))
+
+ >>> nbdtrc(k, 5, p)
+ array([[8.49731667e-01, 3.76953125e-01, 4.73489874e-02, 1.46902600e-04],
+ [5.15491059e-01, 5.92346191e-02, 6.72234070e-04, 9.29610100e-09],
+ [2.37507779e-01, 5.90896606e-03, 5.55025308e-06, 3.26346760e-13]])
+ """)
+
+add_newdoc(
+ "nbdtri",
+ r"""
+ nbdtri(k, n, y, out=None)
+
+ Returns the inverse with respect to the parameter `p` of
+ ``y = nbdtr(k, n, p)``, the negative binomial cumulative distribution
+ function.
+
+ Parameters
+ ----------
+ k : array_like
+ The maximum number of allowed failures (nonnegative int).
+ n : array_like
+ The target number of successes (positive int).
+ y : array_like
+ The probability of `k` or fewer failures before `n` successes (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ p : scalar or ndarray
+ Probability of success in a single event (float) such that
+ `nbdtr(k, n, p) = y`.
+
+ See Also
+ --------
+ nbdtr : Cumulative distribution function of the negative binomial.
+ nbdtrc : Negative binomial survival function.
+ scipy.stats.nbinom : negative binomial distribution.
+ nbdtrik : Inverse with respect to `k` of `nbdtr(k, n, p)`.
+ nbdtrin : Inverse with respect to `n` of `nbdtr(k, n, p)`.
+ scipy.stats.nbinom : Negative binomial distribution
+
+ Notes
+ -----
+ Wrapper for the Cephes [1]_ routine `nbdtri`.
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. Using `nbdtri` directly can improve performance
+ compared to the ``ppf`` method of `scipy.stats.nbinom`.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ `nbdtri` is the inverse of `nbdtr` with respect to `p`.
+ Up to floating point errors the following holds:
+ ``nbdtri(k, n, nbdtr(k, n, p))=p``.
+
+ >>> import numpy as np
+ >>> from scipy.special import nbdtri, nbdtr
+ >>> k, n, y = 5, 10, 0.2
+ >>> cdf_val = nbdtr(k, n, y)
+ >>> nbdtri(k, n, cdf_val)
+ 0.20000000000000004
+
+ Compute the function for ``k=10`` and ``n=5`` at several points by
+ providing a NumPy array or list for `y`.
+
+ >>> y = np.array([0.1, 0.4, 0.8])
+ >>> nbdtri(3, 5, y)
+ array([0.34462319, 0.51653095, 0.69677416])
+
+ Plot the function for three different parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> n_parameters = [5, 20, 30, 30]
+ >>> k_parameters = [20, 20, 60, 80]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(n_parameters, k_parameters, linestyles))
+ >>> cdf_vals = np.linspace(0, 1, 1000)
+ >>> fig, ax = plt.subplots(figsize=(8, 8))
+ >>> for parameter_set in parameters_list:
+ ... n, k, style = parameter_set
+ ... nbdtri_vals = nbdtri(k, n, cdf_vals)
+ ... ax.plot(cdf_vals, nbdtri_vals, label=rf"$k={k},\ n={n}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_ylabel("$p$")
+ >>> ax.set_xlabel("$CDF$")
+ >>> title = "nbdtri: inverse of negative binomial CDF with respect to $p$"
+ >>> ax.set_title(title)
+ >>> plt.show()
+
+ `nbdtri` can evaluate different parameter sets by providing arrays with
+ shapes compatible for broadcasting for `k`, `n` and `p`. Here we compute
+ the function for three different `k` at four locations `p`, resulting in
+ a 3x4 array.
+
+ >>> k = np.array([[5], [10], [15]])
+ >>> y = np.array([0.3, 0.5, 0.7, 0.9])
+ >>> k.shape, y.shape
+ ((3, 1), (4,))
+
+ >>> nbdtri(k, 5, y)
+ array([[0.37258157, 0.45169416, 0.53249956, 0.64578407],
+ [0.24588501, 0.30451981, 0.36778453, 0.46397088],
+ [0.18362101, 0.22966758, 0.28054743, 0.36066188]])
+ """)
+
+add_newdoc("nbdtrik",
+ r"""
+ nbdtrik(y, n, p, out=None)
+
+ Negative binomial percentile function.
+
+ Returns the inverse with respect to the parameter `k` of
+ ``y = nbdtr(k, n, p)``, the negative binomial cumulative distribution
+ function.
+
+ Parameters
+ ----------
+ y : array_like
+ The probability of `k` or fewer failures before `n` successes (float).
+ n : array_like
+ The target number of successes (positive int).
+ p : array_like
+ Probability of success in a single event (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ k : scalar or ndarray
+ The maximum number of allowed failures such that `nbdtr(k, n, p) = y`.
+
+ See Also
+ --------
+ nbdtr : Cumulative distribution function of the negative binomial.
+ nbdtrc : Survival function of the negative binomial.
+ nbdtri : Inverse with respect to `p` of `nbdtr(k, n, p)`.
+ nbdtrin : Inverse with respect to `n` of `nbdtr(k, n, p)`.
+ scipy.stats.nbinom : Negative binomial distribution
+
+ Notes
+ -----
+ Wrapper for the CDFLIB [1]_ Fortran routine `cdfnbn`.
+
+ Formula 26.5.26 of [2]_ or [3]_,
+
+ .. math::
+ \sum_{j=k + 1}^\infty {{n + j - 1}
+ \choose{j}} p^n (1 - p)^j = I_{1 - p}(k + 1, n),
+
+ is used to reduce calculation of the cumulative distribution function to
+ that of a regularized incomplete beta :math:`I`.
+
+ Computation of `k` involves a search for a value that produces the desired
+ value of `y`. The search relies on the monotonicity of `y` with `k`.
+
+ References
+ ----------
+ .. [1] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+ .. [2] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [3] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17.E24
+
+ Examples
+ --------
+ Compute the negative binomial cumulative distribution function for an
+ exemplary parameter set.
+
+ >>> import numpy as np
+ >>> from scipy.special import nbdtr, nbdtrik
+ >>> k, n, p = 5, 2, 0.5
+ >>> cdf_value = nbdtr(k, n, p)
+ >>> cdf_value
+ 0.9375
+
+ Verify that `nbdtrik` recovers the original value for `k`.
+
+ >>> nbdtrik(cdf_value, n, p)
+ 5.0
+
+ Plot the function for different parameter sets.
+
+ >>> import matplotlib.pyplot as plt
+ >>> p_parameters = [0.2, 0.5, 0.7, 0.5]
+ >>> n_parameters = [30, 30, 30, 80]
+ >>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']
+ >>> parameters_list = list(zip(p_parameters, n_parameters, linestyles))
+ >>> cdf_vals = np.linspace(0, 1, 1000)
+ >>> fig, ax = plt.subplots(figsize=(8, 8))
+ >>> for parameter_set in parameters_list:
+ ... p, n, style = parameter_set
+ ... nbdtrik_vals = nbdtrik(cdf_vals, n, p)
+ ... ax.plot(cdf_vals, nbdtrik_vals, label=rf"$n={n},\ p={p}$",
+ ... ls=style)
+ >>> ax.legend()
+ >>> ax.set_ylabel("$k$")
+ >>> ax.set_xlabel("$CDF$")
+ >>> ax.set_title("Negative binomial percentile function")
+ >>> plt.show()
+
+ The negative binomial distribution is also available as
+ `scipy.stats.nbinom`. The percentile function method ``ppf``
+ returns the result of `nbdtrik` rounded up to integers:
+
+ >>> from scipy.stats import nbinom
+ >>> q, n, p = 0.6, 5, 0.5
+ >>> nbinom.ppf(q, n, p), nbdtrik(q, n, p)
+ (5.0, 4.800428460273882)
+
+ """)
+
+add_newdoc("nbdtrin",
+ r"""
+ nbdtrin(k, y, p, out=None)
+
+ Inverse of `nbdtr` vs `n`.
+
+ Returns the inverse with respect to the parameter `n` of
+ ``y = nbdtr(k, n, p)``, the negative binomial cumulative distribution
+ function.
+
+ Parameters
+ ----------
+ k : array_like
+ The maximum number of allowed failures (nonnegative int).
+ y : array_like
+ The probability of `k` or fewer failures before `n` successes (float).
+ p : array_like
+ Probability of success in a single event (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ n : scalar or ndarray
+ The number of successes `n` such that `nbdtr(k, n, p) = y`.
+
+ See Also
+ --------
+ nbdtr : Cumulative distribution function of the negative binomial.
+ nbdtri : Inverse with respect to `p` of `nbdtr(k, n, p)`.
+ nbdtrik : Inverse with respect to `k` of `nbdtr(k, n, p)`.
+
+ Notes
+ -----
+ Wrapper for the CDFLIB [1]_ Fortran routine `cdfnbn`.
+
+ Formula 26.5.26 of [2]_ or [3]_,
+
+ .. math::
+ \sum_{j=k + 1}^\infty {{n + j - 1}
+ \choose{j}} p^n (1 - p)^j = I_{1 - p}(k + 1, n),
+
+ is used to reduce calculation of the cumulative distribution function to
+ that of a regularized incomplete beta :math:`I`.
+
+ Computation of `n` involves a search for a value that produces the desired
+ value of `y`. The search relies on the monotonicity of `y` with `n`.
+
+ References
+ ----------
+ .. [1] Barry Brown, James Lovato, and Kathy Russell,
+ CDFLIB: Library of Fortran Routines for Cumulative Distribution
+ Functions, Inverses, and Other Parameters.
+ .. [2] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [3] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/8.17.E24
+
+ Examples
+ --------
+ Compute the negative binomial cumulative distribution function for an
+ exemplary parameter set.
+
+ >>> from scipy.special import nbdtr, nbdtrin
+ >>> k, n, p = 5, 2, 0.5
+ >>> cdf_value = nbdtr(k, n, p)
+ >>> cdf_value
+ 0.9375
+
+ Verify that `nbdtrin` recovers the original value for `n` up to floating
+ point accuracy.
+
+ >>> nbdtrin(k, cdf_value, p)
+ 1.999999999998137
+ """)
+
+add_newdoc("ncfdtr",
+ r"""
+ ncfdtr(dfn, dfd, nc, f, out=None)
+
+ Cumulative distribution function of the non-central F distribution.
+
+ The non-central F describes the distribution of,
+
+ .. math::
+ Z = \frac{X/d_n}{Y/d_d}
+
+ where :math:`X` and :math:`Y` are independently distributed, with
+ :math:`X` distributed non-central :math:`\chi^2` with noncentrality
+ parameter `nc` and :math:`d_n` degrees of freedom, and :math:`Y`
+ distributed :math:`\chi^2` with :math:`d_d` degrees of freedom.
+
+ Parameters
+ ----------
+ dfn : array_like
+ Degrees of freedom of the numerator sum of squares. Range (0, inf).
+ dfd : array_like
+ Degrees of freedom of the denominator sum of squares. Range (0, inf).
+ nc : array_like
+ Noncentrality parameter. Range [0, inf).
+ f : array_like
+ Quantiles, i.e. the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ cdf : scalar or ndarray
+ The calculated CDF. If all inputs are scalar, the return will be a
+ float. Otherwise it will be an array.
+
+ See Also
+ --------
+ ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.
+ ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.
+ ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.
+ ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.
+ scipy.stats.ncf : Non-central F distribution.
+
+ Notes
+ -----
+ This function calculates the CDF of the non-central f distribution using
+ the Boost Math C++ library [1]_.
+
+ The cumulative distribution function is computed using Formula 26.6.20 of
+ [2]_:
+
+ .. math::
+ F(d_n, d_d, n_c, f) = \sum_{j=0}^\infty e^{-n_c/2}
+ \frac{(n_c/2)^j}{j!} I_{x}(\frac{d_n}{2} + j, \frac{d_d}{2}),
+
+ where :math:`I` is the regularized incomplete beta function, and
+ :math:`x = f d_n/(f d_n + d_d)`.
+
+ Note that argument order of `ncfdtr` is different from that of the
+ similar ``cdf`` method of `scipy.stats.ncf`: `f` is the last
+ parameter of `ncfdtr` but the first parameter of ``scipy.stats.ncf.cdf``.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+ .. [2] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy import special
+ >>> from scipy import stats
+ >>> import matplotlib.pyplot as plt
+
+ Plot the CDF of the non-central F distribution, for nc=0. Compare with the
+ F-distribution from scipy.stats:
+
+ >>> x = np.linspace(-1, 8, num=500)
+ >>> dfn = 3
+ >>> dfd = 2
+ >>> ncf_stats = stats.f.cdf(x, dfn, dfd)
+ >>> ncf_special = special.ncfdtr(dfn, dfd, 0, x)
+
+ >>> fig = plt.figure()
+ >>> ax = fig.add_subplot(111)
+ >>> ax.plot(x, ncf_stats, 'b-', lw=3)
+ >>> ax.plot(x, ncf_special, 'r-')
+ >>> plt.show()
+
+ """)
+
+add_newdoc("ncfdtri",
+ """
+ ncfdtri(dfn, dfd, nc, p, out=None)
+
+ Inverse with respect to `f` of the CDF of the non-central F distribution.
+
+ See `ncfdtr` for more details.
+
+ Parameters
+ ----------
+ dfn : array_like
+ Degrees of freedom of the numerator sum of squares. Range (0, inf).
+ dfd : array_like
+ Degrees of freedom of the denominator sum of squares. Range (0, inf).
+ nc : array_like
+ Noncentrality parameter. Range [0, inf).
+ p : array_like
+ Value of the cumulative distribution function. Must be in the
+ range [0, 1].
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ f : scalar or ndarray
+ Quantiles, i.e., the upper limit of integration.
+
+ See Also
+ --------
+ ncfdtr : CDF of the non-central F distribution.
+ ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.
+ ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.
+ ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.
+ scipy.stats.ncf : Non-central F distribution.
+
+ Notes
+ -----
+ This function calculates the Quantile of the non-central f distribution
+ using the Boost Math C++ library [1]_.
+
+ Note that argument order of `ncfdtri` is different from that of the
+ similar ``ppf`` method of `scipy.stats.ncf`. `p` is the last parameter
+ of `ncfdtri` but the first parameter of ``scipy.stats.ncf.ppf``.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import ncfdtr, ncfdtri
+
+ Compute the CDF for several values of `f`:
+
+ >>> f = [0.5, 1, 1.5]
+ >>> p = ncfdtr(2, 3, 1.5, f)
+ >>> p
+ array([ 0.20782291, 0.36107392, 0.47345752])
+
+ Compute the inverse. We recover the values of `f`, as expected:
+
+ >>> ncfdtri(2, 3, 1.5, p)
+ array([ 0.5, 1. , 1.5])
+
+ """)
+
+add_newdoc("ncfdtridfd",
+ """
+ ncfdtridfd(dfn, p, nc, f, out=None)
+
+ Calculate degrees of freedom (denominator) for the noncentral F-distribution.
+
+ This is the inverse with respect to `dfd` of `ncfdtr`.
+ See `ncfdtr` for more details.
+
+ Parameters
+ ----------
+ dfn : array_like
+ Degrees of freedom of the numerator sum of squares. Range (0, inf).
+ p : array_like
+ Value of the cumulative distribution function. Must be in the
+ range [0, 1].
+ nc : array_like
+ Noncentrality parameter. Should be in range (0, 1e4).
+ f : array_like
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ dfd : scalar or ndarray
+ Degrees of freedom of the denominator sum of squares.
+
+ See Also
+ --------
+ ncfdtr : CDF of the non-central F distribution.
+ ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.
+ ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.
+ ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.
+
+ Notes
+ -----
+ The value of the cumulative noncentral F distribution is not necessarily
+ monotone in either degrees of freedom. There thus may be two values that
+ provide a given CDF value. This routine assumes monotonicity and will
+ find an arbitrary one of the two values.
+
+ Examples
+ --------
+ >>> from scipy.special import ncfdtr, ncfdtridfd
+
+ Compute the CDF for several values of `dfd`:
+
+ >>> dfd = [1, 2, 3]
+ >>> p = ncfdtr(2, dfd, 0.25, 15)
+ >>> p
+ array([ 0.8097138 , 0.93020416, 0.96787852])
+
+ Compute the inverse. We recover the values of `dfd`, as expected:
+
+ >>> ncfdtridfd(2, p, 0.25, 15)
+ array([ 1., 2., 3.])
+
+ """)
+
+add_newdoc("ncfdtridfn",
+ """
+ ncfdtridfn(p, dfd, nc, f, out=None)
+
+ Calculate degrees of freedom (numerator) for the noncentral F-distribution.
+
+ This is the inverse with respect to `dfn` of `ncfdtr`.
+ See `ncfdtr` for more details.
+
+ Parameters
+ ----------
+ p : array_like
+ Value of the cumulative distribution function. Must be in the
+ range [0, 1].
+ dfd : array_like
+ Degrees of freedom of the denominator sum of squares. Range (0, inf).
+ nc : array_like
+ Noncentrality parameter. Should be in range (0, 1e4).
+ f : float
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ dfn : scalar or ndarray
+ Degrees of freedom of the numerator sum of squares.
+
+ See Also
+ --------
+ ncfdtr : CDF of the non-central F distribution.
+ ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.
+ ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.
+ ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.
+
+ Notes
+ -----
+ The value of the cumulative noncentral F distribution is not necessarily
+ monotone in either degrees of freedom. There thus may be two values that
+ provide a given CDF value. This routine assumes monotonicity and will
+ find an arbitrary one of the two values.
+
+ Examples
+ --------
+ >>> from scipy.special import ncfdtr, ncfdtridfn
+
+ Compute the CDF for several values of `dfn`:
+
+ >>> dfn = [1, 2, 3]
+ >>> p = ncfdtr(dfn, 2, 0.25, 15)
+ >>> p
+ array([ 0.92562363, 0.93020416, 0.93188394])
+
+ Compute the inverse. We recover the values of `dfn`, as expected:
+
+ >>> ncfdtridfn(p, 2, 0.25, 15)
+ array([ 1., 2., 3.])
+
+ """)
+
+add_newdoc("ncfdtrinc",
+ """
+ ncfdtrinc(dfn, dfd, p, f, out=None)
+
+ Calculate non-centrality parameter for non-central F distribution.
+
+ This is the inverse with respect to `nc` of `ncfdtr`.
+ See `ncfdtr` for more details.
+
+ Parameters
+ ----------
+ dfn : array_like
+ Degrees of freedom of the numerator sum of squares. Range (0, inf).
+ dfd : array_like
+ Degrees of freedom of the denominator sum of squares. Range (0, inf).
+ p : array_like
+ Value of the cumulative distribution function. Must be in the
+ range [0, 1].
+ f : array_like
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ nc : scalar or ndarray
+ Noncentrality parameter.
+
+ See Also
+ --------
+ ncfdtr : CDF of the non-central F distribution.
+ ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.
+ ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.
+ ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.
+
+ Examples
+ --------
+ >>> from scipy.special import ncfdtr, ncfdtrinc
+
+ Compute the CDF for several values of `nc`:
+
+ >>> nc = [0.5, 1.5, 2.0]
+ >>> p = ncfdtr(2, 3, nc, 15)
+ >>> p
+ array([ 0.96309246, 0.94327955, 0.93304098])
+
+ Compute the inverse. We recover the values of `nc`, as expected:
+
+ >>> ncfdtrinc(2, 3, p, 15)
+ array([ 0.5, 1.5, 2. ])
+
+ """)
+
+add_newdoc("nctdtr",
+ """
+ nctdtr(df, nc, t, out=None)
+
+ Cumulative distribution function of the non-central `t` distribution.
+
+ Parameters
+ ----------
+ df : array_like
+ Degrees of freedom of the distribution. Should be in range (0, inf).
+ nc : array_like
+ Noncentrality parameter.
+ t : array_like
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ cdf : scalar or ndarray
+ The calculated CDF. If all inputs are scalar, the return will be a
+ float. Otherwise, it will be an array.
+
+ See Also
+ --------
+ nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.
+ nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.
+ nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.
+
+ Notes
+ -----
+ This function calculates the CDF of the non-central t distribution using
+ the Boost Math C++ library [1]_.
+
+ Note that the argument order of `nctdtr` is different from that of the
+ similar ``cdf`` method of `scipy.stats.nct`: `t` is the last
+ parameter of `nctdtr` but the first parameter of ``scipy.stats.nct.cdf``.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy import special
+ >>> from scipy import stats
+ >>> import matplotlib.pyplot as plt
+
+ Plot the CDF of the non-central t distribution, for nc=0. Compare with the
+ t-distribution from scipy.stats:
+
+ >>> x = np.linspace(-5, 5, num=500)
+ >>> df = 3
+ >>> nct_stats = stats.t.cdf(x, df)
+ >>> nct_special = special.nctdtr(df, 0, x)
+
+ >>> fig = plt.figure()
+ >>> ax = fig.add_subplot(111)
+ >>> ax.plot(x, nct_stats, 'b-', lw=3)
+ >>> ax.plot(x, nct_special, 'r-')
+ >>> plt.show()
+
+ """)
+
+add_newdoc("nctdtridf",
+ """
+ nctdtridf(p, nc, t, out=None)
+
+ Calculate degrees of freedom for non-central t distribution.
+
+ See `nctdtr` for more details.
+
+ Parameters
+ ----------
+ p : array_like
+ CDF values, in range (0, 1].
+ nc : array_like
+ Noncentrality parameter. Should be in range (-1e6, 1e6).
+ t : array_like
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ df : scalar or ndarray
+ The degrees of freedom. If all inputs are scalar, the return will be a
+ float. Otherwise, it will be an array.
+
+ See Also
+ --------
+ nctdtr : CDF of the non-central `t` distribution.
+ nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.
+ nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.
+
+ Examples
+ --------
+ >>> from scipy.special import nctdtr, nctdtridf
+
+ Compute the CDF for several values of `df`:
+
+ >>> df = [1, 2, 3]
+ >>> p = nctdtr(df, 0.25, 1)
+ >>> p
+ array([0.67491974, 0.716464 , 0.73349456])
+
+ Compute the inverse. We recover the values of `df`, as expected:
+
+ >>> nctdtridf(p, 0.25, 1)
+ array([1., 2., 3.])
+
+ """)
+
+add_newdoc("nctdtrinc",
+ """
+ nctdtrinc(df, p, t, out=None)
+
+ Calculate non-centrality parameter for non-central t distribution.
+
+ See `nctdtr` for more details.
+
+ Parameters
+ ----------
+ df : array_like
+ Degrees of freedom of the distribution. Should be in range (0, inf).
+ p : array_like
+ CDF values, in range (0, 1].
+ t : array_like
+ Quantiles, i.e., the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ nc : scalar or ndarray
+ Noncentrality parameter
+
+ See Also
+ --------
+ nctdtr : CDF of the non-central `t` distribution.
+ nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.
+ nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.
+
+ Examples
+ --------
+ >>> from scipy.special import nctdtr, nctdtrinc
+
+ Compute the CDF for several values of `nc`:
+
+ >>> nc = [0.5, 1.5, 2.5]
+ >>> p = nctdtr(3, nc, 1.5)
+ >>> p
+ array([0.77569497, 0.45524533, 0.1668691 ])
+
+ Compute the inverse. We recover the values of `nc`, as expected:
+
+ >>> nctdtrinc(3, p, 1.5)
+ array([0.5, 1.5, 2.5])
+
+ """)
+
+add_newdoc("nctdtrit",
+ """
+ nctdtrit(df, nc, p, out=None)
+
+ Inverse cumulative distribution function of the non-central t distribution.
+
+ See `nctdtr` for more details.
+
+ Parameters
+ ----------
+ df : array_like
+ Degrees of freedom of the distribution. Should be in range (0, inf).
+ nc : array_like
+ Noncentrality parameter.
+ p : array_like
+ CDF values, in range (0, 1].
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ t : scalar or ndarray
+ Quantiles
+
+ See Also
+ --------
+ nctdtr : CDF of the non-central `t` distribution.
+ nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.
+ nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.
+
+ Notes
+ -----
+ This function calculates the quantile of the non-central t distribution using
+ the Boost Math C++ library [1]_.
+
+ Note that the argument order of `nctdtrit` is different from that of the
+ similar ``ppf`` method of `scipy.stats.nct`: `t` is the last
+ parameter of `nctdtrit` but the first parameter of ``scipy.stats.nct.ppf``.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> from scipy.special import nctdtr, nctdtrit
+
+ Compute the CDF for several values of `t`:
+
+ >>> t = [0.5, 1, 1.5]
+ >>> p = nctdtr(3, 1, t)
+ >>> p
+ array([0.29811049, 0.46922687, 0.6257559 ])
+
+ Compute the inverse. We recover the values of `t`, as expected:
+
+ >>> nctdtrit(3, 1, p)
+ array([0.5, 1. , 1.5])
+
+ """)
+
+add_newdoc("nrdtrimn",
+ """
+ nrdtrimn(p, std, x, out=None)
+
+ Calculate mean of normal distribution given other params.
+
+ Parameters
+ ----------
+ p : array_like
+ CDF values, in range (0, 1].
+ std : array_like
+ Standard deviation.
+ x : array_like
+ Quantiles, i.e. the upper limit of integration.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ mn : scalar or ndarray
+ The mean of the normal distribution.
+
+ See Also
+ --------
+ scipy.stats.norm : Normal distribution
+ ndtr : Standard normal cumulative probability distribution
+ ndtri : Inverse of standard normal CDF with respect to quantile
+ nrdtrisd : Inverse of normal distribution CDF with respect to
+ standard deviation
+
+ Examples
+ --------
+ `nrdtrimn` can be used to recover the mean of a normal distribution
+ if we know the CDF value `p` for a given quantile `x` and the
+ standard deviation `std`. First, we calculate
+ the normal distribution CDF for an exemplary parameter set.
+
+ >>> from scipy.stats import norm
+ >>> mean = 3.
+ >>> std = 2.
+ >>> x = 6.
+ >>> p = norm.cdf(x, loc=mean, scale=std)
+ >>> p
+ 0.9331927987311419
+
+ Verify that `nrdtrimn` returns the original value for `mean`.
+
+ >>> from scipy.special import nrdtrimn
+ >>> nrdtrimn(p, std, x)
+ 3.0000000000000004
+
+ """)
+
+add_newdoc("nrdtrisd",
+ """
+ nrdtrisd(mn, p, x, out=None)
+
+ Calculate standard deviation of normal distribution given other params.
+
+ Parameters
+ ----------
+ mn : scalar or ndarray
+ The mean of the normal distribution.
+ p : array_like
+ CDF values, in range (0, 1].
+ x : array_like
+ Quantiles, i.e. the upper limit of integration.
+
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ std : scalar or ndarray
+ Standard deviation.
+
+ See Also
+ --------
+ scipy.stats.norm : Normal distribution
+ ndtr : Standard normal cumulative probability distribution
+ ndtri : Inverse of standard normal CDF with respect to quantile
+ nrdtrimn : Inverse of normal distribution CDF with respect to
+ mean
+
+ Examples
+ --------
+ `nrdtrisd` can be used to recover the standard deviation of a normal
+ distribution if we know the CDF value `p` for a given quantile `x` and
+ the mean `mn`. First, we calculate the normal distribution CDF for an
+ exemplary parameter set.
+
+ >>> from scipy.stats import norm
+ >>> mean = 3.
+ >>> std = 2.
+ >>> x = 6.
+ >>> p = norm.cdf(x, loc=mean, scale=std)
+ >>> p
+ 0.9331927987311419
+
+ Verify that `nrdtrisd` returns the original value for `std`.
+
+ >>> from scipy.special import nrdtrisd
+ >>> nrdtrisd(mean, p, x)
+ 2.0000000000000004
+
+ """)
+
+add_newdoc("ndtri",
+ """
+ ndtri(y, out=None)
+
+ Inverse of `ndtr` vs x
+
+ Returns the argument x for which the area under the standard normal
+ probability density function (integrated from minus infinity to `x`)
+ is equal to y.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ x : scalar or ndarray
+ Value of x such that ``ndtr(x) == p``.
+
+ See Also
+ --------
+ ndtr : Standard normal cumulative probability distribution
+ ndtri_exp : Inverse of log_ndtr
+
+ Examples
+ --------
+ `ndtri` is the percentile function of the standard normal distribution.
+ This means it returns the inverse of the cumulative density `ndtr`. First,
+ let us compute a cumulative density value.
+
+ >>> import numpy as np
+ >>> from scipy.special import ndtri, ndtr
+ >>> cdf_val = ndtr(2)
+ >>> cdf_val
+ 0.9772498680518208
+
+ Verify that `ndtri` yields the original value for `x` up to floating point
+ errors.
+
+ >>> ndtri(cdf_val)
+ 2.0000000000000004
+
+ Plot the function. For that purpose, we provide a NumPy array as argument.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(0.01, 1, 200)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, ndtri(x))
+ >>> ax.set_title("Standard normal percentile function")
+ >>> plt.show()
+ """)
+
+add_newdoc("pdtr",
+ r"""
+ pdtr(k, m, out=None)
+
+ Poisson cumulative distribution function.
+
+ Defined as the probability that a Poisson-distributed random
+ variable with event rate :math:`m` is less than or equal to
+ :math:`k`. More concretely, this works out to be [1]_
+
+ .. math::
+
+ \exp(-m) \sum_{j = 0}^{\lfloor{k}\rfloor} \frac{m^j}{j!}.
+
+ Parameters
+ ----------
+ k : array_like
+ Number of occurrences (nonnegative, real)
+ m : array_like
+ Shape parameter (nonnegative, real)
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the Poisson cumulative distribution function
+
+ See Also
+ --------
+ pdtrc : Poisson survival function
+ pdtrik : inverse of `pdtr` with respect to `k`
+ pdtri : inverse of `pdtr` with respect to `m`
+
+ References
+ ----------
+ .. [1] https://en.wikipedia.org/wiki/Poisson_distribution
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It is a cumulative distribution function, so it converges to 1
+ monotonically as `k` goes to infinity.
+
+ >>> sc.pdtr([1, 10, 100, np.inf], 1)
+ array([0.73575888, 0.99999999, 1. , 1. ])
+
+ It is discontinuous at integers and constant between integers.
+
+ >>> sc.pdtr([1, 1.5, 1.9, 2], 1)
+ array([0.73575888, 0.73575888, 0.73575888, 0.9196986 ])
+
+ """)
+
+add_newdoc("pdtrc",
+ """
+ pdtrc(k, m, out=None)
+
+ Poisson survival function
+
+ Returns the sum of the terms from k+1 to infinity of the Poisson
+ distribution: sum(exp(-m) * m**j / j!, j=k+1..inf) = gammainc(
+ k+1, m). Arguments must both be non-negative doubles.
+
+ Parameters
+ ----------
+ k : array_like
+ Number of occurrences (nonnegative, real)
+ m : array_like
+ Shape parameter (nonnegative, real)
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the Poisson survival function
+
+ See Also
+ --------
+ pdtr : Poisson cumulative distribution function
+ pdtrik : inverse of `pdtr` with respect to `k`
+ pdtri : inverse of `pdtr` with respect to `m`
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ It is a survival function, so it decreases to 0
+ monotonically as `k` goes to infinity.
+
+ >>> k = np.array([1, 10, 100, np.inf])
+ >>> sc.pdtrc(k, 1)
+ array([2.64241118e-001, 1.00477664e-008, 3.94147589e-161, 0.00000000e+000])
+
+ It can be expressed in terms of the lower incomplete gamma
+ function `gammainc`.
+
+ >>> sc.gammainc(k + 1, 1)
+ array([2.64241118e-001, 1.00477664e-008, 3.94147589e-161, 0.00000000e+000])
+
+ """)
+
+add_newdoc("pdtri",
+ """
+ pdtri(k, y, out=None)
+
+ Inverse to `pdtr` vs m
+
+ Returns the Poisson variable `m` such that the sum from 0 to `k` of
+ the Poisson density is equal to the given probability `y`:
+ calculated by ``gammaincinv(k + 1, y)``. `k` must be a nonnegative
+ integer and `y` between 0 and 1.
+
+ Parameters
+ ----------
+ k : array_like
+ Number of occurrences (nonnegative, real)
+ y : array_like
+ Probability
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the shape parameter `m` such that ``pdtr(k, m) = p``
+
+ See Also
+ --------
+ pdtr : Poisson cumulative distribution function
+ pdtrc : Poisson survival function
+ pdtrik : inverse of `pdtr` with respect to `k`
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ Compute the CDF for several values of `m`:
+
+ >>> m = [0.5, 1, 1.5]
+ >>> p = sc.pdtr(1, m)
+ >>> p
+ array([0.90979599, 0.73575888, 0.5578254 ])
+
+ Compute the inverse. We recover the values of `m`, as expected:
+
+ >>> sc.pdtri(1, p)
+ array([0.5, 1. , 1.5])
+
+ """)
+
+add_newdoc("pdtrik",
+ """
+ pdtrik(p, m, out=None)
+
+ Inverse to `pdtr` vs `k`.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability
+ m : array_like
+ Shape parameter (nonnegative, real)
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The number of occurrences `k` such that ``pdtr(k, m) = p``
+
+ Notes
+ -----
+ This function relies on the ``gamma_q_inva`` function from the Boost
+ Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ See Also
+ --------
+ pdtr : Poisson cumulative distribution function
+ pdtrc : Poisson survival function
+ pdtri : inverse of `pdtr` with respect to `m`
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ Compute the CDF for several values of `k`:
+
+ >>> k = [1, 2, 3]
+ >>> p = sc.pdtr(k, 2)
+ >>> p
+ array([0.40600585, 0.67667642, 0.85712346])
+
+ Compute the inverse. We recover the values of `k`, as expected:
+
+ >>> sc.pdtrik(p, 2)
+ array([1., 2., 3.])
+
+ """)
+
+add_newdoc("poch",
+ r"""
+ poch(z, m, out=None)
+
+ Pochhammer symbol.
+
+ The Pochhammer symbol (rising factorial) is defined as
+
+ .. math::
+
+ (z)_m = \frac{\Gamma(z + m)}{\Gamma(z)}
+
+ For positive integer `m` it reads
+
+ .. math::
+
+ (z)_m = z (z + 1) ... (z + m - 1)
+
+ See [DLMF]_ for more details.
+
+ Parameters
+ ----------
+ z, m : array_like
+ Real-valued arguments.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The value of the function.
+
+ References
+ ----------
+ .. [DLMF] Nist, Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/5.2#iii
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ It is 1 when m is 0.
+
+ >>> sc.poch([1, 2, 3, 4], 0)
+ array([1., 1., 1., 1.])
+
+ For z equal to 1 it reduces to the factorial function.
+
+ >>> sc.poch(1, 5)
+ 120.0
+ >>> 1 * 2 * 3 * 4 * 5
+ 120
+
+ It can be expressed in terms of the gamma function.
+
+ >>> z, m = 3.7, 2.1
+ >>> sc.poch(z, m)
+ 20.529581933776953
+ >>> sc.gamma(z + m) / sc.gamma(z)
+ 20.52958193377696
+
+ """)
+
+add_newdoc("powm1", """
+ powm1(x, y, out=None)
+
+ Computes ``x**y - 1``.
+
+ This function is useful when `y` is near 0, or when `x` is near 1.
+
+ The function is implemented for real types only (unlike ``numpy.power``,
+ which accepts complex inputs).
+
+ Parameters
+ ----------
+ x : array_like
+ The base. Must be a real type (i.e. integer or float, not complex).
+ y : array_like
+ The exponent. Must be a real type (i.e. integer or float, not complex).
+
+ Returns
+ -------
+ array_like
+ Result of the calculation
+
+ Notes
+ -----
+ .. versionadded:: 1.10.0
+
+ The underlying code is implemented for single precision and double
+ precision floats only. Unlike `numpy.power`, integer inputs to
+ `powm1` are converted to floating point, and complex inputs are
+ not accepted.
+
+ Note the following edge cases:
+
+ * ``powm1(x, 0)`` returns 0 for any ``x``, including 0, ``inf``
+ and ``nan``.
+ * ``powm1(1, y)`` returns 0 for any ``y``, including ``nan``
+ and ``inf``.
+
+ This function wraps the ``powm1`` routine from the
+ Boost Math C++ library [1]_.
+
+ References
+ ----------
+ .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import powm1
+
+ >>> x = np.array([1.2, 10.0, 0.9999999975])
+ >>> y = np.array([1e-9, 1e-11, 0.1875])
+ >>> powm1(x, y)
+ array([ 1.82321557e-10, 2.30258509e-11, -4.68749998e-10])
+
+ It can be verified that the relative errors in those results
+ are less than 2.5e-16.
+
+ Compare that to the result of ``x**y - 1``, where the
+ relative errors are all larger than 8e-8:
+
+ >>> x**y - 1
+ array([ 1.82321491e-10, 2.30258035e-11, -4.68750039e-10])
+
+ """)
+
+
+add_newdoc("pseudo_huber",
+ r"""
+ pseudo_huber(delta, r, out=None)
+
+ Pseudo-Huber loss function.
+
+ .. math:: \mathrm{pseudo\_huber}(\delta, r) =
+ \delta^2 \left( \sqrt{ 1 + \left( \frac{r}{\delta} \right)^2 } - 1 \right)
+
+ Parameters
+ ----------
+ delta : array_like
+ Input array, indicating the soft quadratic vs. linear loss changepoint.
+ r : array_like
+ Input array, possibly representing residuals.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ res : scalar or ndarray
+ The computed Pseudo-Huber loss function values.
+
+ See Also
+ --------
+ huber: Similar function which this function approximates
+
+ Notes
+ -----
+ Like `huber`, `pseudo_huber` often serves as a robust loss function
+ in statistics or machine learning to reduce the influence of outliers.
+ Unlike `huber`, `pseudo_huber` is smooth.
+
+ Typically, `r` represents residuals, the difference
+ between a model prediction and data. Then, for :math:`|r|\leq\delta`,
+ `pseudo_huber` resembles the squared error and for :math:`|r|>\delta` the
+ absolute error. This way, the Pseudo-Huber loss often achieves
+ a fast convergence in model fitting for small residuals like the squared
+ error loss function and still reduces the influence of outliers
+ (:math:`|r|>\delta`) like the absolute error loss. As :math:`\delta` is
+ the cutoff between squared and absolute error regimes, it has
+ to be tuned carefully for each problem. `pseudo_huber` is also
+ convex, making it suitable for gradient based optimization. [1]_ [2]_
+
+ .. versionadded:: 0.15.0
+
+ References
+ ----------
+ .. [1] Hartley, Zisserman, "Multiple View Geometry in Computer Vision".
+ 2003. Cambridge University Press. p. 619
+ .. [2] Charbonnier et al. "Deterministic edge-preserving regularization
+ in computed imaging". 1997. IEEE Trans. Image Processing.
+ 6 (2): 298 - 311.
+
+ Examples
+ --------
+ Import all necessary modules.
+
+ >>> import numpy as np
+ >>> from scipy.special import pseudo_huber, huber
+ >>> import matplotlib.pyplot as plt
+
+ Calculate the function for ``delta=1`` at ``r=2``.
+
+ >>> pseudo_huber(1., 2.)
+ 1.2360679774997898
+
+ Calculate the function at ``r=2`` for different `delta` by providing
+ a list or NumPy array for `delta`.
+
+ >>> pseudo_huber([1., 2., 4.], 3.)
+ array([2.16227766, 3.21110255, 4. ])
+
+ Calculate the function for ``delta=1`` at several points by providing
+ a list or NumPy array for `r`.
+
+ >>> pseudo_huber(2., np.array([1., 1.5, 3., 4.]))
+ array([0.47213595, 1. , 3.21110255, 4.94427191])
+
+ The function can be calculated for different `delta` and `r` by
+ providing arrays for both with compatible shapes for broadcasting.
+
+ >>> r = np.array([1., 2.5, 8., 10.])
+ >>> deltas = np.array([[1.], [5.], [9.]])
+ >>> print(r.shape, deltas.shape)
+ (4,) (3, 1)
+
+ >>> pseudo_huber(deltas, r)
+ array([[ 0.41421356, 1.6925824 , 7.06225775, 9.04987562],
+ [ 0.49509757, 2.95084972, 22.16990566, 30.90169944],
+ [ 0.49846624, 3.06693762, 27.37435121, 40.08261642]])
+
+ Plot the function for different `delta`.
+
+ >>> x = np.linspace(-4, 4, 500)
+ >>> deltas = [1, 2, 3]
+ >>> linestyles = ["dashed", "dotted", "dashdot"]
+ >>> fig, ax = plt.subplots()
+ >>> combined_plot_parameters = list(zip(deltas, linestyles))
+ >>> for delta, style in combined_plot_parameters:
+ ... ax.plot(x, pseudo_huber(delta, x), label=rf"$\delta={delta}$",
+ ... ls=style)
+ >>> ax.legend(loc="upper center")
+ >>> ax.set_xlabel("$x$")
+ >>> ax.set_title(r"Pseudo-Huber loss function $h_{\delta}(x)$")
+ >>> ax.set_xlim(-4, 4)
+ >>> ax.set_ylim(0, 8)
+ >>> plt.show()
+
+ Finally, illustrate the difference between `huber` and `pseudo_huber` by
+ plotting them and their gradients with respect to `r`. The plot shows
+ that `pseudo_huber` is continuously differentiable while `huber` is not
+ at the points :math:`\pm\delta`.
+
+ >>> def huber_grad(delta, x):
+ ... grad = np.copy(x)
+ ... linear_area = np.argwhere(np.abs(x) > delta)
+ ... grad[linear_area]=delta*np.sign(x[linear_area])
+ ... return grad
+ >>> def pseudo_huber_grad(delta, x):
+ ... return x* (1+(x/delta)**2)**(-0.5)
+ >>> x=np.linspace(-3, 3, 500)
+ >>> delta = 1.
+ >>> fig, ax = plt.subplots(figsize=(7, 7))
+ >>> ax.plot(x, huber(delta, x), label="Huber", ls="dashed")
+ >>> ax.plot(x, huber_grad(delta, x), label="Huber Gradient", ls="dashdot")
+ >>> ax.plot(x, pseudo_huber(delta, x), label="Pseudo-Huber", ls="dotted")
+ >>> ax.plot(x, pseudo_huber_grad(delta, x), label="Pseudo-Huber Gradient",
+ ... ls="solid")
+ >>> ax.legend(loc="upper center")
+ >>> plt.show()
+ """)
+
+add_newdoc("rel_entr",
+ r"""
+ rel_entr(x, y, out=None)
+
+ Elementwise function for computing relative entropy.
+
+ .. math::
+
+ \mathrm{rel\_entr}(x, y) =
+ \begin{cases}
+ x \log(x / y) & x > 0, y > 0 \\
+ 0 & x = 0, y \ge 0 \\
+ \infty & \text{otherwise}
+ \end{cases}
+
+ Parameters
+ ----------
+ x, y : array_like
+ Input arrays
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Relative entropy of the inputs
+
+ See Also
+ --------
+ entr, kl_div, scipy.stats.entropy
+
+ Notes
+ -----
+ .. versionadded:: 0.15.0
+
+ This function is jointly convex in x and y.
+
+ The origin of this function is in convex programming; see
+ [1]_. Given two discrete probability distributions :math:`p_1,
+ \ldots, p_n` and :math:`q_1, \ldots, q_n`, the definition of relative
+ entropy in the context of *information theory* is
+
+ .. math::
+
+ \sum_{i = 1}^n \mathrm{rel\_entr}(p_i, q_i).
+
+ To compute the latter quantity, use `scipy.stats.entropy`.
+
+ See [2]_ for details.
+
+ References
+ ----------
+ .. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.
+ Cambridge University Press, 2004.
+ :doi:`https://doi.org/10.1017/CBO9780511804441`
+ .. [2] Kullback-Leibler divergence,
+ https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
+
+ """)
+
+add_newdoc("round",
+ """
+ round(x, out=None)
+
+ Round to the nearest integer.
+
+ Returns the nearest integer to `x`. If `x` ends in 0.5 exactly,
+ the nearest even integer is chosen.
+
+ Parameters
+ ----------
+ x : array_like
+ Real valued input.
+ out : ndarray, optional
+ Optional output array for the function results.
+
+ Returns
+ -------
+ scalar or ndarray
+ The nearest integers to the elements of `x`. The result is of
+ floating type, not integer type.
+
+ Examples
+ --------
+ >>> import scipy.special as sc
+
+ It rounds to even.
+
+ >>> sc.round([0.5, 1.5])
+ array([0., 2.])
+
+ """)
+
+add_newdoc("shichi",
+ r"""
+ shichi(x, out=None)
+
+ Hyperbolic sine and cosine integrals.
+
+ The hyperbolic sine integral is
+
+ .. math::
+
+ \int_0^x \frac{\sinh{t}}{t}dt
+
+ and the hyperbolic cosine integral is
+
+ .. math::
+
+ \gamma + \log(x) + \int_0^x \frac{\cosh{t} - 1}{t} dt
+
+ where :math:`\gamma` is Euler's constant and :math:`\log` is the
+ principal branch of the logarithm [1]_ (see also [2]_).
+
+ Parameters
+ ----------
+ x : array_like
+ Real or complex points at which to compute the hyperbolic sine
+ and cosine integrals.
+ out : tuple of ndarray, optional
+ Optional output arrays for the function results
+
+ Returns
+ -------
+ si : scalar or ndarray
+ Hyperbolic sine integral at ``x``
+ ci : scalar or ndarray
+ Hyperbolic cosine integral at ``x``
+
+ See Also
+ --------
+ sici : Sine and cosine integrals.
+ exp1 : Exponential integral E1.
+ expi : Exponential integral Ei.
+
+ Notes
+ -----
+ For real arguments with ``x < 0``, ``chi`` is the real part of the
+ hyperbolic cosine integral. For such points ``chi(x)`` and ``chi(x
+ + 0j)`` differ by a factor of ``1j*pi``.
+
+ For real arguments the function is computed by calling Cephes'
+ [3]_ *shichi* routine. For complex arguments the algorithm is based
+ on Mpmath's [4]_ *shi* and *chi* routines.
+
+ References
+ ----------
+ .. [1] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ (See Section 5.2.)
+ .. [2] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/6.2.E15 and https://dlmf.nist.gov/6.2.E16
+ .. [3] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+ .. [4] Fredrik Johansson and others.
+ "mpmath: a Python library for arbitrary-precision floating-point
+ arithmetic" (Version 0.19) http://mpmath.org/
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import shichi, sici
+
+ `shichi` accepts real or complex input:
+
+ >>> shichi(0.5)
+ (0.5069967498196671, -0.05277684495649357)
+ >>> shichi(0.5 + 2.5j)
+ ((0.11772029666668238+1.831091777729851j),
+ (0.29912435887648825+1.7395351121166562j))
+
+ The hyperbolic sine and cosine integrals Shi(z) and Chi(z) are
+ related to the sine and cosine integrals Si(z) and Ci(z) by
+
+ * Shi(z) = -i*Si(i*z)
+ * Chi(z) = Ci(-i*z) + i*pi/2
+
+ >>> z = 0.25 + 5j
+ >>> shi, chi = shichi(z)
+ >>> shi, -1j*sici(1j*z)[0] # Should be the same.
+ ((-0.04834719325101729+1.5469354086921228j),
+ (-0.04834719325101729+1.5469354086921228j))
+ >>> chi, sici(-1j*z)[1] + 1j*np.pi/2 # Should be the same.
+ ((-0.19568708973868087+1.556276312103824j),
+ (-0.19568708973868087+1.556276312103824j))
+
+ Plot the functions evaluated on the real axis:
+
+ >>> xp = np.geomspace(1e-8, 4.0, 250)
+ >>> x = np.concatenate((-xp[::-1], xp))
+ >>> shi, chi = shichi(x)
+
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, shi, label='Shi(x)')
+ >>> ax.plot(x, chi, '--', label='Chi(x)')
+ >>> ax.set_xlabel('x')
+ >>> ax.set_title('Hyperbolic Sine and Cosine Integrals')
+ >>> ax.legend(shadow=True, framealpha=1, loc='lower right')
+ >>> ax.grid(True)
+ >>> plt.show()
+
+ """)
+
+add_newdoc("sici",
+ r"""
+ sici(x, out=None)
+
+ Sine and cosine integrals.
+
+ The sine integral is
+
+ .. math::
+
+ \int_0^x \frac{\sin{t}}{t}dt
+
+ and the cosine integral is
+
+ .. math::
+
+ \gamma + \log(x) + \int_0^x \frac{\cos{t} - 1}{t}dt
+
+ where :math:`\gamma` is Euler's constant and :math:`\log` is the
+ principal branch of the logarithm [1]_ (see also [2]_).
+
+ Parameters
+ ----------
+ x : array_like
+ Real or complex points at which to compute the sine and cosine
+ integrals.
+ out : tuple of ndarray, optional
+ Optional output arrays for the function results
+
+ Returns
+ -------
+ si : scalar or ndarray
+ Sine integral at ``x``
+ ci : scalar or ndarray
+ Cosine integral at ``x``
+
+ See Also
+ --------
+ shichi : Hyperbolic sine and cosine integrals.
+ exp1 : Exponential integral E1.
+ expi : Exponential integral Ei.
+
+ Notes
+ -----
+ For real arguments with ``x < 0``, ``ci`` is the real part of the
+ cosine integral. For such points ``ci(x)`` and ``ci(x + 0j)``
+ differ by a factor of ``1j*pi``.
+
+ For real arguments the function is computed by calling Cephes'
+ [3]_ *sici* routine. For complex arguments the algorithm is based
+ on Mpmath's [4]_ *si* and *ci* routines.
+
+ References
+ ----------
+ .. [1] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ (See Section 5.2.)
+ .. [2] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/6.2.E9, https://dlmf.nist.gov/6.2.E12,
+ and https://dlmf.nist.gov/6.2.E13
+ .. [3] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+ .. [4] Fredrik Johansson and others.
+ "mpmath: a Python library for arbitrary-precision floating-point
+ arithmetic" (Version 0.19) http://mpmath.org/
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import sici, exp1
+
+ `sici` accepts real or complex input:
+
+ >>> sici(2.5)
+ (1.7785201734438267, 0.2858711963653835)
+ >>> sici(2.5 + 3j)
+ ((4.505735874563953+0.06863305018999577j),
+ (0.0793644206906966-2.935510262937543j))
+
+ For z in the right half plane, the sine and cosine integrals are
+ related to the exponential integral E1 (implemented in SciPy as
+ `scipy.special.exp1`) by
+
+ * Si(z) = (E1(i*z) - E1(-i*z))/2i + pi/2
+ * Ci(z) = -(E1(i*z) + E1(-i*z))/2
+
+ See [1]_ (equations 5.2.21 and 5.2.23).
+
+ We can verify these relations:
+
+ >>> z = 2 - 3j
+ >>> sici(z)
+ ((4.54751388956229-1.3991965806460565j),
+ (1.408292501520851+2.9836177420296055j))
+
+ >>> (exp1(1j*z) - exp1(-1j*z))/2j + np.pi/2 # Same as sine integral
+ (4.54751388956229-1.3991965806460565j)
+
+ >>> -(exp1(1j*z) + exp1(-1j*z))/2 # Same as cosine integral
+ (1.408292501520851+2.9836177420296055j)
+
+ Plot the functions evaluated on the real axis; the dotted horizontal
+ lines are at pi/2 and -pi/2:
+
+ >>> x = np.linspace(-16, 16, 150)
+ >>> si, ci = sici(x)
+
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, si, label='Si(x)')
+ >>> ax.plot(x, ci, '--', label='Ci(x)')
+ >>> ax.legend(shadow=True, framealpha=1, loc='upper left')
+ >>> ax.set_xlabel('x')
+ >>> ax.set_title('Sine and Cosine Integrals')
+ >>> ax.axhline(np.pi/2, linestyle=':', alpha=0.5, color='k')
+ >>> ax.axhline(-np.pi/2, linestyle=':', alpha=0.5, color='k')
+ >>> ax.grid(True)
+ >>> plt.show()
+
+ """)
+
+add_newdoc("smirnov",
+ r"""
+ smirnov(n, d, out=None)
+
+ Kolmogorov-Smirnov complementary cumulative distribution function
+
+ Returns the exact Kolmogorov-Smirnov complementary cumulative
+ distribution function,(aka the Survival Function) of Dn+ (or Dn-)
+ for a one-sided test of equality between an empirical and a
+ theoretical distribution. It is equal to the probability that the
+ maximum difference between a theoretical distribution and an empirical
+ one based on `n` samples is greater than d.
+
+ Parameters
+ ----------
+ n : int
+ Number of samples
+ d : float array_like
+ Deviation between the Empirical CDF (ECDF) and the target CDF.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The value(s) of smirnov(n, d), Prob(Dn+ >= d) (Also Prob(Dn- >= d))
+
+ See Also
+ --------
+ smirnovi : The Inverse Survival Function for the distribution
+ scipy.stats.ksone : Provides the functionality as a continuous distribution
+ kolmogorov, kolmogi : Functions for the two-sided distribution
+
+ Notes
+ -----
+ `smirnov` is used by `stats.kstest` in the application of the
+ Kolmogorov-Smirnov Goodness of Fit test. For historical reasons this
+ function is exposed in `scpy.special`, but the recommended way to achieve
+ the most accurate CDF/SF/PDF/PPF/ISF computations is to use the
+ `stats.ksone` distribution.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import smirnov
+ >>> from scipy.stats import norm
+
+ Show the probability of a gap at least as big as 0, 0.5 and 1.0 for a
+ sample of size 5.
+
+ >>> smirnov(5, [0, 0.5, 1.0])
+ array([ 1. , 0.056, 0. ])
+
+ Compare a sample of size 5 against N(0, 1), the standard normal
+ distribution with mean 0 and standard deviation 1.
+
+ `x` is the sample.
+
+ >>> x = np.array([-1.392, -0.135, 0.114, 0.190, 1.82])
+
+ >>> target = norm(0, 1)
+ >>> cdfs = target.cdf(x)
+ >>> cdfs
+ array([0.0819612 , 0.44630594, 0.5453811 , 0.57534543, 0.9656205 ])
+
+ Construct the empirical CDF and the K-S statistics (Dn+, Dn-, Dn).
+
+ >>> n = len(x)
+ >>> ecdfs = np.arange(n+1, dtype=float)/n
+ >>> cols = np.column_stack([x, ecdfs[1:], cdfs, cdfs - ecdfs[:n],
+ ... ecdfs[1:] - cdfs])
+ >>> with np.printoptions(precision=3):
+ ... print(cols)
+ [[-1.392 0.2 0.082 0.082 0.118]
+ [-0.135 0.4 0.446 0.246 -0.046]
+ [ 0.114 0.6 0.545 0.145 0.055]
+ [ 0.19 0.8 0.575 -0.025 0.225]
+ [ 1.82 1. 0.966 0.166 0.034]]
+ >>> gaps = cols[:, -2:]
+ >>> Dnpm = np.max(gaps, axis=0)
+ >>> print(f'Dn-={Dnpm[0]:f}, Dn+={Dnpm[1]:f}')
+ Dn-=0.246306, Dn+=0.224655
+ >>> probs = smirnov(n, Dnpm)
+ >>> print(f'For a sample of size {n} drawn from N(0, 1):',
+ ... f' Smirnov n={n}: Prob(Dn- >= {Dnpm[0]:f}) = {probs[0]:.4f}',
+ ... f' Smirnov n={n}: Prob(Dn+ >= {Dnpm[1]:f}) = {probs[1]:.4f}',
+ ... sep='\n')
+ For a sample of size 5 drawn from N(0, 1):
+ Smirnov n=5: Prob(Dn- >= 0.246306) = 0.4711
+ Smirnov n=5: Prob(Dn+ >= 0.224655) = 0.5245
+
+ Plot the empirical CDF and the standard normal CDF.
+
+ >>> import matplotlib.pyplot as plt
+ >>> plt.step(np.concatenate(([-2.5], x, [2.5])),
+ ... np.concatenate((ecdfs, [1])),
+ ... where='post', label='Empirical CDF')
+ >>> xx = np.linspace(-2.5, 2.5, 100)
+ >>> plt.plot(xx, target.cdf(xx), '--', label='CDF for N(0, 1)')
+
+ Add vertical lines marking Dn+ and Dn-.
+
+ >>> iminus, iplus = np.argmax(gaps, axis=0)
+ >>> plt.vlines([x[iminus]], ecdfs[iminus], cdfs[iminus], color='r',
+ ... alpha=0.5, lw=4)
+ >>> plt.vlines([x[iplus]], cdfs[iplus], ecdfs[iplus+1], color='m',
+ ... alpha=0.5, lw=4)
+
+ >>> plt.grid(True)
+ >>> plt.legend(framealpha=1, shadow=True)
+ >>> plt.show()
+ """)
+
+add_newdoc("smirnovi",
+ """
+ smirnovi(n, p, out=None)
+
+ Inverse to `smirnov`
+
+ Returns `d` such that ``smirnov(n, d) == p``, the critical value
+ corresponding to `p`.
+
+ Parameters
+ ----------
+ n : int
+ Number of samples
+ p : float array_like
+ Probability
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ The value(s) of smirnovi(n, p), the critical values.
+
+ See Also
+ --------
+ smirnov : The Survival Function (SF) for the distribution
+ scipy.stats.ksone : Provides the functionality as a continuous distribution
+ kolmogorov, kolmogi : Functions for the two-sided distribution
+ scipy.stats.kstwobign : Two-sided Kolmogorov-Smirnov distribution, large n
+
+ Notes
+ -----
+ `smirnov` is used by `stats.kstest` in the application of the
+ Kolmogorov-Smirnov Goodness of Fit test. For historical reasons this
+ function is exposed in `scpy.special`, but the recommended way to achieve
+ the most accurate CDF/SF/PDF/PPF/ISF computations is to use the
+ `stats.ksone` distribution.
+
+ Examples
+ --------
+ >>> from scipy.special import smirnovi, smirnov
+
+ >>> n = 24
+ >>> deviations = [0.1, 0.2, 0.3]
+
+ Use `smirnov` to compute the complementary CDF of the Smirnov
+ distribution for the given number of samples and deviations.
+
+ >>> p = smirnov(n, deviations)
+ >>> p
+ array([0.58105083, 0.12826832, 0.01032231])
+
+ The inverse function ``smirnovi(n, p)`` returns ``deviations``.
+
+ >>> smirnovi(n, p)
+ array([0.1, 0.2, 0.3])
+
+ """)
+
+add_newdoc("_smirnovc",
+ """
+ _smirnovc(n, d)
+ Internal function, do not use.
+ """)
+
+add_newdoc("_smirnovci",
+ """
+ Internal function, do not use.
+ """)
+
+add_newdoc("_smirnovp",
+ """
+ _smirnovp(n, p)
+ Internal function, do not use.
+ """)
+
+add_newdoc("spence",
+ r"""
+ spence(z, out=None)
+
+ Spence's function, also known as the dilogarithm.
+
+ It is defined to be
+
+ .. math::
+ \int_1^z \frac{\log(t)}{1 - t}dt
+
+ for complex :math:`z`, where the contour of integration is taken
+ to avoid the branch cut of the logarithm. Spence's function is
+ analytic everywhere except the negative real axis where it has a
+ branch cut.
+
+ Parameters
+ ----------
+ z : array_like
+ Points at which to evaluate Spence's function
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ s : scalar or ndarray
+ Computed values of Spence's function
+
+ Notes
+ -----
+ There is a different convention which defines Spence's function by
+ the integral
+
+ .. math::
+ -\int_0^z \frac{\log(1 - t)}{t}dt;
+
+ this is our ``spence(1 - z)``.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import spence
+ >>> import matplotlib.pyplot as plt
+
+ The function is defined for complex inputs:
+
+ >>> spence([1-1j, 1.5+2j, 3j, -10-5j])
+ array([-0.20561676+0.91596559j, -0.86766909-1.39560134j,
+ -0.59422064-2.49129918j, -1.14044398+6.80075924j])
+
+ For complex inputs on the branch cut, which is the negative real axis,
+ the function returns the limit for ``z`` with positive imaginary part.
+ For example, in the following, note the sign change of the imaginary
+ part of the output for ``z = -2`` and ``z = -2 - 1e-8j``:
+
+ >>> spence([-2 + 1e-8j, -2, -2 - 1e-8j])
+ array([2.32018041-3.45139229j, 2.32018042-3.4513923j ,
+ 2.32018041+3.45139229j])
+
+ The function returns ``nan`` for real inputs on the branch cut:
+
+ >>> spence(-1.5)
+ nan
+
+ Verify some particular values: ``spence(0) = pi**2/6``,
+ ``spence(1) = 0`` and ``spence(2) = -pi**2/12``.
+
+ >>> spence([0, 1, 2])
+ array([ 1.64493407, 0. , -0.82246703])
+ >>> np.pi**2/6, -np.pi**2/12
+ (1.6449340668482264, -0.8224670334241132)
+
+ Verify the identity::
+
+ spence(z) + spence(1 - z) = pi**2/6 - log(z)*log(1 - z)
+
+ >>> z = 3 + 4j
+ >>> spence(z) + spence(1 - z)
+ (-2.6523186143876067+1.8853470951513935j)
+ >>> np.pi**2/6 - np.log(z)*np.log(1 - z)
+ (-2.652318614387606+1.885347095151394j)
+
+ Plot the function for positive real input.
+
+ >>> fig, ax = plt.subplots()
+ >>> x = np.linspace(0, 6, 400)
+ >>> ax.plot(x, spence(x))
+ >>> ax.grid()
+ >>> ax.set_xlabel('x')
+ >>> ax.set_title('spence(x)')
+ >>> plt.show()
+ """)
+
+add_newdoc(
+ "stdtr",
+ r"""
+ stdtr(df, t, out=None)
+
+ Student t distribution cumulative distribution function
+
+ Returns the integral:
+
+ .. math::
+ \frac{\Gamma((df+1)/2)}{\sqrt{\pi df} \Gamma(df/2)}
+ \int_{-\infty}^t (1+x^2/df)^{-(df+1)/2}\, dx
+
+ Parameters
+ ----------
+ df : array_like
+ Degrees of freedom
+ t : array_like
+ Upper bound of the integral
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Value of the Student t CDF at t
+
+ See Also
+ --------
+ stdtridf : inverse of stdtr with respect to `df`
+ stdtrit : inverse of stdtr with respect to `t`
+ scipy.stats.t : student t distribution
+
+ Notes
+ -----
+ The student t distribution is also available as `scipy.stats.t`.
+ Calling `stdtr` directly can improve performance compared to the
+ ``cdf`` method of `scipy.stats.t` (see last example below).
+
+ The function is computed using the Boost Math library [1]_, which
+ relies on the incomplete beta function.
+
+ References
+ ----------
+ .. [1] Boost C++ Libraries, http://www.boost.org/
+
+ Examples
+ --------
+ Calculate the function for ``df=3`` at ``t=1``.
+
+ >>> import numpy as np
+ >>> from scipy.special import stdtr
+ >>> import matplotlib.pyplot as plt
+ >>> stdtr(3, 1)
+ 0.8044988905221148
+
+ Plot the function for three different degrees of freedom.
+
+ >>> x = np.linspace(-10, 10, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> parameters = [(1, "solid"), (3, "dashed"), (10, "dotted")]
+ >>> for (df, linestyle) in parameters:
+ ... ax.plot(x, stdtr(df, x), ls=linestyle, label=f"$df={df}$")
+ >>> ax.legend()
+ >>> ax.set_title("Student t distribution cumulative distribution function")
+ >>> plt.show()
+
+ The function can be computed for several degrees of freedom at the same
+ time by providing a NumPy array or list for `df`:
+
+ >>> stdtr([1, 2, 3], 1)
+ array([0.75 , 0.78867513, 0.80449889])
+
+ It is possible to calculate the function at several points for several
+ different degrees of freedom simultaneously by providing arrays for `df`
+ and `t` with shapes compatible for broadcasting. Compute `stdtr` at
+ 4 points for 3 degrees of freedom resulting in an array of shape 3x4.
+
+ >>> dfs = np.array([[1], [2], [3]])
+ >>> t = np.array([2, 4, 6, 8])
+ >>> dfs.shape, t.shape
+ ((3, 1), (4,))
+
+ >>> stdtr(dfs, t)
+ array([[0.85241638, 0.92202087, 0.94743154, 0.96041658],
+ [0.90824829, 0.97140452, 0.98666426, 0.99236596],
+ [0.93033702, 0.98599577, 0.99536364, 0.99796171]])
+
+ The t distribution is also available as `scipy.stats.t`. Calling `stdtr`
+ directly can be much faster than calling the ``cdf`` method of
+ `scipy.stats.t`. To get the same results, one must use the following
+ parametrization: ``scipy.stats.t(df).cdf(x) = stdtr(df, x)``.
+
+ >>> from scipy.stats import t
+ >>> df, x = 3, 1
+ >>> stdtr_result = stdtr(df, x) # this can be faster than below
+ >>> stats_result = t(df).cdf(x)
+ >>> stats_result == stdtr_result # test that results are equal
+ True
+ """)
+
+add_newdoc("stdtridf",
+ """
+ stdtridf(p, t, out=None)
+
+ Inverse of `stdtr` vs df
+
+ Returns the argument df such that stdtr(df, t) is equal to `p`.
+
+ Parameters
+ ----------
+ p : array_like
+ Probability
+ t : array_like
+ Upper bound of the integral
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ df : scalar or ndarray
+ Value of `df` such that ``stdtr(df, t) == p``
+
+ See Also
+ --------
+ stdtr : Student t CDF
+ stdtrit : inverse of stdtr with respect to `t`
+ scipy.stats.t : Student t distribution
+
+ Examples
+ --------
+ Compute the student t cumulative distribution function for one
+ parameter set.
+
+ >>> from scipy.special import stdtr, stdtridf
+ >>> df, x = 5, 2
+ >>> cdf_value = stdtr(df, x)
+ >>> cdf_value
+ 0.9490302605850709
+
+ Verify that `stdtridf` recovers the original value for `df` given
+ the CDF value and `x`.
+
+ >>> stdtridf(cdf_value, x)
+ 5.0
+ """)
+
+add_newdoc("stdtrit",
+ """
+ stdtrit(df, p, out=None)
+
+ The `p`-th quantile of the student t distribution.
+
+ This function is the inverse of the student t distribution cumulative
+ distribution function (CDF), returning `t` such that `stdtr(df, t) = p`.
+
+ Returns the argument `t` such that stdtr(df, t) is equal to `p`.
+
+ Parameters
+ ----------
+ df : array_like
+ Degrees of freedom
+ p : array_like
+ Probability
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ t : scalar or ndarray
+ Value of `t` such that ``stdtr(df, t) == p``
+
+ See Also
+ --------
+ stdtr : Student t CDF
+ stdtridf : inverse of stdtr with respect to `df`
+ scipy.stats.t : Student t distribution
+
+ Notes
+ -----
+ The student t distribution is also available as `scipy.stats.t`. Calling
+ `stdtrit` directly can improve performance compared to the ``ppf``
+ method of `scipy.stats.t` (see last example below).
+
+ The function is computed using the Boost Math library [1]_, which
+ relies on the incomplete beta function.
+
+ References
+ ----------
+ .. [1] Boost C++ Libraries, http://www.boost.org/
+
+ Examples
+ --------
+ `stdtrit` represents the inverse of the student t distribution CDF which
+ is available as `stdtr`. Here, we calculate the CDF for ``df`` at
+ ``x=1``. `stdtrit` then returns ``1`` up to floating point errors
+ given the same value for `df` and the computed CDF value.
+
+ >>> import numpy as np
+ >>> from scipy.special import stdtr, stdtrit
+ >>> import matplotlib.pyplot as plt
+ >>> df = 3
+ >>> x = 1
+ >>> cdf_value = stdtr(df, x)
+ >>> stdtrit(df, cdf_value)
+ 0.9999999994418539
+
+ Plot the function for three different degrees of freedom.
+
+ >>> x = np.linspace(0, 1, 1000)
+ >>> parameters = [(1, "solid"), (2, "dashed"), (5, "dotted")]
+ >>> fig, ax = plt.subplots()
+ >>> for (df, linestyle) in parameters:
+ ... ax.plot(x, stdtrit(df, x), ls=linestyle, label=f"$df={df}$")
+ >>> ax.legend()
+ >>> ax.set_ylim(-10, 10)
+ >>> ax.set_title("Student t distribution quantile function")
+ >>> plt.show()
+
+ The function can be computed for several degrees of freedom at the same
+ time by providing a NumPy array or list for `df`:
+
+ >>> stdtrit([1, 2, 3], 0.7)
+ array([0.72654253, 0.6172134 , 0.58438973])
+
+ It is possible to calculate the function at several points for several
+ different degrees of freedom simultaneously by providing arrays for `df`
+ and `p` with shapes compatible for broadcasting. Compute `stdtrit` at
+ 4 points for 3 degrees of freedom resulting in an array of shape 3x4.
+
+ >>> dfs = np.array([[1], [2], [3]])
+ >>> p = np.array([0.2, 0.4, 0.7, 0.8])
+ >>> dfs.shape, p.shape
+ ((3, 1), (4,))
+
+ >>> stdtrit(dfs, p)
+ array([[-1.37638192, -0.3249197 , 0.72654253, 1.37638192],
+ [-1.06066017, -0.28867513, 0.6172134 , 1.06066017],
+ [-0.97847231, -0.27667066, 0.58438973, 0.97847231]])
+
+ The t distribution is also available as `scipy.stats.t`. Calling `stdtrit`
+ directly can be much faster than calling the ``ppf`` method of
+ `scipy.stats.t`. To get the same results, one must use the following
+ parametrization: ``scipy.stats.t(df).ppf(x) = stdtrit(df, x)``.
+
+ >>> from scipy.stats import t
+ >>> df, x = 3, 0.5
+ >>> stdtrit_result = stdtrit(df, x) # this can be faster than below
+ >>> stats_result = t(df).ppf(x)
+ >>> stats_result == stdtrit_result # test that results are equal
+ True
+ """)
+
+add_newdoc(
+ "tklmbda",
+ r"""
+ tklmbda(x, lmbda, out=None)
+
+ Cumulative distribution function of the Tukey lambda distribution.
+
+ Parameters
+ ----------
+ x, lmbda : array_like
+ Parameters
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ cdf : scalar or ndarray
+ Value of the Tukey lambda CDF
+
+ See Also
+ --------
+ scipy.stats.tukeylambda : Tukey lambda distribution
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import tklmbda, expit
+
+ Compute the cumulative distribution function (CDF) of the Tukey lambda
+ distribution at several ``x`` values for `lmbda` = -1.5.
+
+ >>> x = np.linspace(-2, 2, 9)
+ >>> x
+ array([-2. , -1.5, -1. , -0.5, 0. , 0.5, 1. , 1.5, 2. ])
+ >>> tklmbda(x, -1.5)
+ array([0.34688734, 0.3786554 , 0.41528805, 0.45629737, 0.5 ,
+ 0.54370263, 0.58471195, 0.6213446 , 0.65311266])
+
+ When `lmbda` is 0, the function is the logistic sigmoid function,
+ which is implemented in `scipy.special` as `expit`.
+
+ >>> tklmbda(x, 0)
+ array([0.11920292, 0.18242552, 0.26894142, 0.37754067, 0.5 ,
+ 0.62245933, 0.73105858, 0.81757448, 0.88079708])
+ >>> expit(x)
+ array([0.11920292, 0.18242552, 0.26894142, 0.37754067, 0.5 ,
+ 0.62245933, 0.73105858, 0.81757448, 0.88079708])
+
+ When `lmbda` is 1, the Tukey lambda distribution is uniform on the
+ interval [-1, 1], so the CDF increases linearly.
+
+ >>> t = np.linspace(-1, 1, 9)
+ >>> tklmbda(t, 1)
+ array([0. , 0.125, 0.25 , 0.375, 0.5 , 0.625, 0.75 , 0.875, 1. ])
+
+ In the following, we generate plots for several values of `lmbda`.
+
+ The first figure shows graphs for `lmbda` <= 0.
+
+ >>> styles = ['-', '-.', '--', ':']
+ >>> fig, ax = plt.subplots()
+ >>> x = np.linspace(-12, 12, 500)
+ >>> for k, lmbda in enumerate([-1.0, -0.5, 0.0]):
+ ... y = tklmbda(x, lmbda)
+ ... ax.plot(x, y, styles[k], label=rf'$\lambda$ = {lmbda:-4.1f}')
+
+ >>> ax.set_title(r'tklmbda(x, $\lambda$)')
+ >>> ax.set_label('x')
+ >>> ax.legend(framealpha=1, shadow=True)
+ >>> ax.grid(True)
+
+ The second figure shows graphs for `lmbda` > 0. The dots in the
+ graphs show the bounds of the support of the distribution.
+
+ >>> fig, ax = plt.subplots()
+ >>> x = np.linspace(-4.2, 4.2, 500)
+ >>> lmbdas = [0.25, 0.5, 1.0, 1.5]
+ >>> for k, lmbda in enumerate(lmbdas):
+ ... y = tklmbda(x, lmbda)
+ ... ax.plot(x, y, styles[k], label=fr'$\lambda$ = {lmbda}')
+
+ >>> ax.set_prop_cycle(None)
+ >>> for lmbda in lmbdas:
+ ... ax.plot([-1/lmbda, 1/lmbda], [0, 1], '.', ms=8)
+
+ >>> ax.set_title(r'tklmbda(x, $\lambda$)')
+ >>> ax.set_xlabel('x')
+ >>> ax.legend(framealpha=1, shadow=True)
+ >>> ax.grid(True)
+
+ >>> plt.tight_layout()
+ >>> plt.show()
+
+ The CDF of the Tukey lambda distribution is also implemented as the
+ ``cdf`` method of `scipy.stats.tukeylambda`. In the following,
+ ``tukeylambda.cdf(x, -0.5)`` and ``tklmbda(x, -0.5)`` compute the
+ same values:
+
+ >>> from scipy.stats import tukeylambda
+ >>> x = np.linspace(-2, 2, 9)
+
+ >>> tukeylambda.cdf(x, -0.5)
+ array([0.21995157, 0.27093858, 0.33541677, 0.41328161, 0.5 ,
+ 0.58671839, 0.66458323, 0.72906142, 0.78004843])
+
+ >>> tklmbda(x, -0.5)
+ array([0.21995157, 0.27093858, 0.33541677, 0.41328161, 0.5 ,
+ 0.58671839, 0.66458323, 0.72906142, 0.78004843])
+
+ The implementation in ``tukeylambda`` also provides location and scale
+ parameters, and other methods such as ``pdf()`` (the probability
+ density function) and ``ppf()`` (the inverse of the CDF), so for
+ working with the Tukey lambda distribution, ``tukeylambda`` is more
+ generally useful. The primary advantage of ``tklmbda`` is that it is
+ significantly faster than ``tukeylambda.cdf``.
+ """)
+
+add_newdoc("yn",
+ r"""
+ yn(n, x, out=None)
+
+ Bessel function of the second kind of integer order and real argument.
+
+ Parameters
+ ----------
+ n : array_like
+ Order (integer).
+ x : array_like
+ Argument (float).
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ Y : scalar or ndarray
+ Value of the Bessel function, :math:`Y_n(x)`.
+
+ See Also
+ --------
+ yv : For real order and real or complex argument.
+ y0: faster implementation of this function for order 0
+ y1: faster implementation of this function for order 1
+
+ Notes
+ -----
+ Wrapper for the Cephes [1]_ routine `yn`.
+
+ The function is evaluated by forward recurrence on `n`, starting with
+ values computed by the Cephes routines `y0` and `y1`. If ``n = 0`` or 1,
+ the routine for `y0` or `y1` is called directly.
+
+ References
+ ----------
+ .. [1] Cephes Mathematical Functions Library,
+ http://www.netlib.org/cephes/
+
+ Examples
+ --------
+ Evaluate the function of order 0 at one point.
+
+ >>> from scipy.special import yn
+ >>> yn(0, 1.)
+ 0.08825696421567697
+
+ Evaluate the function at one point for different orders.
+
+ >>> yn(0, 1.), yn(1, 1.), yn(2, 1.)
+ (0.08825696421567697, -0.7812128213002888, -1.6506826068162546)
+
+ The evaluation for different orders can be carried out in one call by
+ providing a list or NumPy array as argument for the `v` parameter:
+
+ >>> yn([0, 1, 2], 1.)
+ array([ 0.08825696, -0.78121282, -1.65068261])
+
+ Evaluate the function at several points for order 0 by providing an
+ array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0.5, 3., 8.])
+ >>> yn(0, points)
+ array([-0.44451873, 0.37685001, 0.22352149])
+
+ If `z` is an array, the order parameter `v` must be broadcastable to
+ the correct shape if different orders shall be computed in one call.
+ To calculate the orders 0 and 1 for a 1D array:
+
+ >>> orders = np.array([[0], [1]])
+ >>> orders.shape
+ (2, 1)
+
+ >>> yn(orders, points)
+ array([[-0.44451873, 0.37685001, 0.22352149],
+ [-1.47147239, 0.32467442, -0.15806046]])
+
+ Plot the functions of order 0 to 3 from 0 to 10.
+
+ >>> import matplotlib.pyplot as plt
+ >>> fig, ax = plt.subplots()
+ >>> x = np.linspace(0., 10., 1000)
+ >>> for i in range(4):
+ ... ax.plot(x, yn(i, x), label=f'$Y_{i!r}$')
+ >>> ax.set_ylim(-3, 1)
+ >>> ax.legend()
+ >>> plt.show()
+ """)
+
+
+add_newdoc("_struve_asymp_large_z",
+ """
+ _struve_asymp_large_z(v, z, is_h)
+
+ Internal function for testing `struve` & `modstruve`
+
+ Evaluates using asymptotic expansion
+
+ Returns
+ -------
+ v, err
+ """)
+
+add_newdoc("_struve_power_series",
+ """
+ _struve_power_series(v, z, is_h)
+
+ Internal function for testing `struve` & `modstruve`
+
+ Evaluates using power series
+
+ Returns
+ -------
+ v, err
+ """)
+
+add_newdoc("_struve_bessel_series",
+ """
+ _struve_bessel_series(v, z, is_h)
+
+ Internal function for testing `struve` & `modstruve`
+
+ Evaluates using Bessel function series
+
+ Returns
+ -------
+ v, err
+ """)
+
+add_newdoc("_spherical_jn",
+ """
+ Internal function, use `spherical_jn` instead.
+ """)
+
+add_newdoc("_spherical_jn_d",
+ """
+ Internal function, use `spherical_jn` instead.
+ """)
+
+add_newdoc("_spherical_yn",
+ """
+ Internal function, use `spherical_yn` instead.
+ """)
+
+add_newdoc("_spherical_yn_d",
+ """
+ Internal function, use `spherical_yn` instead.
+ """)
+
+add_newdoc("_spherical_in",
+ """
+ Internal function, use `spherical_in` instead.
+ """)
+
+add_newdoc("_spherical_in_d",
+ """
+ Internal function, use `spherical_in` instead.
+ """)
+
+add_newdoc("_spherical_kn",
+ """
+ Internal function, use `spherical_kn` instead.
+ """)
+
+add_newdoc("_spherical_kn_d",
+ """
+ Internal function, use `spherical_kn` instead.
+ """)
+
+add_newdoc("owens_t",
+ """
+ owens_t(h, a, out=None)
+
+ Owen's T Function.
+
+ The function T(h, a) gives the probability of the event
+ (X > h and 0 < Y < a * X) where X and Y are independent
+ standard normal random variables.
+
+ Parameters
+ ----------
+ h: array_like
+ Input value.
+ a: array_like
+ Input value.
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ t: scalar or ndarray
+ Probability of the event (X > h and 0 < Y < a * X),
+ where X and Y are independent standard normal random variables.
+
+ References
+ ----------
+ .. [1] M. Patefield and D. Tandy, "Fast and accurate calculation of
+ Owen's T Function", Statistical Software vol. 5, pp. 1-25, 2000.
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> a = 3.5
+ >>> h = 0.78
+ >>> special.owens_t(h, a)
+ 0.10877216734852274
+ """)
+
+add_newdoc("_factorial",
+ """
+ Internal function, do not use.
+ """)
+
+add_newdoc("ndtri_exp",
+ r"""
+ ndtri_exp(y, out=None)
+
+ Inverse of `log_ndtr` vs x. Allows for greater precision than
+ `ndtri` composed with `numpy.exp` for very small values of y and for
+ y close to 0.
+
+ Parameters
+ ----------
+ y : array_like of float
+ Function argument
+ out : ndarray, optional
+ Optional output array for the function results
+
+ Returns
+ -------
+ scalar or ndarray
+ Inverse of the log CDF of the standard normal distribution, evaluated
+ at y.
+
+ See Also
+ --------
+ log_ndtr : log of the standard normal cumulative distribution function
+ ndtr : standard normal cumulative distribution function
+ ndtri : standard normal percentile function
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> import scipy.special as sc
+
+ `ndtri_exp` agrees with the naive implementation when the latter does
+ not suffer from underflow.
+
+ >>> sc.ndtri_exp(-1)
+ -0.33747496376420244
+ >>> sc.ndtri(np.exp(-1))
+ -0.33747496376420244
+
+ For extreme values of y, the naive approach fails
+
+ >>> sc.ndtri(np.exp(-800))
+ -inf
+ >>> sc.ndtri(np.exp(-1e-20))
+ inf
+
+ whereas `ndtri_exp` is still able to compute the result to high precision.
+
+ >>> sc.ndtri_exp(-800)
+ -39.88469483825668
+ >>> sc.ndtri_exp(-1e-20)
+ 9.262340089798409
+ """)
+
+
+add_newdoc("_stirling2_inexact",
+ r"""
+ Internal function, do not use.
+ """)
+
+add_newdoc(
+ "_beta_pdf",
+ r"""
+ _beta_pdf(x, a, b)
+
+ Probability density function of beta distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued such that :math:`0 \leq x \leq 1`,
+ the upper limit of integration
+ a, b : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_beta_ppf",
+ r"""
+ _beta_ppf(x, a, b)
+
+ Percent point function of beta distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued such that :math:`0 \leq x \leq 1`,
+ the upper limit of integration
+ a, b : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_invgauss_ppf",
+ """
+ _invgauss_ppf(x, mu)
+
+ Percent point function of inverse gaussian distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ mu : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_invgauss_isf",
+ """
+ _invgauss_isf(x, mu, s)
+
+ Inverse survival function of inverse gaussian distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ mu : array_like
+ Positive, real-valued parameters
+ s : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_cauchy_ppf",
+ """
+ _cauchy_ppf(p, loc, scale)
+
+ Percent point function (i.e. quantile) of the Cauchy distribution.
+
+ Parameters
+ ----------
+ p : array_like
+ Probabilities
+ loc : array_like
+ Location parameter of the distribution.
+ scale : array_like
+ Scale parameter of the distribution.
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_cauchy_isf",
+ """
+ _cauchy_isf(p, loc, scale)
+
+ Inverse survival function of the Cauchy distribution.
+
+ Parameters
+ ----------
+ p : array_like
+ Probabilities
+ loc : array_like
+ Location parameter of the distribution.
+ scale : array_like
+ Scale parameter of the distribution.
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncx2_pdf",
+ """
+ _ncx2_pdf(x, k, l)
+
+ Probability density function of Non-central chi-squared distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ k, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncx2_cdf",
+ """
+ _ncx2_cdf(x, k, l)
+
+ Cumulative density function of Non-central chi-squared distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ k, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncx2_ppf",
+ """
+ _ncx2_ppf(x, k, l)
+
+ Percent point function of Non-central chi-squared distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ k, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncx2_sf",
+ """
+ _ncx2_sf(x, k, l)
+
+ Survival function of Non-central chi-squared distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ k, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncx2_isf",
+ """
+ _ncx2_isf(x, k, l)
+
+ Inverse survival function of Non-central chi-squared distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ k, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_pdf",
+ """
+ _ncf_pdf(x, v1, v2, l)
+
+ Probability density function of noncentral F-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_cdf",
+ """
+ _ncf_cdf(x, v1, v2, l)
+
+ Cumulative density function of noncentral F-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_ppf",
+ """
+ _ncf_ppf(x, v1, v2, l)
+
+ Percent point function of noncentral F-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_sf",
+ """
+ _ncf_sf(x, v1, v2, l)
+
+ Survival function of noncentral F-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_isf",
+ """
+ _ncf_isf(x, v1, v2, l)
+
+ Inverse survival function of noncentral F-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Positive real-valued
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_mean",
+ """
+ _ncf_mean(v1, v2, l)
+
+ Mean of noncentral F-distribution.
+
+ Parameters
+ ----------
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_variance",
+ """
+ _ncf_variance(v1, v2, l)
+
+ Variance of noncentral F-distribution.
+
+ Parameters
+ ----------
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_skewness",
+ """
+ _ncf_skewness(v1, v2, l)
+
+ Skewness of noncentral F-distribution.
+
+ Parameters
+ ----------
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_ncf_kurtosis_excess",
+ """
+ _ncf_kurtosis_excess(v1, v2, l)
+
+ Kurtosis excess of noncentral F-distribution.
+
+ Parameters
+ ----------
+ v1, v2, l : array_like
+ Positive, real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_cdf",
+ """
+ _nct_cdf(x, v, l)
+
+ Cumulative density function of noncentral t-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_pdf",
+ """
+ _nct_pdf(x, v, l)
+
+ Probability density function of noncentral t-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+
+add_newdoc(
+ "_nct_ppf",
+ """
+ _nct_ppf(x, v, l)
+
+ Percent point function of noncentral t-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_sf",
+ """
+ _nct_sf(x, v, l)
+
+ Survival function of noncentral t-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_isf",
+ """
+ _nct_isf(x, v, l)
+
+ Inverse survival function of noncentral t-distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_mean",
+ """
+ _nct_mean(v, l)
+
+ Mean of noncentral t-distribution.
+
+ Parameters
+ ----------
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_variance",
+ """
+ _nct_variance(v, l)
+
+ Variance of noncentral t-distribution.
+
+ Parameters
+ ----------
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_skewness",
+ """
+ _nct_skewness(v, l)
+
+ Skewness of noncentral t-distribution.
+
+ Parameters
+ ----------
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nct_kurtosis_excess",
+ """
+ _nct_kurtosis_excess(v, l)
+
+ Kurtosis excess of noncentral t-distribution.
+
+ Parameters
+ ----------
+ v : array_like
+ Positive, real-valued parameters
+ l : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_skewnorm_cdf",
+ """
+ _skewnorm_cdf(x, l, sc, sh)
+
+ Cumulative density function of skewnorm distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ l : array_like
+ Real-valued parameters
+ sc : array_like
+ Positive, Real-valued parameters
+ sh : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_skewnorm_ppf",
+ """
+ _skewnorm_ppf(x, l, sc, sh)
+
+ Percent point function of skewnorm distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ l : array_like
+ Real-valued parameters
+ sc : array_like
+ Positive, Real-valued parameters
+ sh : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_skewnorm_isf",
+ """
+ _skewnorm_isf(x, l, sc, sh)
+
+ Inverse survival function of skewnorm distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ l : array_like
+ Real-valued parameters
+ sc : array_like
+ Positive, Real-valued parameters
+ sh : array_like
+ Real-valued parameters
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_binom_pmf",
+ """
+ _binom_pmf(x, n, p)
+
+ Probability mass function of binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ n : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_binom_cdf",
+ """
+ _binom_cdf(x, n, p)
+
+ Cumulative density function of binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ n : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_binom_ppf",
+ """
+ _binom_ppf(x, n, p)
+
+ Percent point function of binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ n : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_binom_sf",
+ """
+ _binom_sf(x, n, p)
+
+ Survival function of binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ n : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_binom_isf",
+ """
+ _binom_isf(x, n, p)
+
+ Inverse survival function of binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ n : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_pmf",
+ """
+ _nbinom_pmf(x, r, p)
+
+ Probability mass function of negative binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_cdf",
+ """
+ _nbinom_cdf(x, r, p)
+
+ Cumulative density function of negative binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_ppf",
+ """
+ _nbinom_ppf(x, r, p)
+
+ Percent point function of negative binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_sf",
+ """
+ _nbinom_sf(x, r, p)
+
+ Survival function of negative binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_isf",
+ """
+ _nbinom_isf(x, r, p)
+
+ Inverse survival function of negative binomial distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_mean",
+ """
+ _nbinom_mean(r, p)
+
+ Mean of negative binomial distribution.
+
+ Parameters
+ ----------
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_variance",
+ """
+ _nbinom_variance(r, p)
+
+ Variance of negative binomial distribution.
+
+ Parameters
+ ----------
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_skewness",
+ """
+ _nbinom_skewness(r, p)
+
+ Skewness of negative binomial distribution.
+
+ Parameters
+ ----------
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_nbinom_kurtosis_excess",
+ """
+ _nbinom_kurtosis_excess(r, p)
+
+ Kurtosis excess of negative binomial distribution.
+
+ Parameters
+ ----------
+ r : array_like
+ Positive, integer-valued parameter
+ p : array_like
+ Positive, real-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_hypergeom_pmf",
+ """
+ _hypergeom_pmf(x, r, N, M)
+
+ Probability mass function of hypergeometric distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_hypergeom_cdf",
+ """
+ _hypergeom_cdf(x, r, N, M)
+
+ Cumulative density function of hypergeometric distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_hypergeom_sf",
+ """
+ _hypergeom_sf(x, r, N, M)
+
+ Survival function of hypergeometric distribution.
+
+ Parameters
+ ----------
+ x : array_like
+ Real-valued
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+ """)
+
+add_newdoc(
+ "_hypergeom_mean",
+ """
+ _hypergeom_mean(r, N, M)
+
+ Mean of hypergeometric distribution.
+
+ Parameters
+ ----------
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_hypergeom_variance",
+ """
+ _hypergeom_variance(r, N, M)
+
+ Mean of hypergeometric distribution.
+
+ Parameters
+ ----------
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
+
+add_newdoc(
+ "_hypergeom_skewness",
+ """
+ _hypergeom_skewness(r, N, M)
+
+ Skewness of hypergeometric distribution.
+
+ Parameters
+ ----------
+ r, N, M : array_like
+ Positive, integer-valued parameter
+
+ Returns
+ -------
+ scalar or ndarray
+
+ """)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_basic.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..1698d82b0001b315ca0b1ab49b3c8243896de34f
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_basic.py
@@ -0,0 +1,3382 @@
+#
+# Author: Travis Oliphant, 2002
+#
+
+import numpy as np
+import math
+import warnings
+from collections import defaultdict
+from heapq import heapify, heappop
+from numpy import (pi, asarray, floor, isscalar, sqrt, where,
+ sin, place, issubdtype, extract, inexact, nan, zeros, sinc)
+
+from . import _ufuncs
+from ._ufuncs import (mathieu_a, mathieu_b, iv, jv, gamma, rgamma,
+ psi, hankel1, hankel2, yv, kv, poch, binom,
+ _stirling2_inexact)
+
+from ._gufuncs import _lqn, _lqmn, _rctj, _rcty
+from ._input_validation import _nonneg_int_or_fail
+from . import _specfun
+from ._comb import _comb_int
+
+
+__all__ = [
+ 'ai_zeros',
+ 'assoc_laguerre',
+ 'bei_zeros',
+ 'beip_zeros',
+ 'ber_zeros',
+ 'bernoulli',
+ 'berp_zeros',
+ 'bi_zeros',
+ 'comb',
+ 'digamma',
+ 'diric',
+ 'erf_zeros',
+ 'euler',
+ 'factorial',
+ 'factorial2',
+ 'factorialk',
+ 'fresnel_zeros',
+ 'fresnelc_zeros',
+ 'fresnels_zeros',
+ 'h1vp',
+ 'h2vp',
+ 'ivp',
+ 'jn_zeros',
+ 'jnjnp_zeros',
+ 'jnp_zeros',
+ 'jnyn_zeros',
+ 'jvp',
+ 'kei_zeros',
+ 'keip_zeros',
+ 'kelvin_zeros',
+ 'ker_zeros',
+ 'kerp_zeros',
+ 'kvp',
+ 'lmbda',
+ 'lqmn',
+ 'lqn',
+ 'mathieu_even_coef',
+ 'mathieu_odd_coef',
+ 'obl_cv_seq',
+ 'pbdn_seq',
+ 'pbdv_seq',
+ 'pbvv_seq',
+ 'perm',
+ 'polygamma',
+ 'pro_cv_seq',
+ 'riccati_jn',
+ 'riccati_yn',
+ 'sinc',
+ 'softplus',
+ 'stirling2',
+ 'y0_zeros',
+ 'y1_zeros',
+ 'y1p_zeros',
+ 'yn_zeros',
+ 'ynp_zeros',
+ 'yvp',
+ 'zeta'
+]
+
+
+# mapping k to last n such that factorialk(n, k) < np.iinfo(np.int64).max
+_FACTORIALK_LIMITS_64BITS = {1: 20, 2: 33, 3: 44, 4: 54, 5: 65,
+ 6: 74, 7: 84, 8: 93, 9: 101}
+# mapping k to last n such that factorialk(n, k) < np.iinfo(np.int32).max
+_FACTORIALK_LIMITS_32BITS = {1: 12, 2: 19, 3: 25, 4: 31, 5: 37,
+ 6: 43, 7: 47, 8: 51, 9: 56}
+
+
+def diric(x, n):
+ """Periodic sinc function, also called the Dirichlet kernel.
+
+ The Dirichlet kernel is defined as::
+
+ diric(x, n) = sin(x * n/2) / (n * sin(x / 2)),
+
+ where `n` is a positive integer.
+
+ Parameters
+ ----------
+ x : array_like
+ Input data
+ n : int
+ Integer defining the periodicity.
+
+ Returns
+ -------
+ diric : ndarray
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy import special
+ >>> import matplotlib.pyplot as plt
+
+ >>> x = np.linspace(-8*np.pi, 8*np.pi, num=201)
+ >>> plt.figure(figsize=(8, 8));
+ >>> for idx, n in enumerate([2, 3, 4, 9]):
+ ... plt.subplot(2, 2, idx+1)
+ ... plt.plot(x, special.diric(x, n))
+ ... plt.title('diric, n={}'.format(n))
+ >>> plt.show()
+
+ The following example demonstrates that `diric` gives the magnitudes
+ (modulo the sign and scaling) of the Fourier coefficients of a
+ rectangular pulse.
+
+ Suppress output of values that are effectively 0:
+
+ >>> np.set_printoptions(suppress=True)
+
+ Create a signal `x` of length `m` with `k` ones:
+
+ >>> m = 8
+ >>> k = 3
+ >>> x = np.zeros(m)
+ >>> x[:k] = 1
+
+ Use the FFT to compute the Fourier transform of `x`, and
+ inspect the magnitudes of the coefficients:
+
+ >>> np.abs(np.fft.fft(x))
+ array([ 3. , 2.41421356, 1. , 0.41421356, 1. ,
+ 0.41421356, 1. , 2.41421356])
+
+ Now find the same values (up to sign) using `diric`. We multiply
+ by `k` to account for the different scaling conventions of
+ `numpy.fft.fft` and `diric`:
+
+ >>> theta = np.linspace(0, 2*np.pi, m, endpoint=False)
+ >>> k * special.diric(theta, k)
+ array([ 3. , 2.41421356, 1. , -0.41421356, -1. ,
+ -0.41421356, 1. , 2.41421356])
+ """
+ x, n = asarray(x), asarray(n)
+ n = asarray(n + (x-x))
+ x = asarray(x + (n-n))
+ if issubdtype(x.dtype, inexact):
+ ytype = x.dtype
+ else:
+ ytype = float
+ y = zeros(x.shape, ytype)
+
+ # empirical minval for 32, 64 or 128 bit float computations
+ # where sin(x/2) < minval, result is fixed at +1 or -1
+ if np.finfo(ytype).eps < 1e-18:
+ minval = 1e-11
+ elif np.finfo(ytype).eps < 1e-15:
+ minval = 1e-7
+ else:
+ minval = 1e-3
+
+ mask1 = (n <= 0) | (n != floor(n))
+ place(y, mask1, nan)
+
+ x = x / 2
+ denom = sin(x)
+ mask2 = (1-mask1) & (abs(denom) < minval)
+ xsub = extract(mask2, x)
+ nsub = extract(mask2, n)
+ zsub = xsub / pi
+ place(y, mask2, pow(-1, np.round(zsub)*(nsub-1)))
+
+ mask = (1-mask1) & (1-mask2)
+ xsub = extract(mask, x)
+ nsub = extract(mask, n)
+ dsub = extract(mask, denom)
+ place(y, mask, sin(nsub*xsub)/(nsub*dsub))
+ return y
+
+
+def jnjnp_zeros(nt):
+ """Compute zeros of integer-order Bessel functions Jn and Jn'.
+
+ Results are arranged in order of the magnitudes of the zeros.
+
+ Parameters
+ ----------
+ nt : int
+ Number (<=1200) of zeros to compute
+
+ Returns
+ -------
+ zo[l-1] : ndarray
+ Value of the lth zero of Jn(x) and Jn'(x). Of length `nt`.
+ n[l-1] : ndarray
+ Order of the Jn(x) or Jn'(x) associated with lth zero. Of length `nt`.
+ m[l-1] : ndarray
+ Serial number of the zeros of Jn(x) or Jn'(x) associated
+ with lth zero. Of length `nt`.
+ t[l-1] : ndarray
+ 0 if lth zero in zo is zero of Jn(x), 1 if it is a zero of Jn'(x). Of
+ length `nt`.
+
+ See Also
+ --------
+ jn_zeros, jnp_zeros : to get separated arrays of zeros.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt > 1200):
+ raise ValueError("Number must be integer <= 1200.")
+ nt = int(nt)
+ n, m, t, zo = _specfun.jdzo(nt)
+ return zo[1:nt+1], n[:nt], m[:nt], t[:nt]
+
+
+def jnyn_zeros(n, nt):
+ """Compute nt zeros of Bessel functions Jn(x), Jn'(x), Yn(x), and Yn'(x).
+
+ Returns 4 arrays of length `nt`, corresponding to the first `nt`
+ zeros of Jn(x), Jn'(x), Yn(x), and Yn'(x), respectively. The zeros
+ are returned in ascending order.
+
+ Parameters
+ ----------
+ n : int
+ Order of the Bessel functions
+ nt : int
+ Number (<=1200) of zeros to compute
+
+ Returns
+ -------
+ Jn : ndarray
+ First `nt` zeros of Jn
+ Jnp : ndarray
+ First `nt` zeros of Jn'
+ Yn : ndarray
+ First `nt` zeros of Yn
+ Ynp : ndarray
+ First `nt` zeros of Yn'
+
+ See Also
+ --------
+ jn_zeros, jnp_zeros, yn_zeros, ynp_zeros
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first three roots of :math:`J_1`, :math:`J_1'`,
+ :math:`Y_1` and :math:`Y_1'`.
+
+ >>> from scipy.special import jnyn_zeros
+ >>> jn_roots, jnp_roots, yn_roots, ynp_roots = jnyn_zeros(1, 3)
+ >>> jn_roots, yn_roots
+ (array([ 3.83170597, 7.01558667, 10.17346814]),
+ array([2.19714133, 5.42968104, 8.59600587]))
+
+ Plot :math:`J_1`, :math:`J_1'`, :math:`Y_1`, :math:`Y_1'` and their roots.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import jnyn_zeros, jvp, jn, yvp, yn
+ >>> jn_roots, jnp_roots, yn_roots, ynp_roots = jnyn_zeros(1, 3)
+ >>> fig, ax = plt.subplots()
+ >>> xmax= 11
+ >>> x = np.linspace(0, xmax)
+ >>> x[0] += 1e-15
+ >>> ax.plot(x, jn(1, x), label=r"$J_1$", c='r')
+ >>> ax.plot(x, jvp(1, x, 1), label=r"$J_1'$", c='b')
+ >>> ax.plot(x, yn(1, x), label=r"$Y_1$", c='y')
+ >>> ax.plot(x, yvp(1, x, 1), label=r"$Y_1'$", c='c')
+ >>> zeros = np.zeros((3, ))
+ >>> ax.scatter(jn_roots, zeros, s=30, c='r', zorder=5,
+ ... label=r"$J_1$ roots")
+ >>> ax.scatter(jnp_roots, zeros, s=30, c='b', zorder=5,
+ ... label=r"$J_1'$ roots")
+ >>> ax.scatter(yn_roots, zeros, s=30, c='y', zorder=5,
+ ... label=r"$Y_1$ roots")
+ >>> ax.scatter(ynp_roots, zeros, s=30, c='c', zorder=5,
+ ... label=r"$Y_1'$ roots")
+ >>> ax.hlines(0, 0, xmax, color='k')
+ >>> ax.set_ylim(-0.6, 0.6)
+ >>> ax.set_xlim(0, xmax)
+ >>> ax.legend(ncol=2, bbox_to_anchor=(1., 0.75))
+ >>> plt.tight_layout()
+ >>> plt.show()
+ """
+ if not (isscalar(nt) and isscalar(n)):
+ raise ValueError("Arguments must be scalars.")
+ if (floor(n) != n) or (floor(nt) != nt):
+ raise ValueError("Arguments must be integers.")
+ if (nt <= 0):
+ raise ValueError("nt > 0")
+ return _specfun.jyzo(abs(n), nt)
+
+
+def jn_zeros(n, nt):
+ r"""Compute zeros of integer-order Bessel functions Jn.
+
+ Compute `nt` zeros of the Bessel functions :math:`J_n(x)` on the
+ interval :math:`(0, \infty)`. The zeros are returned in ascending
+ order. Note that this interval excludes the zero at :math:`x = 0`
+ that exists for :math:`n > 0`.
+
+ Parameters
+ ----------
+ n : int
+ Order of Bessel function
+ nt : int
+ Number of zeros to return
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Bessel function.
+
+ See Also
+ --------
+ jv: Real-order Bessel functions of the first kind
+ jnp_zeros: Zeros of :math:`Jn'`
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first four positive roots of :math:`J_3`.
+
+ >>> from scipy.special import jn_zeros
+ >>> jn_zeros(3, 4)
+ array([ 6.3801619 , 9.76102313, 13.01520072, 16.22346616])
+
+ Plot :math:`J_3` and its first four positive roots. Note
+ that the root located at 0 is not returned by `jn_zeros`.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import jn, jn_zeros
+ >>> j3_roots = jn_zeros(3, 4)
+ >>> xmax = 18
+ >>> xmin = -1
+ >>> x = np.linspace(xmin, xmax, 500)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, jn(3, x), label=r'$J_3$')
+ >>> ax.scatter(j3_roots, np.zeros((4, )), s=30, c='r',
+ ... label=r"$J_3$_Zeros", zorder=5)
+ >>> ax.scatter(0, 0, s=30, c='k',
+ ... label=r"Root at 0", zorder=5)
+ >>> ax.hlines(0, 0, xmax, color='k')
+ >>> ax.set_xlim(xmin, xmax)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ return jnyn_zeros(n, nt)[0]
+
+
+def jnp_zeros(n, nt):
+ r"""Compute zeros of integer-order Bessel function derivatives Jn'.
+
+ Compute `nt` zeros of the functions :math:`J_n'(x)` on the
+ interval :math:`(0, \infty)`. The zeros are returned in ascending
+ order. Note that this interval excludes the zero at :math:`x = 0`
+ that exists for :math:`n > 1`.
+
+ Parameters
+ ----------
+ n : int
+ Order of Bessel function
+ nt : int
+ Number of zeros to return
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Bessel function.
+
+ See Also
+ --------
+ jvp: Derivatives of integer-order Bessel functions of the first kind
+ jv: Float-order Bessel functions of the first kind
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first four roots of :math:`J_2'`.
+
+ >>> from scipy.special import jnp_zeros
+ >>> jnp_zeros(2, 4)
+ array([ 3.05423693, 6.70613319, 9.96946782, 13.17037086])
+
+ As `jnp_zeros` yields the roots of :math:`J_n'`, it can be used to
+ compute the locations of the peaks of :math:`J_n`. Plot
+ :math:`J_2`, :math:`J_2'` and the locations of the roots of :math:`J_2'`.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import jn, jnp_zeros, jvp
+ >>> j2_roots = jnp_zeros(2, 4)
+ >>> xmax = 15
+ >>> x = np.linspace(0, xmax, 500)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, jn(2, x), label=r'$J_2$')
+ >>> ax.plot(x, jvp(2, x, 1), label=r"$J_2'$")
+ >>> ax.hlines(0, 0, xmax, color='k')
+ >>> ax.scatter(j2_roots, np.zeros((4, )), s=30, c='r',
+ ... label=r"Roots of $J_2'$", zorder=5)
+ >>> ax.set_ylim(-0.4, 0.8)
+ >>> ax.set_xlim(0, xmax)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ return jnyn_zeros(n, nt)[1]
+
+
+def yn_zeros(n, nt):
+ r"""Compute zeros of integer-order Bessel function Yn(x).
+
+ Compute `nt` zeros of the functions :math:`Y_n(x)` on the interval
+ :math:`(0, \infty)`. The zeros are returned in ascending order.
+
+ Parameters
+ ----------
+ n : int
+ Order of Bessel function
+ nt : int
+ Number of zeros to return
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Bessel function.
+
+ See Also
+ --------
+ yn: Bessel function of the second kind for integer order
+ yv: Bessel function of the second kind for real order
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first four roots of :math:`Y_2`.
+
+ >>> from scipy.special import yn_zeros
+ >>> yn_zeros(2, 4)
+ array([ 3.38424177, 6.79380751, 10.02347798, 13.20998671])
+
+ Plot :math:`Y_2` and its first four roots.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import yn, yn_zeros
+ >>> xmin = 2
+ >>> xmax = 15
+ >>> x = np.linspace(xmin, xmax, 500)
+ >>> fig, ax = plt.subplots()
+ >>> ax.hlines(0, xmin, xmax, color='k')
+ >>> ax.plot(x, yn(2, x), label=r'$Y_2$')
+ >>> ax.scatter(yn_zeros(2, 4), np.zeros((4, )), s=30, c='r',
+ ... label='Roots', zorder=5)
+ >>> ax.set_ylim(-0.4, 0.4)
+ >>> ax.set_xlim(xmin, xmax)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ return jnyn_zeros(n, nt)[2]
+
+
+def ynp_zeros(n, nt):
+ r"""Compute zeros of integer-order Bessel function derivatives Yn'(x).
+
+ Compute `nt` zeros of the functions :math:`Y_n'(x)` on the
+ interval :math:`(0, \infty)`. The zeros are returned in ascending
+ order.
+
+ Parameters
+ ----------
+ n : int
+ Order of Bessel function
+ nt : int
+ Number of zeros to return
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Bessel derivative function.
+
+
+ See Also
+ --------
+ yvp
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first four roots of the first derivative of the
+ Bessel function of second kind for order 0 :math:`Y_0'`.
+
+ >>> from scipy.special import ynp_zeros
+ >>> ynp_zeros(0, 4)
+ array([ 2.19714133, 5.42968104, 8.59600587, 11.74915483])
+
+ Plot :math:`Y_0`, :math:`Y_0'` and confirm visually that the roots of
+ :math:`Y_0'` are located at local extrema of :math:`Y_0`.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import yn, ynp_zeros, yvp
+ >>> zeros = ynp_zeros(0, 4)
+ >>> xmax = 13
+ >>> x = np.linspace(0, xmax, 500)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, yn(0, x), label=r'$Y_0$')
+ >>> ax.plot(x, yvp(0, x, 1), label=r"$Y_0'$")
+ >>> ax.scatter(zeros, np.zeros((4, )), s=30, c='r',
+ ... label=r"Roots of $Y_0'$", zorder=5)
+ >>> for root in zeros:
+ ... y0_extremum = yn(0, root)
+ ... lower = min(0, y0_extremum)
+ ... upper = max(0, y0_extremum)
+ ... ax.vlines(root, lower, upper, color='r')
+ >>> ax.hlines(0, 0, xmax, color='k')
+ >>> ax.set_ylim(-0.6, 0.6)
+ >>> ax.set_xlim(0, xmax)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ return jnyn_zeros(n, nt)[3]
+
+
+def y0_zeros(nt, complex=False):
+ """Compute nt zeros of Bessel function Y0(z), and derivative at each zero.
+
+ The derivatives are given by Y0'(z0) = -Y1(z0) at each zero z0.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to return
+ complex : bool, default False
+ Set to False to return only the real zeros; set to True to return only
+ the complex zeros with negative real part and positive imaginary part.
+ Note that the complex conjugates of the latter are also zeros of the
+ function, but are not returned by this routine.
+
+ Returns
+ -------
+ z0n : ndarray
+ Location of nth zero of Y0(z)
+ y0pz0n : ndarray
+ Value of derivative Y0'(z0) for nth zero
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first 4 real roots and the derivatives at the roots of
+ :math:`Y_0`:
+
+ >>> import numpy as np
+ >>> from scipy.special import y0_zeros
+ >>> zeros, grads = y0_zeros(4)
+ >>> with np.printoptions(precision=5):
+ ... print(f"Roots: {zeros}")
+ ... print(f"Gradients: {grads}")
+ Roots: [ 0.89358+0.j 3.95768+0.j 7.08605+0.j 10.22235+0.j]
+ Gradients: [-0.87942+0.j 0.40254+0.j -0.3001 +0.j 0.2497 +0.j]
+
+ Plot the real part of :math:`Y_0` and the first four computed roots.
+
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import y0
+ >>> xmin = 0
+ >>> xmax = 11
+ >>> x = np.linspace(xmin, xmax, 500)
+ >>> fig, ax = plt.subplots()
+ >>> ax.hlines(0, xmin, xmax, color='k')
+ >>> ax.plot(x, y0(x), label=r'$Y_0$')
+ >>> zeros, grads = y0_zeros(4)
+ >>> ax.scatter(zeros.real, np.zeros((4, )), s=30, c='r',
+ ... label=r'$Y_0$_zeros', zorder=5)
+ >>> ax.set_ylim(-0.5, 0.6)
+ >>> ax.set_xlim(xmin, xmax)
+ >>> plt.legend(ncol=2)
+ >>> plt.show()
+
+ Compute the first 4 complex roots and the derivatives at the roots of
+ :math:`Y_0` by setting ``complex=True``:
+
+ >>> y0_zeros(4, True)
+ (array([ -2.40301663+0.53988231j, -5.5198767 +0.54718001j,
+ -8.6536724 +0.54841207j, -11.79151203+0.54881912j]),
+ array([ 0.10074769-0.88196771j, -0.02924642+0.5871695j ,
+ 0.01490806-0.46945875j, -0.00937368+0.40230454j]))
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("Arguments must be scalar positive integer.")
+ kf = 0
+ kc = not complex
+ return _specfun.cyzo(nt, kf, kc)
+
+
+def y1_zeros(nt, complex=False):
+ """Compute nt zeros of Bessel function Y1(z), and derivative at each zero.
+
+ The derivatives are given by Y1'(z1) = Y0(z1) at each zero z1.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to return
+ complex : bool, default False
+ Set to False to return only the real zeros; set to True to return only
+ the complex zeros with negative real part and positive imaginary part.
+ Note that the complex conjugates of the latter are also zeros of the
+ function, but are not returned by this routine.
+
+ Returns
+ -------
+ z1n : ndarray
+ Location of nth zero of Y1(z)
+ y1pz1n : ndarray
+ Value of derivative Y1'(z1) for nth zero
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first 4 real roots and the derivatives at the roots of
+ :math:`Y_1`:
+
+ >>> import numpy as np
+ >>> from scipy.special import y1_zeros
+ >>> zeros, grads = y1_zeros(4)
+ >>> with np.printoptions(precision=5):
+ ... print(f"Roots: {zeros}")
+ ... print(f"Gradients: {grads}")
+ Roots: [ 2.19714+0.j 5.42968+0.j 8.59601+0.j 11.74915+0.j]
+ Gradients: [ 0.52079+0.j -0.34032+0.j 0.27146+0.j -0.23246+0.j]
+
+ Extract the real parts:
+
+ >>> realzeros = zeros.real
+ >>> realzeros
+ array([ 2.19714133, 5.42968104, 8.59600587, 11.74915483])
+
+ Plot :math:`Y_1` and the first four computed roots.
+
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import y1
+ >>> xmin = 0
+ >>> xmax = 13
+ >>> x = np.linspace(xmin, xmax, 500)
+ >>> zeros, grads = y1_zeros(4)
+ >>> fig, ax = plt.subplots()
+ >>> ax.hlines(0, xmin, xmax, color='k')
+ >>> ax.plot(x, y1(x), label=r'$Y_1$')
+ >>> ax.scatter(zeros.real, np.zeros((4, )), s=30, c='r',
+ ... label=r'$Y_1$_zeros', zorder=5)
+ >>> ax.set_ylim(-0.5, 0.5)
+ >>> ax.set_xlim(xmin, xmax)
+ >>> plt.legend()
+ >>> plt.show()
+
+ Compute the first 4 complex roots and the derivatives at the roots of
+ :math:`Y_1` by setting ``complex=True``:
+
+ >>> y1_zeros(4, True)
+ (array([ -0.50274327+0.78624371j, -3.83353519+0.56235654j,
+ -7.01590368+0.55339305j, -10.17357383+0.55127339j]),
+ array([-0.45952768+1.31710194j, 0.04830191-0.69251288j,
+ -0.02012695+0.51864253j, 0.011614 -0.43203296j]))
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("Arguments must be scalar positive integer.")
+ kf = 1
+ kc = not complex
+ return _specfun.cyzo(nt, kf, kc)
+
+
+def y1p_zeros(nt, complex=False):
+ """Compute nt zeros of Bessel derivative Y1'(z), and value at each zero.
+
+ The values are given by Y1(z1) at each z1 where Y1'(z1)=0.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to return
+ complex : bool, default False
+ Set to False to return only the real zeros; set to True to return only
+ the complex zeros with negative real part and positive imaginary part.
+ Note that the complex conjugates of the latter are also zeros of the
+ function, but are not returned by this routine.
+
+ Returns
+ -------
+ z1pn : ndarray
+ Location of nth zero of Y1'(z)
+ y1z1pn : ndarray
+ Value of derivative Y1(z1) for nth zero
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ Compute the first four roots of :math:`Y_1'` and the values of
+ :math:`Y_1` at these roots.
+
+ >>> import numpy as np
+ >>> from scipy.special import y1p_zeros
+ >>> y1grad_roots, y1_values = y1p_zeros(4)
+ >>> with np.printoptions(precision=5):
+ ... print(f"Y1' Roots: {y1grad_roots.real}")
+ ... print(f"Y1 values: {y1_values.real}")
+ Y1' Roots: [ 3.68302 6.9415 10.1234 13.28576]
+ Y1 values: [ 0.41673 -0.30317 0.25091 -0.21897]
+
+ `y1p_zeros` can be used to calculate the extremal points of :math:`Y_1`
+ directly. Here we plot :math:`Y_1` and the first four extrema.
+
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.special import y1, yvp
+ >>> y1_roots, y1_values_at_roots = y1p_zeros(4)
+ >>> real_roots = y1_roots.real
+ >>> xmax = 15
+ >>> x = np.linspace(0, xmax, 500)
+ >>> x[0] += 1e-15
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, y1(x), label=r'$Y_1$')
+ >>> ax.plot(x, yvp(1, x, 1), label=r"$Y_1'$")
+ >>> ax.scatter(real_roots, np.zeros((4, )), s=30, c='r',
+ ... label=r"Roots of $Y_1'$", zorder=5)
+ >>> ax.scatter(real_roots, y1_values_at_roots.real, s=30, c='k',
+ ... label=r"Extrema of $Y_1$", zorder=5)
+ >>> ax.hlines(0, 0, xmax, color='k')
+ >>> ax.set_ylim(-0.5, 0.5)
+ >>> ax.set_xlim(0, xmax)
+ >>> ax.legend(ncol=2, bbox_to_anchor=(1., 0.75))
+ >>> plt.tight_layout()
+ >>> plt.show()
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("Arguments must be scalar positive integer.")
+ kf = 2
+ kc = not complex
+ return _specfun.cyzo(nt, kf, kc)
+
+
+def _bessel_diff_formula(v, z, n, L, phase):
+ # from AMS55.
+ # L(v, z) = J(v, z), Y(v, z), H1(v, z), H2(v, z), phase = -1
+ # L(v, z) = I(v, z) or exp(v*pi*i)K(v, z), phase = 1
+ # For K, you can pull out the exp((v-k)*pi*i) into the caller
+ v = asarray(v)
+ p = 1.0
+ s = L(v-n, z)
+ for i in range(1, n+1):
+ p = phase * (p * (n-i+1)) / i # = choose(k, i)
+ s += p*L(v-n + i*2, z)
+ return s / (2.**n)
+
+
+def jvp(v, z, n=1):
+ """Compute derivatives of Bessel functions of the first kind.
+
+ Compute the nth derivative of the Bessel function `Jv` with
+ respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like or float
+ Order of Bessel function
+ z : complex
+ Argument at which to evaluate the derivative; can be real or
+ complex.
+ n : int, default 1
+ Order of derivative. For 0 returns the Bessel function `jv` itself.
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the derivative of the Bessel function.
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.6.7 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.6.E7
+
+ Examples
+ --------
+
+ Compute the Bessel function of the first kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import jvp
+ >>> jvp(0, 1, 0), jvp(0, 1, 1), jvp(0, 1, 2)
+ (0.7651976865579666, -0.44005058574493355, -0.3251471008130331)
+
+ Compute the first derivative of the Bessel function of the first
+ kind for several orders at 1 by providing an array for `v`.
+
+ >>> jvp([0, 1, 2], 1, 1)
+ array([-0.44005059, 0.3251471 , 0.21024362])
+
+ Compute the first derivative of the Bessel function of the first
+ kind of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0., 1.5, 3.])
+ >>> jvp(0, points, 1)
+ array([-0. , -0.55793651, -0.33905896])
+
+ Plot the Bessel function of the first kind of order 1 and its
+ first three derivatives.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(-10, 10, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, jvp(1, x, 0), label=r"$J_1$")
+ >>> ax.plot(x, jvp(1, x, 1), label=r"$J_1'$")
+ >>> ax.plot(x, jvp(1, x, 2), label=r"$J_1''$")
+ >>> ax.plot(x, jvp(1, x, 3), label=r"$J_1'''$")
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return jv(v, z)
+ else:
+ return _bessel_diff_formula(v, z, n, jv, -1)
+
+
+def yvp(v, z, n=1):
+ """Compute derivatives of Bessel functions of the second kind.
+
+ Compute the nth derivative of the Bessel function `Yv` with
+ respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like of float
+ Order of Bessel function
+ z : complex
+ Argument at which to evaluate the derivative
+ n : int, default 1
+ Order of derivative. For 0 returns the BEssel function `yv`
+
+ Returns
+ -------
+ scalar or ndarray
+ nth derivative of the Bessel function.
+
+ See Also
+ --------
+ yv : Bessel functions of the second kind
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.6.7 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.6.E7
+
+ Examples
+ --------
+ Compute the Bessel function of the second kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import yvp
+ >>> yvp(0, 1, 0), yvp(0, 1, 1), yvp(0, 1, 2)
+ (0.088256964215677, 0.7812128213002889, -0.8694697855159659)
+
+ Compute the first derivative of the Bessel function of the second
+ kind for several orders at 1 by providing an array for `v`.
+
+ >>> yvp([0, 1, 2], 1, 1)
+ array([0.78121282, 0.86946979, 2.52015239])
+
+ Compute the first derivative of the Bessel function of the
+ second kind of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0.5, 1.5, 3.])
+ >>> yvp(0, points, 1)
+ array([ 1.47147239, 0.41230863, -0.32467442])
+
+ Plot the Bessel function of the second kind of order 1 and its
+ first three derivatives.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(0, 5, 1000)
+ >>> x[0] += 1e-15
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, yvp(1, x, 0), label=r"$Y_1$")
+ >>> ax.plot(x, yvp(1, x, 1), label=r"$Y_1'$")
+ >>> ax.plot(x, yvp(1, x, 2), label=r"$Y_1''$")
+ >>> ax.plot(x, yvp(1, x, 3), label=r"$Y_1'''$")
+ >>> ax.set_ylim(-10, 10)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return yv(v, z)
+ else:
+ return _bessel_diff_formula(v, z, n, yv, -1)
+
+
+def kvp(v, z, n=1):
+ """Compute derivatives of real-order modified Bessel function Kv(z)
+
+ Kv(z) is the modified Bessel function of the second kind.
+ Derivative is calculated with respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like of float
+ Order of Bessel function
+ z : array_like of complex
+ Argument at which to evaluate the derivative
+ n : int, default 1
+ Order of derivative. For 0 returns the Bessel function `kv` itself.
+
+ Returns
+ -------
+ out : ndarray
+ The results
+
+ See Also
+ --------
+ kv
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.29.5 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 6.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.29.E5
+
+ Examples
+ --------
+ Compute the modified bessel function of the second kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import kvp
+ >>> kvp(0, 1, 0), kvp(0, 1, 1), kvp(0, 1, 2)
+ (0.42102443824070834, -0.6019072301972346, 1.0229316684379428)
+
+ Compute the first derivative of the modified Bessel function of the second
+ kind for several orders at 1 by providing an array for `v`.
+
+ >>> kvp([0, 1, 2], 1, 1)
+ array([-0.60190723, -1.02293167, -3.85158503])
+
+ Compute the first derivative of the modified Bessel function of the
+ second kind of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0.5, 1.5, 3.])
+ >>> kvp(0, points, 1)
+ array([-1.65644112, -0.2773878 , -0.04015643])
+
+ Plot the modified bessel function of the second kind and its
+ first three derivatives.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(0, 5, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, kvp(1, x, 0), label=r"$K_1$")
+ >>> ax.plot(x, kvp(1, x, 1), label=r"$K_1'$")
+ >>> ax.plot(x, kvp(1, x, 2), label=r"$K_1''$")
+ >>> ax.plot(x, kvp(1, x, 3), label=r"$K_1'''$")
+ >>> ax.set_ylim(-2.5, 2.5)
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return kv(v, z)
+ else:
+ return (-1)**n * _bessel_diff_formula(v, z, n, kv, 1)
+
+
+def ivp(v, z, n=1):
+ """Compute derivatives of modified Bessel functions of the first kind.
+
+ Compute the nth derivative of the modified Bessel function `Iv`
+ with respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like or float
+ Order of Bessel function
+ z : array_like
+ Argument at which to evaluate the derivative; can be real or
+ complex.
+ n : int, default 1
+ Order of derivative. For 0, returns the Bessel function `iv` itself.
+
+ Returns
+ -------
+ scalar or ndarray
+ nth derivative of the modified Bessel function.
+
+ See Also
+ --------
+ iv
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.29.5 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 6.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.29.E5
+
+ Examples
+ --------
+ Compute the modified Bessel function of the first kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import ivp
+ >>> ivp(0, 1, 0), ivp(0, 1, 1), ivp(0, 1, 2)
+ (1.2660658777520084, 0.565159103992485, 0.7009067737595233)
+
+ Compute the first derivative of the modified Bessel function of the first
+ kind for several orders at 1 by providing an array for `v`.
+
+ >>> ivp([0, 1, 2], 1, 1)
+ array([0.5651591 , 0.70090677, 0.29366376])
+
+ Compute the first derivative of the modified Bessel function of the
+ first kind of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0., 1.5, 3.])
+ >>> ivp(0, points, 1)
+ array([0. , 0.98166643, 3.95337022])
+
+ Plot the modified Bessel function of the first kind of order 1 and its
+ first three derivatives.
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.linspace(-5, 5, 1000)
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, ivp(1, x, 0), label=r"$I_1$")
+ >>> ax.plot(x, ivp(1, x, 1), label=r"$I_1'$")
+ >>> ax.plot(x, ivp(1, x, 2), label=r"$I_1''$")
+ >>> ax.plot(x, ivp(1, x, 3), label=r"$I_1'''$")
+ >>> plt.legend()
+ >>> plt.show()
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return iv(v, z)
+ else:
+ return _bessel_diff_formula(v, z, n, iv, 1)
+
+
+def h1vp(v, z, n=1):
+ """Compute derivatives of Hankel function H1v(z) with respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like
+ Order of Hankel function
+ z : array_like
+ Argument at which to evaluate the derivative. Can be real or
+ complex.
+ n : int, default 1
+ Order of derivative. For 0 returns the Hankel function `hankel1` itself.
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the derivative of the Hankel function.
+
+ See Also
+ --------
+ hankel1
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.6.7 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.6.E7
+
+ Examples
+ --------
+ Compute the Hankel function of the first kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import h1vp
+ >>> h1vp(0, 1, 0), h1vp(0, 1, 1), h1vp(0, 1, 2)
+ ((0.7651976865579664+0.088256964215677j),
+ (-0.44005058574493355+0.7812128213002889j),
+ (-0.3251471008130329-0.8694697855159659j))
+
+ Compute the first derivative of the Hankel function of the first kind
+ for several orders at 1 by providing an array for `v`.
+
+ >>> h1vp([0, 1, 2], 1, 1)
+ array([-0.44005059+0.78121282j, 0.3251471 +0.86946979j,
+ 0.21024362+2.52015239j])
+
+ Compute the first derivative of the Hankel function of the first kind
+ of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0.5, 1.5, 3.])
+ >>> h1vp(0, points, 1)
+ array([-0.24226846+1.47147239j, -0.55793651+0.41230863j,
+ -0.33905896-0.32467442j])
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return hankel1(v, z)
+ else:
+ return _bessel_diff_formula(v, z, n, hankel1, -1)
+
+
+def h2vp(v, z, n=1):
+ """Compute derivatives of Hankel function H2v(z) with respect to `z`.
+
+ Parameters
+ ----------
+ v : array_like
+ Order of Hankel function
+ z : array_like
+ Argument at which to evaluate the derivative. Can be real or
+ complex.
+ n : int, default 1
+ Order of derivative. For 0 returns the Hankel function `hankel2` itself.
+
+ Returns
+ -------
+ scalar or ndarray
+ Values of the derivative of the Hankel function.
+
+ See Also
+ --------
+ hankel2
+
+ Notes
+ -----
+ The derivative is computed using the relation DLFM 10.6.7 [2]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 5.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.6.E7
+
+ Examples
+ --------
+ Compute the Hankel function of the second kind of order 0 and
+ its first two derivatives at 1.
+
+ >>> from scipy.special import h2vp
+ >>> h2vp(0, 1, 0), h2vp(0, 1, 1), h2vp(0, 1, 2)
+ ((0.7651976865579664-0.088256964215677j),
+ (-0.44005058574493355-0.7812128213002889j),
+ (-0.3251471008130329+0.8694697855159659j))
+
+ Compute the first derivative of the Hankel function of the second kind
+ for several orders at 1 by providing an array for `v`.
+
+ >>> h2vp([0, 1, 2], 1, 1)
+ array([-0.44005059-0.78121282j, 0.3251471 -0.86946979j,
+ 0.21024362-2.52015239j])
+
+ Compute the first derivative of the Hankel function of the second kind
+ of order 0 at several points by providing an array for `z`.
+
+ >>> import numpy as np
+ >>> points = np.array([0.5, 1.5, 3.])
+ >>> h2vp(0, points, 1)
+ array([-0.24226846-1.47147239j, -0.55793651-0.41230863j,
+ -0.33905896+0.32467442j])
+ """
+ n = _nonneg_int_or_fail(n, 'n')
+ if n == 0:
+ return hankel2(v, z)
+ else:
+ return _bessel_diff_formula(v, z, n, hankel2, -1)
+
+
+def riccati_jn(n, x):
+ r"""Compute Riccati-Bessel function of the first kind and its derivative.
+
+ The Riccati-Bessel function of the first kind is defined as :math:`x
+ j_n(x)`, where :math:`j_n` is the spherical Bessel function of the first
+ kind of order :math:`n`.
+
+ This function computes the value and first derivative of the
+ Riccati-Bessel function for all orders up to and including `n`.
+
+ Parameters
+ ----------
+ n : int
+ Maximum order of function to compute
+ x : float
+ Argument at which to evaluate
+
+ Returns
+ -------
+ jn : ndarray
+ Value of j0(x), ..., jn(x)
+ jnp : ndarray
+ First derivative j0'(x), ..., jn'(x)
+
+ Notes
+ -----
+ The computation is carried out via backward recurrence, using the
+ relation DLMF 10.51.1 [2]_.
+
+ Wrapper for a Fortran routine created by Shanjie Zhang and Jianming
+ Jin [1]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.51.E1
+
+ """
+ if not (isscalar(n) and isscalar(x)):
+ raise ValueError("arguments must be scalars.")
+ n = _nonneg_int_or_fail(n, 'n', strict=False)
+ if (n == 0):
+ n1 = 1
+ else:
+ n1 = n
+
+ jn = np.empty((n1 + 1,), dtype=np.float64)
+ jnp = np.empty_like(jn)
+
+ _rctj(x, out=(jn, jnp))
+ return jn[:(n+1)], jnp[:(n+1)]
+
+
+def riccati_yn(n, x):
+ """Compute Riccati-Bessel function of the second kind and its derivative.
+
+ The Riccati-Bessel function of the second kind is defined here as :math:`+x
+ y_n(x)`, where :math:`y_n` is the spherical Bessel function of the second
+ kind of order :math:`n`. *Note that this is in contrast to a common convention
+ that includes a minus sign in the definition.*
+
+ This function computes the value and first derivative of the function for
+ all orders up to and including `n`.
+
+ Parameters
+ ----------
+ n : int
+ Maximum order of function to compute
+ x : float
+ Argument at which to evaluate
+
+ Returns
+ -------
+ yn : ndarray
+ Value of y0(x), ..., yn(x)
+ ynp : ndarray
+ First derivative y0'(x), ..., yn'(x)
+
+ Notes
+ -----
+ The computation is carried out via ascending recurrence, using the
+ relation DLMF 10.51.1 [2]_.
+
+ Wrapper for a Fortran routine created by Shanjie Zhang and Jianming
+ Jin [1]_.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ .. [2] NIST Digital Library of Mathematical Functions.
+ https://dlmf.nist.gov/10.51.E1
+
+ """
+ if not (isscalar(n) and isscalar(x)):
+ raise ValueError("arguments must be scalars.")
+ n = _nonneg_int_or_fail(n, 'n', strict=False)
+ if (n == 0):
+ n1 = 1
+ else:
+ n1 = n
+
+ yn = np.empty((n1 + 1,), dtype=np.float64)
+ ynp = np.empty_like(yn)
+ _rcty(x, out=(yn, ynp))
+
+ return yn[:(n+1)], ynp[:(n+1)]
+
+
+def erf_zeros(nt):
+ """Compute the first nt zero in the first quadrant, ordered by absolute value.
+
+ Zeros in the other quadrants can be obtained by using the symmetries
+ erf(-z) = erf(z) and erf(conj(z)) = conj(erf(z)).
+
+
+ Parameters
+ ----------
+ nt : int
+ The number of zeros to compute
+
+ Returns
+ -------
+ The locations of the zeros of erf : ndarray (complex)
+ Complex values at which zeros of erf(z)
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> special.erf_zeros(1)
+ array([1.45061616+1.880943j])
+
+ Check that erf is (close to) zero for the value returned by erf_zeros
+
+ >>> special.erf(special.erf_zeros(1))
+ array([4.95159469e-14-1.16407394e-16j])
+
+ """
+ if (floor(nt) != nt) or (nt <= 0) or not isscalar(nt):
+ raise ValueError("Argument must be positive scalar integer.")
+ return _specfun.cerzo(nt)
+
+
+def fresnelc_zeros(nt):
+ """Compute nt complex zeros of cosine Fresnel integral C(z).
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute
+
+ Returns
+ -------
+ fresnelc_zeros: ndarray
+ Zeros of the cosine Fresnel integral
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if (floor(nt) != nt) or (nt <= 0) or not isscalar(nt):
+ raise ValueError("Argument must be positive scalar integer.")
+ return _specfun.fcszo(1, nt)
+
+
+def fresnels_zeros(nt):
+ """Compute nt complex zeros of sine Fresnel integral S(z).
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute
+
+ Returns
+ -------
+ fresnels_zeros: ndarray
+ Zeros of the sine Fresnel integral
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if (floor(nt) != nt) or (nt <= 0) or not isscalar(nt):
+ raise ValueError("Argument must be positive scalar integer.")
+ return _specfun.fcszo(2, nt)
+
+
+def fresnel_zeros(nt):
+ """Compute nt complex zeros of sine and cosine Fresnel integrals S(z) and C(z).
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute
+
+ Returns
+ -------
+ zeros_sine: ndarray
+ Zeros of the sine Fresnel integral
+ zeros_cosine : ndarray
+ Zeros of the cosine Fresnel integral
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if (floor(nt) != nt) or (nt <= 0) or not isscalar(nt):
+ raise ValueError("Argument must be positive scalar integer.")
+ return _specfun.fcszo(2, nt), _specfun.fcszo(1, nt)
+
+
+def assoc_laguerre(x, n, k=0.0):
+ """Compute the generalized (associated) Laguerre polynomial of degree n and order k.
+
+ The polynomial :math:`L^{(k)}_n(x)` is orthogonal over ``[0, inf)``,
+ with weighting function ``exp(-x) * x**k`` with ``k > -1``.
+
+ Parameters
+ ----------
+ x : float or ndarray
+ Points where to evaluate the Laguerre polynomial
+ n : int
+ Degree of the Laguerre polynomial
+ k : int
+ Order of the Laguerre polynomial
+
+ Returns
+ -------
+ assoc_laguerre: float or ndarray
+ Associated laguerre polynomial values
+
+ Notes
+ -----
+ `assoc_laguerre` is a simple wrapper around `eval_genlaguerre`, with
+ reversed argument order ``(x, n, k=0.0) --> (n, k, x)``.
+
+ """
+ return _ufuncs.eval_genlaguerre(n, k, x)
+
+
+digamma = psi
+
+
+def polygamma(n, x):
+ r"""Polygamma functions.
+
+ Defined as :math:`\psi^{(n)}(x)` where :math:`\psi` is the
+ `digamma` function. See [dlmf]_ for details.
+
+ Parameters
+ ----------
+ n : array_like
+ The order of the derivative of the digamma function; must be
+ integral
+ x : array_like
+ Real valued input
+
+ Returns
+ -------
+ ndarray
+ Function results
+
+ See Also
+ --------
+ digamma
+
+ References
+ ----------
+ .. [dlmf] NIST, Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/5.15
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> x = [2, 3, 25.5]
+ >>> special.polygamma(1, x)
+ array([ 0.64493407, 0.39493407, 0.03999467])
+ >>> special.polygamma(0, x) == special.psi(x)
+ array([ True, True, True], dtype=bool)
+
+ """
+ n, x = asarray(n), asarray(x)
+ fac2 = (-1.0)**(n+1) * gamma(n+1.0) * zeta(n+1, x)
+ return where(n == 0, psi(x), fac2)
+
+
+def mathieu_even_coef(m, q):
+ r"""Fourier coefficients for even Mathieu and modified Mathieu functions.
+
+ The Fourier series of the even solutions of the Mathieu differential
+ equation are of the form
+
+ .. math:: \mathrm{ce}_{2n}(z, q) = \sum_{k=0}^{\infty} A_{(2n)}^{(2k)} \cos 2kz
+
+ .. math:: \mathrm{ce}_{2n+1}(z, q) =
+ \sum_{k=0}^{\infty} A_{(2n+1)}^{(2k+1)} \cos (2k+1)z
+
+ This function returns the coefficients :math:`A_{(2n)}^{(2k)}` for even
+ input m=2n, and the coefficients :math:`A_{(2n+1)}^{(2k+1)}` for odd input
+ m=2n+1.
+
+ Parameters
+ ----------
+ m : int
+ Order of Mathieu functions. Must be non-negative.
+ q : float (>=0)
+ Parameter of Mathieu functions. Must be non-negative.
+
+ Returns
+ -------
+ Ak : ndarray
+ Even or odd Fourier coefficients, corresponding to even or odd m.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ .. [2] NIST Digital Library of Mathematical Functions
+ https://dlmf.nist.gov/28.4#i
+
+ """
+ if not (isscalar(m) and isscalar(q)):
+ raise ValueError("m and q must be scalars.")
+ if (q < 0):
+ raise ValueError("q >=0")
+ if (m != floor(m)) or (m < 0):
+ raise ValueError("m must be an integer >=0.")
+
+ if (q <= 1):
+ qm = 7.5 + 56.1*sqrt(q) - 134.7*q + 90.7*sqrt(q)*q
+ else:
+ qm = 17.0 + 3.1*sqrt(q) - .126*q + .0037*sqrt(q)*q
+ km = int(qm + 0.5*m)
+ if km > 251:
+ warnings.warn("Too many predicted coefficients.", RuntimeWarning, stacklevel=2)
+ kd = 1
+ m = int(floor(m))
+ if m % 2:
+ kd = 2
+
+ a = mathieu_a(m, q)
+ fc = _specfun.fcoef(kd, m, q, a)
+ return fc[:km]
+
+
+def mathieu_odd_coef(m, q):
+ r"""Fourier coefficients for odd Mathieu and modified Mathieu functions.
+
+ The Fourier series of the odd solutions of the Mathieu differential
+ equation are of the form
+
+ .. math:: \mathrm{se}_{2n+1}(z, q) =
+ \sum_{k=0}^{\infty} B_{(2n+1)}^{(2k+1)} \sin (2k+1)z
+
+ .. math:: \mathrm{se}_{2n+2}(z, q) =
+ \sum_{k=0}^{\infty} B_{(2n+2)}^{(2k+2)} \sin (2k+2)z
+
+ This function returns the coefficients :math:`B_{(2n+2)}^{(2k+2)}` for even
+ input m=2n+2, and the coefficients :math:`B_{(2n+1)}^{(2k+1)}` for odd
+ input m=2n+1.
+
+ Parameters
+ ----------
+ m : int
+ Order of Mathieu functions. Must be non-negative.
+ q : float (>=0)
+ Parameter of Mathieu functions. Must be non-negative.
+
+ Returns
+ -------
+ Bk : ndarray
+ Even or odd Fourier coefficients, corresponding to even or odd m.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(m) and isscalar(q)):
+ raise ValueError("m and q must be scalars.")
+ if (q < 0):
+ raise ValueError("q >=0")
+ if (m != floor(m)) or (m <= 0):
+ raise ValueError("m must be an integer > 0")
+
+ if (q <= 1):
+ qm = 7.5 + 56.1*sqrt(q) - 134.7*q + 90.7*sqrt(q)*q
+ else:
+ qm = 17.0 + 3.1*sqrt(q) - .126*q + .0037*sqrt(q)*q
+ km = int(qm + 0.5*m)
+ if km > 251:
+ warnings.warn("Too many predicted coefficients.", RuntimeWarning, stacklevel=2)
+ kd = 4
+ m = int(floor(m))
+ if m % 2:
+ kd = 3
+
+ b = mathieu_b(m, q)
+ fc = _specfun.fcoef(kd, m, q, b)
+ return fc[:km]
+
+
+def lqmn(m, n, z):
+ """Sequence of associated Legendre functions of the second kind.
+
+ Computes the associated Legendre function of the second kind of order m and
+ degree n, ``Qmn(z)`` = :math:`Q_n^m(z)`, and its derivative, ``Qmn'(z)``.
+ Returns two arrays of size ``(m+1, n+1)`` containing ``Qmn(z)`` and
+ ``Qmn'(z)`` for all orders from ``0..m`` and degrees from ``0..n``.
+
+ Parameters
+ ----------
+ m : int
+ ``|m| <= n``; the order of the Legendre function.
+ n : int
+ where ``n >= 0``; the degree of the Legendre function. Often
+ called ``l`` (lower case L) in descriptions of the associated
+ Legendre function
+ z : array_like, complex
+ Input value.
+
+ Returns
+ -------
+ Qmn_z : (m+1, n+1) array
+ Values for all orders 0..m and degrees 0..n
+ Qmn_d_z : (m+1, n+1) array
+ Derivatives for all orders 0..m and degrees 0..n
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(m) or (m < 0):
+ raise ValueError("m must be a non-negative integer.")
+ if not isscalar(n) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+
+ m, n = int(m), int(n) # Convert to int to maintain backwards compatibility.
+ # Ensure neither m nor n == 0
+ mm = max(1, m)
+ nn = max(1, n)
+
+ z = np.asarray(z)
+ if (not np.issubdtype(z.dtype, np.inexact)):
+ z = z.astype(np.float64)
+
+ if np.iscomplexobj(z):
+ q = np.empty((mm + 1, nn + 1) + z.shape, dtype=np.complex128)
+ else:
+ q = np.empty((mm + 1, nn + 1) + z.shape, dtype=np.float64)
+ qd = np.empty_like(q)
+ if (z.ndim == 0):
+ _lqmn(z, out=(q, qd))
+ else:
+ # new axes must be last for the ufunc
+ _lqmn(z,
+ out=(np.moveaxis(q, (0, 1), (-2, -1)),
+ np.moveaxis(qd, (0, 1), (-2, -1))))
+
+ return q[:(m+1), :(n+1)], qd[:(m+1), :(n+1)]
+
+
+def bernoulli(n):
+ """Bernoulli numbers B0..Bn (inclusive).
+
+ Parameters
+ ----------
+ n : int
+ Indicated the number of terms in the Bernoulli series to generate.
+
+ Returns
+ -------
+ ndarray
+ The Bernoulli numbers ``[B(0), B(1), ..., B(n)]``.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ .. [2] "Bernoulli number", Wikipedia, https://en.wikipedia.org/wiki/Bernoulli_number
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import bernoulli, zeta
+ >>> bernoulli(4)
+ array([ 1. , -0.5 , 0.16666667, 0. , -0.03333333])
+
+ The Wikipedia article ([2]_) points out the relationship between the
+ Bernoulli numbers and the zeta function, ``B_n^+ = -n * zeta(1 - n)``
+ for ``n > 0``:
+
+ >>> n = np.arange(1, 5)
+ >>> -n * zeta(1 - n)
+ array([ 0.5 , 0.16666667, -0. , -0.03333333])
+
+ Note that, in the notation used in the wikipedia article,
+ `bernoulli` computes ``B_n^-`` (i.e. it used the convention that
+ ``B_1`` is -1/2). The relation given above is for ``B_n^+``, so the
+ sign of 0.5 does not match the output of ``bernoulli(4)``.
+
+ """
+ if not isscalar(n) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+ n = int(n)
+ if (n < 2):
+ n1 = 2
+ else:
+ n1 = n
+ return _specfun.bernob(int(n1))[:(n+1)]
+
+
+def euler(n):
+ """Euler numbers E(0), E(1), ..., E(n).
+
+ The Euler numbers [1]_ are also known as the secant numbers.
+
+ Because ``euler(n)`` returns floating point values, it does not give
+ exact values for large `n`. The first inexact value is E(22).
+
+ Parameters
+ ----------
+ n : int
+ The highest index of the Euler number to be returned.
+
+ Returns
+ -------
+ ndarray
+ The Euler numbers [E(0), E(1), ..., E(n)].
+ The odd Euler numbers, which are all zero, are included.
+
+ References
+ ----------
+ .. [1] Sequence A122045, The On-Line Encyclopedia of Integer Sequences,
+ https://oeis.org/A122045
+ .. [2] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import euler
+ >>> euler(6)
+ array([ 1., 0., -1., 0., 5., 0., -61.])
+
+ >>> euler(13).astype(np.int64)
+ array([ 1, 0, -1, 0, 5, 0, -61,
+ 0, 1385, 0, -50521, 0, 2702765, 0])
+
+ >>> euler(22)[-1] # Exact value of E(22) is -69348874393137901.
+ -69348874393137976.0
+
+ """
+ if not isscalar(n) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+ n = int(n)
+ if (n < 2):
+ n1 = 2
+ else:
+ n1 = n
+ return _specfun.eulerb(n1)[:(n+1)]
+
+
+def lqn(n, z):
+ """Legendre function of the second kind.
+
+ Compute sequence of Legendre functions of the second kind, Qn(z) and
+ derivatives for all degrees from 0 to n (inclusive).
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ n = _nonneg_int_or_fail(n, 'n', strict=False)
+ if (n < 1):
+ n1 = 1
+ else:
+ n1 = n
+
+ z = np.asarray(z)
+ if (not np.issubdtype(z.dtype, np.inexact)):
+ z = z.astype(float)
+
+ if np.iscomplexobj(z):
+ qn = np.empty((n1 + 1,) + z.shape, dtype=np.complex128)
+ else:
+ qn = np.empty((n1 + 1,) + z.shape, dtype=np.float64)
+ qd = np.empty_like(qn)
+ if (z.ndim == 0):
+ _lqn(z, out=(qn, qd))
+ else:
+ # new axes must be last for the ufunc
+ _lqn(z,
+ out=(np.moveaxis(qn, 0, -1),
+ np.moveaxis(qd, 0, -1)))
+
+ return qn[:(n+1)], qd[:(n+1)]
+
+
+def ai_zeros(nt):
+ """
+ Compute `nt` zeros and values of the Airy function Ai and its derivative.
+
+ Computes the first `nt` zeros, `a`, of the Airy function Ai(x);
+ first `nt` zeros, `ap`, of the derivative of the Airy function Ai'(x);
+ the corresponding values Ai(a');
+ and the corresponding values Ai'(a).
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute
+
+ Returns
+ -------
+ a : ndarray
+ First `nt` zeros of Ai(x)
+ ap : ndarray
+ First `nt` zeros of Ai'(x)
+ ai : ndarray
+ Values of Ai(x) evaluated at first `nt` zeros of Ai'(x)
+ aip : ndarray
+ Values of Ai'(x) evaluated at first `nt` zeros of Ai(x)
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> a, ap, ai, aip = special.ai_zeros(3)
+ >>> a
+ array([-2.33810741, -4.08794944, -5.52055983])
+ >>> ap
+ array([-1.01879297, -3.24819758, -4.82009921])
+ >>> ai
+ array([ 0.53565666, -0.41901548, 0.38040647])
+ >>> aip
+ array([ 0.70121082, -0.80311137, 0.86520403])
+
+ """
+ kf = 1
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be a positive integer scalar.")
+ return _specfun.airyzo(nt, kf)
+
+
+def bi_zeros(nt):
+ """
+ Compute `nt` zeros and values of the Airy function Bi and its derivative.
+
+ Computes the first `nt` zeros, b, of the Airy function Bi(x);
+ first `nt` zeros, b', of the derivative of the Airy function Bi'(x);
+ the corresponding values Bi(b');
+ and the corresponding values Bi'(b).
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute
+
+ Returns
+ -------
+ b : ndarray
+ First `nt` zeros of Bi(x)
+ bp : ndarray
+ First `nt` zeros of Bi'(x)
+ bi : ndarray
+ Values of Bi(x) evaluated at first `nt` zeros of Bi'(x)
+ bip : ndarray
+ Values of Bi'(x) evaluated at first `nt` zeros of Bi(x)
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> b, bp, bi, bip = special.bi_zeros(3)
+ >>> b
+ array([-1.17371322, -3.2710933 , -4.83073784])
+ >>> bp
+ array([-2.29443968, -4.07315509, -5.51239573])
+ >>> bi
+ array([-0.45494438, 0.39652284, -0.36796916])
+ >>> bip
+ array([ 0.60195789, -0.76031014, 0.83699101])
+
+ """
+ kf = 2
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be a positive integer scalar.")
+ return _specfun.airyzo(nt, kf)
+
+
+def lmbda(v, x):
+ r"""Jahnke-Emden Lambda function, Lambdav(x).
+
+ This function is defined as [2]_,
+
+ .. math:: \Lambda_v(x) = \Gamma(v+1) \frac{J_v(x)}{(x/2)^v},
+
+ where :math:`\Gamma` is the gamma function and :math:`J_v` is the
+ Bessel function of the first kind.
+
+ Parameters
+ ----------
+ v : float
+ Order of the Lambda function
+ x : float
+ Value at which to evaluate the function and derivatives
+
+ Returns
+ -------
+ vl : ndarray
+ Values of Lambda_vi(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+ dl : ndarray
+ Derivatives Lambda_vi'(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ .. [2] Jahnke, E. and Emde, F. "Tables of Functions with Formulae and
+ Curves" (4th ed.), Dover, 1945
+ """
+ if not (isscalar(v) and isscalar(x)):
+ raise ValueError("arguments must be scalars.")
+ if (v < 0):
+ raise ValueError("argument must be > 0.")
+ n = int(v)
+ v0 = v - n
+ if (n < 1):
+ n1 = 1
+ else:
+ n1 = n
+ v1 = n1 + v0
+ if (v != floor(v)):
+ vm, vl, dl = _specfun.lamv(v1, x)
+ else:
+ vm, vl, dl = _specfun.lamn(v1, x)
+ return vl[:(n+1)], dl[:(n+1)]
+
+
+def pbdv_seq(v, x):
+ """Parabolic cylinder functions Dv(x) and derivatives.
+
+ Parameters
+ ----------
+ v : float
+ Order of the parabolic cylinder function
+ x : float
+ Value at which to evaluate the function and derivatives
+
+ Returns
+ -------
+ dv : ndarray
+ Values of D_vi(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+ dp : ndarray
+ Derivatives D_vi'(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 13.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(v) and isscalar(x)):
+ raise ValueError("arguments must be scalars.")
+ n = int(v)
+ v0 = v-n
+ if (n < 1):
+ n1 = 1
+ else:
+ n1 = n
+ v1 = n1 + v0
+ dv, dp, pdf, pdd = _specfun.pbdv(v1, x)
+ return dv[:n1+1], dp[:n1+1]
+
+
+def pbvv_seq(v, x):
+ """Parabolic cylinder functions Vv(x) and derivatives.
+
+ Parameters
+ ----------
+ v : float
+ Order of the parabolic cylinder function
+ x : float
+ Value at which to evaluate the function and derivatives
+
+ Returns
+ -------
+ dv : ndarray
+ Values of V_vi(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+ dp : ndarray
+ Derivatives V_vi'(x), for vi=v-int(v), vi=1+v-int(v), ..., vi=v.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 13.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(v) and isscalar(x)):
+ raise ValueError("arguments must be scalars.")
+ n = int(v)
+ v0 = v-n
+ if (n <= 1):
+ n1 = 1
+ else:
+ n1 = n
+ v1 = n1 + v0
+ dv, dp, pdf, pdd = _specfun.pbvv(v1, x)
+ return dv[:n1+1], dp[:n1+1]
+
+
+def pbdn_seq(n, z):
+ """Parabolic cylinder functions Dn(z) and derivatives.
+
+ Parameters
+ ----------
+ n : int
+ Order of the parabolic cylinder function
+ z : complex
+ Value at which to evaluate the function and derivatives
+
+ Returns
+ -------
+ dv : ndarray
+ Values of D_i(z), for i=0, ..., i=n.
+ dp : ndarray
+ Derivatives D_i'(z), for i=0, ..., i=n.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996, chapter 13.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(n) and isscalar(z)):
+ raise ValueError("arguments must be scalars.")
+ if (floor(n) != n):
+ raise ValueError("n must be an integer.")
+ if (abs(n) <= 1):
+ n1 = 1
+ else:
+ n1 = n
+ cpb, cpd = _specfun.cpbdn(n1, z)
+ return cpb[:n1+1], cpd[:n1+1]
+
+
+def ber_zeros(nt):
+ """Compute nt zeros of the Kelvin function ber.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Kelvin function.
+
+ See Also
+ --------
+ ber
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 1)
+
+
+def bei_zeros(nt):
+ """Compute nt zeros of the Kelvin function bei.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Kelvin function.
+
+ See Also
+ --------
+ bei
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 2)
+
+
+def ker_zeros(nt):
+ """Compute nt zeros of the Kelvin function ker.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Kelvin function.
+
+ See Also
+ --------
+ ker
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 3)
+
+
+def kei_zeros(nt):
+ """Compute nt zeros of the Kelvin function kei.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the Kelvin function.
+
+ See Also
+ --------
+ kei
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 4)
+
+
+def berp_zeros(nt):
+ """Compute nt zeros of the derivative of the Kelvin function ber.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the derivative of the Kelvin function.
+
+ See Also
+ --------
+ ber, berp
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+
+ Examples
+ --------
+ Compute the first 5 zeros of the derivative of the Kelvin function.
+
+ >>> from scipy.special import berp_zeros
+ >>> berp_zeros(5)
+ array([ 6.03871081, 10.51364251, 14.96844542, 19.41757493, 23.86430432])
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 5)
+
+
+def beip_zeros(nt):
+ """Compute nt zeros of the derivative of the Kelvin function bei.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the derivative of the Kelvin function.
+
+ See Also
+ --------
+ bei, beip
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 6)
+
+
+def kerp_zeros(nt):
+ """Compute nt zeros of the derivative of the Kelvin function ker.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the derivative of the Kelvin function.
+
+ See Also
+ --------
+ ker, kerp
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 7)
+
+
+def keip_zeros(nt):
+ """Compute nt zeros of the derivative of the Kelvin function kei.
+
+ Parameters
+ ----------
+ nt : int
+ Number of zeros to compute. Must be positive.
+
+ Returns
+ -------
+ ndarray
+ First `nt` zeros of the derivative of the Kelvin function.
+
+ See Also
+ --------
+ kei, keip
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return _specfun.klvnzo(nt, 8)
+
+
+def kelvin_zeros(nt):
+ """Compute nt zeros of all Kelvin functions.
+
+ Returned in a length-8 tuple of arrays of length nt. The tuple contains
+ the arrays of zeros of (ber, bei, ker, kei, ber', bei', ker', kei').
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not isscalar(nt) or (floor(nt) != nt) or (nt <= 0):
+ raise ValueError("nt must be positive integer scalar.")
+ return (_specfun.klvnzo(nt, 1),
+ _specfun.klvnzo(nt, 2),
+ _specfun.klvnzo(nt, 3),
+ _specfun.klvnzo(nt, 4),
+ _specfun.klvnzo(nt, 5),
+ _specfun.klvnzo(nt, 6),
+ _specfun.klvnzo(nt, 7),
+ _specfun.klvnzo(nt, 8))
+
+
+def pro_cv_seq(m, n, c):
+ """Characteristic values for prolate spheroidal wave functions.
+
+ Compute a sequence of characteristic values for the prolate
+ spheroidal wave functions for mode m and n'=m..n and spheroidal
+ parameter c.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(m) and isscalar(n) and isscalar(c)):
+ raise ValueError("Arguments must be scalars.")
+ if (n != floor(n)) or (m != floor(m)):
+ raise ValueError("Modes must be integers.")
+ if (n-m > 199):
+ raise ValueError("Difference between n and m is too large.")
+ maxL = n-m+1
+ return _specfun.segv(m, n, c, 1)[1][:maxL]
+
+
+def obl_cv_seq(m, n, c):
+ """Characteristic values for oblate spheroidal wave functions.
+
+ Compute a sequence of characteristic values for the oblate
+ spheroidal wave functions for mode m and n'=m..n and spheroidal
+ parameter c.
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+
+ """
+ if not (isscalar(m) and isscalar(n) and isscalar(c)):
+ raise ValueError("Arguments must be scalars.")
+ if (n != floor(n)) or (m != floor(m)):
+ raise ValueError("Modes must be integers.")
+ if (n-m > 199):
+ raise ValueError("Difference between n and m is too large.")
+ maxL = n-m+1
+ return _specfun.segv(m, n, c, -1)[1][:maxL]
+
+
+def comb(N, k, *, exact=False, repetition=False):
+ """The number of combinations of N things taken k at a time.
+
+ This is often expressed as "N choose k".
+
+ Parameters
+ ----------
+ N : int, ndarray
+ Number of things.
+ k : int, ndarray
+ Number of elements taken.
+ exact : bool, optional
+ For integers, if `exact` is False, then floating point precision is
+ used, otherwise the result is computed exactly.
+ repetition : bool, optional
+ If `repetition` is True, then the number of combinations with
+ repetition is computed.
+
+ Returns
+ -------
+ val : int, float, ndarray
+ The total number of combinations.
+
+ See Also
+ --------
+ binom : Binomial coefficient considered as a function of two real
+ variables.
+
+ Notes
+ -----
+ - Array arguments accepted only for exact=False case.
+ - If N < 0, or k < 0, then 0 is returned.
+ - If k > N and repetition=False, then 0 is returned.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import comb
+ >>> k = np.array([3, 4])
+ >>> n = np.array([10, 10])
+ >>> comb(n, k, exact=False)
+ array([ 120., 210.])
+ >>> comb(10, 3, exact=True)
+ 120
+ >>> comb(10, 3, exact=True, repetition=True)
+ 220
+
+ """
+ if repetition:
+ # Special case: C(n, 0) with repetition = 1 for n >= 0
+ # Without this check, comb(0, 0, repetition=True) would compute
+ # comb(-1, 0) which incorrectly returns 0
+ if exact:
+ if k == 0 and int(N) == N and N >= 0:
+ return 1
+ else:
+ k, N = asarray(k), asarray(N)
+ cond = (k == 0) & (N >= 0)
+ vals = binom(N + k - 1, k)
+ if isinstance(vals, np.ndarray):
+ vals[cond] = 1.0
+ elif cond:
+ vals = np.float64(1.0)
+ return vals
+ return comb(N + k - 1, k, exact=exact)
+ if exact:
+ if int(N) == N and int(k) == k:
+ # _comb_int casts inputs to integers, which is safe & intended here
+ return _comb_int(N, k)
+ else:
+ raise ValueError("Non-integer `N` and `k` with `exact=True` is not "
+ "supported.")
+ else:
+ k, N = asarray(k), asarray(N)
+ cond = (k <= N) & (N >= 0) & (k >= 0)
+ vals = binom(N, k)
+ if isinstance(vals, np.ndarray):
+ vals[~cond] = 0
+ elif not cond:
+ vals = np.float64(0)
+ return vals
+
+
+def perm(N, k, exact=False):
+ """Permutations of N things taken k at a time, i.e., k-permutations of N.
+
+ It's also known as "partial permutations".
+
+ Parameters
+ ----------
+ N : int, ndarray
+ Number of things.
+ k : int, ndarray
+ Number of elements taken.
+ exact : bool, optional
+ If ``True``, calculate the answer exactly using long integer arithmetic (`N`
+ and `k` must be scalar integers). If ``False``, a floating point approximation
+ is calculated (more rapidly) using `poch`. Default is ``False``.
+
+ Returns
+ -------
+ val : int, ndarray
+ The number of k-permutations of N.
+
+ Notes
+ -----
+ - Array arguments accepted only for exact=False case.
+ - If k > N, N < 0, or k < 0, then a 0 is returned.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import perm
+ >>> k = np.array([3, 4])
+ >>> n = np.array([10, 10])
+ >>> perm(n, k)
+ array([ 720., 5040.])
+ >>> perm(10, 3, exact=True)
+ 720
+
+ """
+ if exact:
+ N = np.squeeze(N)[()] # for backward compatibility (accepted size 1 arrays)
+ k = np.squeeze(k)[()]
+ if not (isscalar(N) and isscalar(k)):
+ raise ValueError("`N` and `k` must be scalar integers with `exact=True`.")
+
+ floor_N, floor_k = int(N), int(k)
+ non_integral = not (floor_N == N and floor_k == k)
+ if non_integral:
+ raise ValueError("Non-integer `N` and `k` with `exact=True` is not "
+ "supported.")
+
+ if (k > N) or (N < 0) or (k < 0):
+ return 0
+
+ val = 1
+ for i in range(floor_N - floor_k + 1, floor_N + 1):
+ val *= i
+ return val
+ else:
+ k, N = asarray(k), asarray(N)
+ cond = (k <= N) & (N >= 0) & (k >= 0)
+ vals = poch(N - k + 1, k)
+ if isinstance(vals, np.ndarray):
+ vals[~cond] = 0
+ elif not cond:
+ vals = np.float64(0)
+ return vals
+
+
+# https://stackoverflow.com/a/16327037
+def _range_prod(lo, hi, k=1):
+ """
+ Product of a range of numbers spaced k apart (from hi).
+
+ For k=1, this returns the product of
+ lo * (lo+1) * (lo+2) * ... * (hi-2) * (hi-1) * hi
+ = hi! / (lo-1)!
+
+ For k>1, it correspond to taking only every k'th number when
+ counting down from hi - e.g. 18!!!! = _range_prod(1, 18, 4).
+
+ Breaks into smaller products first for speed:
+ _range_prod(2, 9) = ((2*3)*(4*5))*((6*7)*(8*9))
+ """
+ if lo == 1 and k == 1:
+ return math.factorial(hi)
+
+ if lo + k < hi:
+ mid = (hi + lo) // 2
+ if k > 1:
+ # make sure mid is a multiple of k away from hi
+ mid = mid - ((mid - hi) % k)
+ return _range_prod(lo, mid, k) * _range_prod(mid + k, hi, k)
+ elif lo + k == hi:
+ return lo * hi
+ else:
+ return hi
+
+
+def _factorialx_array_exact(n, k=1):
+ """
+ Exact computation of factorial for an array.
+
+ The factorials are computed in incremental fashion, by taking
+ the sorted unique values of n and multiplying the intervening
+ numbers between the different unique values.
+
+ In other words, the factorial for the largest input is only
+ computed once, with each other result computed in the process.
+
+ k > 1 corresponds to the multifactorial.
+ """
+ un = np.unique(n)
+
+ # Convert to object array if np.int64 can't handle size
+ if k in _FACTORIALK_LIMITS_64BITS.keys():
+ if un[-1] > _FACTORIALK_LIMITS_64BITS[k]:
+ # e.g. k=1: 21! > np.iinfo(np.int64).max
+ dt = object
+ elif un[-1] > _FACTORIALK_LIMITS_32BITS[k]:
+ # e.g. k=3: 26!!! > np.iinfo(np.int32).max
+ dt = np.int64
+ else:
+ dt = np.dtype("long")
+ else:
+ # for k >= 10, we always use object
+ dt = object
+
+ out = np.empty_like(n, dtype=dt)
+
+ # Handle invalid/trivial values
+ un = un[un > 1]
+ out[n < 2] = 1
+ out[n < 0] = 0
+
+ # Calculate products of each range of numbers
+ # we can only multiply incrementally if the values are k apart;
+ # therefore we partition `un` into "lanes", i.e. its residues modulo k
+ for lane in range(0, k):
+ ul = un[(un % k) == lane] if k > 1 else un
+ if ul.size:
+ # after np.unique, un resp. ul are sorted, ul[0] is the smallest;
+ # cast to python ints to avoid overflow with np.int-types
+ val = _range_prod(1, int(ul[0]), k=k)
+ out[n == ul[0]] = val
+ for i in range(len(ul) - 1):
+ # by the filtering above, we have ensured that prev & current
+ # are a multiple of k apart
+ prev = ul[i]
+ current = ul[i + 1]
+ # we already multiplied all factors until prev; continue
+ # building the full factorial from the following (`prev + 1`);
+ # use int() for the same reason as above
+ val *= _range_prod(int(prev + 1), int(current), k=k)
+ out[n == current] = val
+
+ return out
+
+
+def _factorialx_array_approx(n, k, extend):
+ """
+ Calculate approximation to multifactorial for array n and integer k.
+
+ Ensure that values aren't calculated unnecessarily.
+ """
+ if extend == "complex":
+ return _factorialx_approx_core(n, k=k, extend=extend)
+
+ # at this point we are guaranteed that extend='zero' and that k>0 is an integer
+ result = zeros(n.shape)
+ # keep nans as nans
+ place(result, np.isnan(n), np.nan)
+ # only compute where n >= 0 (excludes nans), everything else is 0
+ cond = (n >= 0)
+ n_to_compute = extract(cond, n)
+ place(result, cond, _factorialx_approx_core(n_to_compute, k=k, extend=extend))
+ return result
+
+
+def _gamma1p(vals):
+ """
+ returns gamma(n+1), though with NaN at -1 instead of inf, c.f. #21827
+ """
+ res = gamma(vals + 1)
+ # replace infinities at -1 (from gamma function at 0) with nan
+ # gamma only returns inf for real inputs; can ignore complex case
+ if isinstance(res, np.ndarray):
+ if not _is_subdtype(vals.dtype, "c"):
+ res[vals == -1] = np.nan
+ elif np.isinf(res) and vals == -1:
+ res = np.float64("nan")
+ return res
+
+
+def _factorialx_approx_core(n, k, extend):
+ """
+ Core approximation to multifactorial for array n and integer k.
+ """
+ if k == 1:
+ # shortcut for k=1; same for both extensions, because we assume the
+ # handling of extend == 'zero' happens in _factorialx_array_approx
+ result = _gamma1p(n)
+ if isinstance(n, np.ndarray):
+ # gamma does not maintain 0-dim arrays; fix it
+ result = np.array(result)
+ return result
+
+ if extend == "complex":
+ # see https://numpy.org/doc/stable/reference/generated/numpy.power.html
+ p_dtype = complex if (_is_subdtype(type(k), "c") or k < 0) else None
+ with warnings.catch_warnings():
+ # do not warn about 0 * inf, nan / nan etc.; the results are correct
+ warnings.simplefilter("ignore", RuntimeWarning)
+ # don't use `(n-1)/k` in np.power; underflows if 0 is of a uintX type
+ result = np.power(k, n / k, dtype=p_dtype) * _gamma1p(n / k)
+ result *= rgamma(1 / k + 1) / np.power(k, 1 / k, dtype=p_dtype)
+ if isinstance(n, np.ndarray):
+ # ensure we keep array-ness for 0-dim inputs; already n/k above loses it
+ result = np.array(result)
+ return result
+
+ # at this point we are guaranteed that extend='zero' and that k>0 is an integer
+ n_mod_k = n % k
+ # scalar case separately, unified handling would be inefficient for arrays;
+ # don't use isscalar due to numpy/numpy#23574; 0-dim arrays treated below
+ if not isinstance(n, np.ndarray):
+ with warnings.catch_warnings():
+ # large n cause overflow warnings, but infinity is fine
+ warnings.simplefilter("ignore", RuntimeWarning)
+ return (
+ np.power(k, (n - n_mod_k) / k)
+ * gamma(n / k + 1) / gamma(n_mod_k / k + 1)
+ * max(n_mod_k, 1)
+ )
+
+ # factor that's independent of the residue class (see factorialk docstring)
+ with warnings.catch_warnings():
+ # large n cause overflow warnings, but infinity is fine
+ warnings.simplefilter("ignore", RuntimeWarning)
+ result = np.power(k, n / k) * gamma(n / k + 1)
+ # factor dependent on residue r (for `r=0` it's 1, so we skip `r=0`
+ # below and thus also avoid evaluating `max(r, 1)`)
+ def corr(k, r): return np.power(k, -r / k) / gamma(r / k + 1) * r
+ for r in np.unique(n_mod_k):
+ if r == 0:
+ continue
+ # cast to int because uint types break on `-r`
+ result[n_mod_k == r] *= corr(k, int(r))
+ return result
+
+
+def _is_subdtype(dtype, dtypes):
+ """
+ Shorthand for calculating whether dtype is subtype of some dtypes.
+
+ Also allows specifying a list instead of just a single dtype.
+
+ Additionaly, the most important supertypes from
+ https://numpy.org/doc/stable/reference/arrays.scalars.html
+ can optionally be specified using abbreviations as follows:
+ "i": np.integer
+ "f": np.floating
+ "c": np.complexfloating
+ "n": np.number (contains the other three)
+ """
+ dtypes = dtypes if isinstance(dtypes, list) else [dtypes]
+ # map single character abbreviations, if they are in dtypes
+ mapping = {
+ "i": np.integer,
+ "f": np.floating,
+ "c": np.complexfloating,
+ "n": np.number
+ }
+ dtypes = [mapping.get(x, x) for x in dtypes]
+ return any(np.issubdtype(dtype, dt) for dt in dtypes)
+
+
+def _factorialx_wrapper(fname, n, k, exact, extend):
+ """
+ Shared implementation for factorial, factorial2 & factorialk.
+ """
+ if extend not in ("zero", "complex"):
+ raise ValueError(
+ f"argument `extend` must be either 'zero' or 'complex', received: {extend}"
+ )
+ if exact and extend == "complex":
+ raise ValueError("Incompatible options: `exact=True` and `extend='complex'`")
+
+ msg_unsup = (
+ "Unsupported data type for {vname} in {fname}: {dtype}\n"
+ )
+ if fname == "factorial":
+ msg_unsup += (
+ "Permitted data types are integers and floating point numbers, "
+ "as well as complex numbers if `extend='complex' is passed."
+ )
+ else:
+ msg_unsup += (
+ "Permitted data types are integers, as well as floating point "
+ "numbers and complex numbers if `extend='complex' is passed."
+ )
+ msg_exact_not_possible = (
+ "`exact=True` only supports integers, cannot use data type {dtype}"
+ )
+ msg_needs_complex = (
+ "In order to use non-integer arguments, you must opt into this by passing "
+ "`extend='complex'`. Note that this changes the result for all negative "
+ "arguments (which by default return 0)."
+ )
+
+ if fname == "factorial2":
+ msg_needs_complex += (" Additionally, it will rescale the values of the double"
+ " factorial at even integers by a factor of sqrt(2/pi).")
+ elif fname == "factorialk":
+ msg_needs_complex += (" Additionally, it will perturb the values of the"
+ " multifactorial at most positive integers `n`.")
+ # check type of k
+ if not _is_subdtype(type(k), ["i", "f", "c"]):
+ raise ValueError(msg_unsup.format(vname="`k`", fname=fname, dtype=type(k)))
+ elif _is_subdtype(type(k), ["f", "c"]) and extend != "complex":
+ raise ValueError(msg_needs_complex)
+ # check value of k
+ if extend == "zero" and k < 1:
+ msg = f"For `extend='zero'`, k must be a positive integer, received: {k}"
+ raise ValueError(msg)
+ elif k == 0:
+ raise ValueError("Parameter k cannot be zero!")
+
+ # factorial allows floats also for extend="zero"
+ types_requiring_complex = "c" if fname == "factorial" else ["f", "c"]
+
+ # don't use isscalar due to numpy/numpy#23574; 0-dim arrays treated below
+ if np.ndim(n) == 0 and not isinstance(n, np.ndarray):
+ # scalar cases
+ if not _is_subdtype(type(n), ["i", "f", "c", type(None)]):
+ raise ValueError(msg_unsup.format(vname="`n`", fname=fname, dtype=type(n)))
+ elif _is_subdtype(type(n), types_requiring_complex) and extend != "complex":
+ raise ValueError(msg_needs_complex)
+ elif n is None or np.isnan(n):
+ complexify = (extend == "complex") and _is_subdtype(type(n), "c")
+ return np.complex128("nan+nanj") if complexify else np.float64("nan")
+ elif extend == "zero" and n < 0:
+ return 0 if exact else np.float64(0)
+ elif n in {0, 1}:
+ return 1 if exact else np.float64(1)
+ elif exact and _is_subdtype(type(n), "i"):
+ # calculate with integers; cast away other int types (like unsigned)
+ return _range_prod(1, int(n), k=k)
+ elif exact:
+ # only relevant for factorial
+ raise ValueError(msg_exact_not_possible.format(dtype=type(n)))
+ # approximation
+ return _factorialx_approx_core(n, k=k, extend=extend)
+
+ # arrays & array-likes
+ n = asarray(n)
+
+ if not _is_subdtype(n.dtype, ["i", "f", "c"]):
+ raise ValueError(msg_unsup.format(vname="`n`", fname=fname, dtype=n.dtype))
+ elif _is_subdtype(n.dtype, types_requiring_complex) and extend != "complex":
+ raise ValueError(msg_needs_complex)
+ elif exact and _is_subdtype(n.dtype, ["f"]):
+ # only relevant for factorial
+ raise ValueError(msg_exact_not_possible.format(dtype=n.dtype))
+
+ if n.size == 0:
+ # return empty arrays unchanged
+ return n
+ elif exact:
+ # calculate with integers
+ return _factorialx_array_exact(n, k=k)
+ # approximation
+ return _factorialx_array_approx(n, k=k, extend=extend)
+
+
+def factorial(n, exact=False, extend="zero"):
+ """
+ The factorial of a number or array of numbers.
+
+ The factorial of non-negative integer `n` is the product of all
+ positive integers less than or equal to `n`::
+
+ n! = n * (n - 1) * (n - 2) * ... * 1
+
+ Parameters
+ ----------
+ n : int or float or complex (or array_like thereof)
+ Input values for ``n!``. Complex values require ``extend='complex'``.
+ By default, the return value for ``n < 0`` is 0.
+ exact : bool, optional
+ If ``exact`` is set to True, calculate the answer exactly using
+ integer arithmetic, otherwise approximate using the gamma function
+ (faster, but yields floats instead of integers).
+ Default is False.
+ extend : string, optional
+ One of ``'zero'`` or ``'complex'``; this determines how values ``n<0``
+ are handled - by default they are 0, but it is possible to opt into the
+ complex extension of the factorial (see below).
+
+ Returns
+ -------
+ nf : int or float or complex or ndarray
+ Factorial of ``n``, as integer, float or complex (depending on ``exact``
+ and ``extend``). Array inputs are returned as arrays.
+
+ Notes
+ -----
+ For arrays with ``exact=True``, the factorial is computed only once, for
+ the largest input, with each other result computed in the process.
+ The output dtype is increased to ``int64`` or ``object`` if necessary.
+
+ With ``exact=False`` the factorial is approximated using the gamma
+ function (which is also the definition of the complex extension):
+
+ .. math:: n! = \\Gamma(n+1)
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import factorial
+ >>> arr = np.array([3, 4, 5])
+ >>> factorial(arr, exact=False)
+ array([ 6., 24., 120.])
+ >>> factorial(arr, exact=True)
+ array([ 6, 24, 120])
+ >>> factorial(5, exact=True)
+ 120
+
+ """
+ return _factorialx_wrapper("factorial", n, k=1, exact=exact, extend=extend)
+
+
+def factorial2(n, exact=False, extend="zero"):
+ """Double factorial.
+
+ This is the factorial with every second value skipped. E.g., ``7!! = 7 * 5
+ * 3 * 1``. It can be approximated numerically as::
+
+ n!! = 2 ** (n / 2) * gamma(n / 2 + 1) * sqrt(2 / pi) n odd
+ = 2 ** (n / 2) * gamma(n / 2 + 1) n even
+ = 2 ** (n / 2) * (n / 2)! n even
+
+ The formula for odd ``n`` is the basis for the complex extension.
+
+ Parameters
+ ----------
+ n : int or float or complex (or array_like thereof)
+ Input values for ``n!!``. Non-integer values require ``extend='complex'``.
+ By default, the return value for ``n < 0`` is 0.
+ exact : bool, optional
+ If ``exact`` is set to True, calculate the answer exactly using
+ integer arithmetic, otherwise use above approximation (faster,
+ but yields floats instead of integers).
+ Default is False.
+ extend : string, optional
+ One of ``'zero'`` or ``'complex'``; this determines how values ``n<0``
+ are handled - by default they are 0, but it is possible to opt into the
+ complex extension of the double factorial. This also enables passing
+ complex values to ``n``.
+
+ .. warning::
+
+ Using the ``'complex'`` extension also changes the values of the
+ double factorial for even integers, reducing them by a factor of
+ ``sqrt(2/pi) ~= 0.79``, see [1].
+
+ Returns
+ -------
+ nf : int or float or complex or ndarray
+ Double factorial of ``n``, as integer, float or complex (depending on
+ ``exact`` and ``extend``). Array inputs are returned as arrays.
+
+ Examples
+ --------
+ >>> from scipy.special import factorial2
+ >>> factorial2(7, exact=False)
+ np.float64(105.00000000000001)
+ >>> factorial2(7, exact=True)
+ 105
+
+ References
+ ----------
+ .. [1] Complex extension to double factorial
+ https://en.wikipedia.org/wiki/Double_factorial#Complex_arguments
+ """
+ return _factorialx_wrapper("factorial2", n, k=2, exact=exact, extend=extend)
+
+
+def factorialk(n, k, exact=False, extend="zero"):
+ """Multifactorial of n of order k, n(!!...!).
+
+ This is the multifactorial of n skipping k values. For example,
+
+ factorialk(17, 4) = 17!!!! = 17 * 13 * 9 * 5 * 1
+
+ In particular, for any integer ``n``, we have
+
+ factorialk(n, 1) = factorial(n)
+
+ factorialk(n, 2) = factorial2(n)
+
+ Parameters
+ ----------
+ n : int or float or complex (or array_like thereof)
+ Input values for multifactorial. Non-integer values require
+ ``extend='complex'``. By default, the return value for ``n < 0`` is 0.
+ k : int or float or complex (or array_like thereof)
+ Order of multifactorial. Non-integer values require ``extend='complex'``.
+ exact : bool, optional
+ If ``exact`` is set to True, calculate the answer exactly using
+ integer arithmetic, otherwise use an approximation (faster,
+ but yields floats instead of integers)
+ Default is False.
+ extend : string, optional
+ One of ``'zero'`` or ``'complex'``; this determines how values ``n<0`` are
+ handled - by default they are 0, but it is possible to opt into the complex
+ extension of the multifactorial. This enables passing complex values,
+ not only to ``n`` but also to ``k``.
+
+ .. warning::
+
+ Using the ``'complex'`` extension also changes the values of the
+ multifactorial at integers ``n != 1 (mod k)`` by a factor depending
+ on both ``k`` and ``n % k``, see below or [1].
+
+ Returns
+ -------
+ nf : int or float or complex or ndarray
+ Multifactorial (order ``k``) of ``n``, as integer, float or complex (depending
+ on ``exact`` and ``extend``). Array inputs are returned as arrays.
+
+ Examples
+ --------
+ >>> from scipy.special import factorialk
+ >>> factorialk(5, k=1, exact=True)
+ 120
+ >>> factorialk(5, k=3, exact=True)
+ 10
+ >>> factorialk([5, 7, 9], k=3, exact=True)
+ array([ 10, 28, 162])
+ >>> factorialk([5, 7, 9], k=3, exact=False)
+ array([ 10., 28., 162.])
+
+ Notes
+ -----
+ While less straight-forward than for the double-factorial, it's possible to
+ calculate a general approximation formula of n!(k) by studying ``n`` for a given
+ remainder ``r < k`` (thus ``n = m * k + r``, resp. ``r = n % k``), which can be
+ put together into something valid for all integer values ``n >= 0`` & ``k > 0``::
+
+ n!(k) = k ** ((n - r)/k) * gamma(n/k + 1) / gamma(r/k + 1) * max(r, 1)
+
+ This is the basis of the approximation when ``exact=False``.
+
+ In principle, any fixed choice of ``r`` (ignoring its relation ``r = n%k``
+ to ``n``) would provide a suitable analytic continuation from integer ``n``
+ to complex ``z`` (not only satisfying the functional equation but also
+ being logarithmically convex, c.f. Bohr-Mollerup theorem) -- in fact, the
+ choice of ``r`` above only changes the function by a constant factor. The
+ final constraint that determines the canonical continuation is ``f(1) = 1``,
+ which forces ``r = 1`` (see also [1]).::
+
+ z!(k) = k ** ((z - 1)/k) * gamma(z/k + 1) / gamma(1/k + 1)
+
+ References
+ ----------
+ .. [1] Complex extension to multifactorial
+ https://en.wikipedia.org/wiki/Double_factorial#Alternative_extension_of_the_multifactorial
+ """
+ return _factorialx_wrapper("factorialk", n, k=k, exact=exact, extend=extend)
+
+
+def stirling2(N, K, *, exact=False):
+ r"""Generate Stirling number(s) of the second kind.
+
+ Stirling numbers of the second kind count the number of ways to
+ partition a set with N elements into K non-empty subsets.
+
+ The values this function returns are calculated using a dynamic
+ program which avoids redundant computation across the subproblems
+ in the solution. For array-like input, this implementation also
+ avoids redundant computation across the different Stirling number
+ calculations.
+
+ The numbers are sometimes denoted
+
+ .. math::
+
+ {N \brace{K}}
+
+ see [1]_ for details. This is often expressed-verbally-as
+ "N subset K".
+
+ Parameters
+ ----------
+ N : int, ndarray
+ Number of things.
+ K : int, ndarray
+ Number of non-empty subsets taken.
+ exact : bool, optional
+ Uses dynamic programming (DP) with floating point
+ numbers for smaller arrays and uses a second order approximation due to
+ Temme for larger entries of `N` and `K` that allows trading speed for
+ accuracy. See [2]_ for a description. Temme approximation is used for
+ values ``n>50``. The max error from the DP has max relative error
+ ``4.5*10^-16`` for ``n<=50`` and the max error from the Temme approximation
+ has max relative error ``5*10^-5`` for ``51 <= n < 70`` and
+ ``9*10^-6`` for ``70 <= n < 101``. Note that these max relative errors will
+ decrease further as `n` increases.
+
+ Returns
+ -------
+ val : int, float, ndarray
+ The number of partitions.
+
+ See Also
+ --------
+ comb : The number of combinations of N things taken k at a time.
+
+ Notes
+ -----
+ - If N < 0, or K < 0, then 0 is returned.
+ - If K > N, then 0 is returned.
+
+ The output type will always be `int` or ndarray of `object`.
+ The input must contain either numpy or python integers otherwise a
+ TypeError is raised.
+
+ References
+ ----------
+ .. [1] R. L. Graham, D. E. Knuth and O. Patashnik, "Concrete
+ Mathematics: A Foundation for Computer Science," Addison-Wesley
+ Publishing Company, Boston, 1989. Chapter 6, page 258.
+
+ .. [2] Temme, Nico M. "Asymptotic estimates of Stirling numbers."
+ Studies in Applied Mathematics 89.3 (1993): 233-243.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import stirling2
+ >>> k = np.array([3, -1, 3])
+ >>> n = np.array([10, 10, 9])
+ >>> stirling2(n, k)
+ array([9330.0, 0.0, 3025.0])
+
+ """
+ output_is_scalar = np.isscalar(N) and np.isscalar(K)
+ # make a min-heap of unique (n,k) pairs
+ N, K = asarray(N), asarray(K)
+ if not np.issubdtype(N.dtype, np.integer):
+ raise TypeError("Argument `N` must contain only integers")
+ if not np.issubdtype(K.dtype, np.integer):
+ raise TypeError("Argument `K` must contain only integers")
+ if not exact:
+ # NOTE: here we allow np.uint via casting to double types prior to
+ # passing to private ufunc dispatcher. All dispatched functions
+ # take double type for (n,k) arguments and return double.
+ return _stirling2_inexact(N.astype(float), K.astype(float))
+ nk_pairs = list(
+ set([(n.take(0), k.take(0))
+ for n, k in np.nditer([N, K], ['refs_ok'])])
+ )
+ heapify(nk_pairs)
+ # base mapping for small values
+ snsk_vals = defaultdict(int)
+ for pair in [(0, 0), (1, 1), (2, 1), (2, 2)]:
+ snsk_vals[pair] = 1
+ # for each pair in the min-heap, calculate the value, store for later
+ n_old, n_row = 2, [0, 1, 1]
+ while nk_pairs:
+ n, k = heappop(nk_pairs)
+ if n < 2 or k > n or k <= 0:
+ continue
+ elif k == n or k == 1:
+ snsk_vals[(n, k)] = 1
+ continue
+ elif n != n_old:
+ num_iters = n - n_old
+ while num_iters > 0:
+ n_row.append(1)
+ # traverse from back to remove second row
+ for j in range(len(n_row)-2, 1, -1):
+ n_row[j] = n_row[j]*j + n_row[j-1]
+ num_iters -= 1
+ snsk_vals[(n, k)] = n_row[k]
+ else:
+ snsk_vals[(n, k)] = n_row[k]
+ n_old, n_row = n, n_row
+ out_types = [object, object, object] if exact else [float, float, float]
+ # for each pair in the map, fetch the value, and populate the array
+ it = np.nditer(
+ [N, K, None],
+ ['buffered', 'refs_ok'],
+ [['readonly'], ['readonly'], ['writeonly', 'allocate']],
+ op_dtypes=out_types,
+ )
+ with it:
+ while not it.finished:
+ it[2] = snsk_vals[(int(it[0]), int(it[1]))]
+ it.iternext()
+ output = it.operands[2]
+ # If N and K were both scalars, convert output to scalar.
+ if output_is_scalar:
+ output = output.take(0)
+ return output
+
+
+def zeta(x, q=None, out=None):
+ r"""
+ Riemann or Hurwitz zeta function.
+
+ Parameters
+ ----------
+ x : array_like of float or complex.
+ Input data
+ q : array_like of float, optional
+ Input data, must be real. Defaults to Riemann zeta. When `q` is
+ ``None``, complex inputs `x` are supported. If `q` is not ``None``,
+ then currently only real inputs `x` with ``x >= 1`` are supported,
+ even when ``q = 1.0`` (corresponding to the Riemann zeta function).
+
+ out : ndarray, optional
+ Output array for the computed values.
+
+ Returns
+ -------
+ out : array_like
+ Values of zeta(x).
+
+ See Also
+ --------
+ zetac
+
+ Notes
+ -----
+ The two-argument version is the Hurwitz zeta function
+
+ .. math::
+
+ \zeta(x, q) = \sum_{k=0}^{\infty} \frac{1}{(k + q)^x};
+
+ see [dlmf]_ for details. The Riemann zeta function corresponds to
+ the case when ``q = 1``.
+
+ For complex inputs with ``q = None``, points with
+ ``abs(z.imag) > 1e9`` and ``0 <= abs(z.real) < 2.5`` are currently not
+ supported due to slow convergence causing excessive runtime.
+
+ References
+ ----------
+ .. [dlmf] NIST, Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/25.11#i
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import zeta, polygamma, factorial
+
+ Some specific values:
+
+ >>> zeta(2), np.pi**2/6
+ (1.6449340668482266, 1.6449340668482264)
+
+ >>> zeta(4), np.pi**4/90
+ (1.0823232337111381, 1.082323233711138)
+
+ First nontrivial zero:
+
+ >>> zeta(0.5 + 14.134725141734695j)
+ 0 + 0j
+
+ Relation to the `polygamma` function:
+
+ >>> m = 3
+ >>> x = 1.25
+ >>> polygamma(m, x)
+ array(2.782144009188397)
+ >>> (-1)**(m+1) * factorial(m) * zeta(m+1, x)
+ 2.7821440091883969
+
+ """
+ if q is None:
+ return _ufuncs._riemann_zeta(x, out)
+ else:
+ return _ufuncs._zeta(x, q, out)
+
+
+def softplus(x, **kwargs):
+ r"""
+ Compute the softplus function element-wise.
+
+ The softplus function is defined as: ``softplus(x) = log(1 + exp(x))``.
+ It is a smooth approximation of the rectifier function (ReLU).
+
+ Parameters
+ ----------
+ x : array_like
+ Input value.
+ **kwargs
+ For other keyword-only arguments, see the
+ `ufunc docs `_.
+
+ Returns
+ -------
+ softplus : ndarray
+ Logarithm of ``exp(0) + exp(x)``.
+
+ Examples
+ --------
+ >>> from scipy import special
+
+ >>> special.softplus(0)
+ 0.6931471805599453
+
+ >>> special.softplus([-1, 0, 1])
+ array([0.31326169, 0.69314718, 1.31326169])
+ """
+ return np.logaddexp(0, x, **kwargs)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_comb.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_comb.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..04f385033fb722b9354071120e14c6c25bb7faf4
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_comb.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm.py
new file mode 100644
index 0000000000000000000000000000000000000000..b07f755f87c675822af66b9f77d4821b554fdfd0
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm.py
@@ -0,0 +1,214 @@
+import numpy as np
+
+from ._ufuncs import _ellip_harm
+from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm
+
+
+def ellip_harm(h2, k2, n, p, s, signm=1, signn=1):
+ r"""
+ Ellipsoidal harmonic functions E^p_n(l)
+
+ These are also known as Lamé functions of the first kind, and are
+ solutions to the Lamé equation:
+
+ .. math:: (s^2 - h^2)(s^2 - k^2)E''(s)
+ + s(2s^2 - h^2 - k^2)E'(s) + (a - q s^2)E(s) = 0
+
+ where :math:`q = (n+1)n` and :math:`a` is the eigenvalue (not
+ returned) corresponding to the solutions.
+
+ Parameters
+ ----------
+ h2 : float
+ ``h**2``
+ k2 : float
+ ``k**2``; should be larger than ``h**2``
+ n : int
+ Degree
+ s : float
+ Coordinate
+ p : int
+ Order, can range between [1,2n+1]
+ signm : {1, -1}, optional
+ Sign of prefactor of functions. Can be +/-1. See Notes.
+ signn : {1, -1}, optional
+ Sign of prefactor of functions. Can be +/-1. See Notes.
+
+ Returns
+ -------
+ E : float
+ the harmonic :math:`E^p_n(s)`
+
+ See Also
+ --------
+ ellip_harm_2, ellip_normal
+
+ Notes
+ -----
+ The geometric interpretation of the ellipsoidal functions is
+ explained in [2]_, [3]_, [4]_. The `signm` and `signn` arguments control the
+ sign of prefactors for functions according to their type::
+
+ K : +1
+ L : signm
+ M : signn
+ N : signm*signn
+
+ .. versionadded:: 0.15.0
+
+ References
+ ----------
+ .. [1] Digital Library of Mathematical Functions 29.12
+ https://dlmf.nist.gov/29.12
+ .. [2] Bardhan and Knepley, "Computational science and
+ re-discovery: open-source implementations of
+ ellipsoidal harmonics for problems in potential theory",
+ Comput. Sci. Disc. 5, 014006 (2012)
+ :doi:`10.1088/1749-4699/5/1/014006`.
+ .. [3] David J.and Dechambre P, "Computation of Ellipsoidal
+ Gravity Field Harmonics for small solar system bodies"
+ pp. 30-36, 2000
+ .. [4] George Dassios, "Ellipsoidal Harmonics: Theory and Applications"
+ pp. 418, 2012
+
+ Examples
+ --------
+ >>> from scipy.special import ellip_harm
+ >>> w = ellip_harm(5,8,1,1,2.5)
+ >>> w
+ 2.5
+
+ Check that the functions indeed are solutions to the Lamé equation:
+
+ >>> import numpy as np
+ >>> from scipy.interpolate import UnivariateSpline
+ >>> def eigenvalue(f, df, ddf):
+ ... r = (((s**2 - h**2) * (s**2 - k**2) * ddf
+ ... + s * (2*s**2 - h**2 - k**2) * df
+ ... - n * (n + 1)*s**2*f) / f)
+ ... return -r.mean(), r.std()
+ >>> s = np.linspace(0.1, 10, 200)
+ >>> k, h, n, p = 8.0, 2.2, 3, 2
+ >>> E = ellip_harm(h**2, k**2, n, p, s)
+ >>> E_spl = UnivariateSpline(s, E)
+ >>> a, a_err = eigenvalue(E_spl(s), E_spl(s,1), E_spl(s,2))
+ >>> a, a_err
+ (583.44366156701483, 6.4580890640310646e-11)
+
+ """ # noqa: E501
+ return _ellip_harm(h2, k2, n, p, s, signm, signn)
+
+
+_ellip_harm_2_vec = np.vectorize(_ellipsoid, otypes='d')
+
+
+def ellip_harm_2(h2, k2, n, p, s):
+ r"""
+ Ellipsoidal harmonic functions F^p_n(l)
+
+ These are also known as Lamé functions of the second kind, and are
+ solutions to the Lamé equation:
+
+ .. math:: (s^2 - h^2)(s^2 - k^2)F''(s)
+ + s(2s^2 - h^2 - k^2)F'(s) + (a - q s^2)F(s) = 0
+
+ where :math:`q = (n+1)n` and :math:`a` is the eigenvalue (not
+ returned) corresponding to the solutions.
+
+ Parameters
+ ----------
+ h2 : float
+ ``h**2``
+ k2 : float
+ ``k**2``; should be larger than ``h**2``
+ n : int
+ Degree.
+ p : int
+ Order, can range between [1,2n+1].
+ s : float
+ Coordinate
+
+ Returns
+ -------
+ F : float
+ The harmonic :math:`F^p_n(s)`
+
+ See Also
+ --------
+ ellip_harm, ellip_normal
+
+ Notes
+ -----
+ Lamé functions of the second kind are related to the functions of the first kind:
+
+ .. math::
+
+ F^p_n(s)=(2n + 1)E^p_n(s)\int_{0}^{1/s}
+ \frac{du}{(E^p_n(1/u))^2\sqrt{(1-u^2k^2)(1-u^2h^2)}}
+
+ .. versionadded:: 0.15.0
+
+ Examples
+ --------
+ >>> from scipy.special import ellip_harm_2
+ >>> w = ellip_harm_2(5,8,2,1,10)
+ >>> w
+ 0.00108056853382
+
+ """
+ with np.errstate(all='ignore'):
+ return _ellip_harm_2_vec(h2, k2, n, p, s)
+
+
+def _ellip_normal_vec(h2, k2, n, p):
+ return _ellipsoid_norm(h2, k2, n, p)
+
+
+_ellip_normal_vec = np.vectorize(_ellip_normal_vec, otypes='d')
+
+
+def ellip_normal(h2, k2, n, p):
+ r"""
+ Ellipsoidal harmonic normalization constants gamma^p_n
+
+ The normalization constant is defined as
+
+ .. math::
+
+ \gamma^p_n=8\int_{0}^{h}dx\int_{h}^{k}dy
+ \frac{(y^2-x^2)(E^p_n(y)E^p_n(x))^2}{\sqrt((k^2-y^2)(y^2-h^2)(h^2-x^2)(k^2-x^2)}
+
+ Parameters
+ ----------
+ h2 : float
+ ``h**2``
+ k2 : float
+ ``k**2``; should be larger than ``h**2``
+ n : int
+ Degree.
+ p : int
+ Order, can range between [1,2n+1].
+
+ Returns
+ -------
+ gamma : float
+ The normalization constant :math:`\gamma^p_n`
+
+ See Also
+ --------
+ ellip_harm, ellip_harm_2
+
+ Notes
+ -----
+ .. versionadded:: 0.15.0
+
+ Examples
+ --------
+ >>> from scipy.special import ellip_normal
+ >>> w = ellip_normal(5,8,3,7)
+ >>> w
+ 1723.38796997
+
+ """
+ with np.errstate(all='ignore'):
+ return _ellip_normal_vec(h2, k2, n, p)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm_2.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm_2.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..3544c236b8063e7141cf633c64faba37093911bd
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ellip_harm_2.cpython-312-darwin.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:270a72564462ad4bf7ccf34c553834e7dfe4194b39e476afb8d0e2e6f6fde017
+size 113088
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_gufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_gufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..6539c59a197fc5a6b0b082e5188a0503eba6e29d
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_gufuncs.cpython-312-darwin.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:09d7211760da07988bfe7c3335631b3380f405c59391cb387e7e00de87b22375
+size 627808
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_input_validation.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_input_validation.py
new file mode 100644
index 0000000000000000000000000000000000000000..e5b7fe36df87617bf91655623ee0076c37a4d08a
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_input_validation.py
@@ -0,0 +1,17 @@
+import math
+import operator
+
+def _nonneg_int_or_fail(n, var_name, strict=True):
+ try:
+ if strict:
+ # Raises an exception if float
+ n = operator.index(n)
+ elif n == math.floor(n):
+ n = int(n)
+ else:
+ raise ValueError()
+ if n < 0:
+ raise ValueError()
+ except (ValueError, TypeError) as err:
+ raise err.__class__(f"{var_name} must be a non-negative integer") from err
+ return n
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_lambertw.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_lambertw.py
new file mode 100644
index 0000000000000000000000000000000000000000..f758c7c21fdddc0ec1b84727d90c6de7f34a094e
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_lambertw.py
@@ -0,0 +1,149 @@
+from ._ufuncs import _lambertw
+
+import numpy as np
+
+
+def lambertw(z, k=0, tol=1e-8):
+ r"""
+ lambertw(z, k=0, tol=1e-8)
+
+ Lambert W function.
+
+ The Lambert W function `W(z)` is defined as the inverse function
+ of ``w * exp(w)``. In other words, the value of ``W(z)`` is
+ such that ``z = W(z) * exp(W(z))`` for any complex number
+ ``z``.
+
+ The Lambert W function is a multivalued function with infinitely
+ many branches. Each branch gives a separate solution of the
+ equation ``z = w exp(w)``. Here, the branches are indexed by the
+ integer `k`.
+
+ Parameters
+ ----------
+ z : array_like
+ Input argument.
+ k : int, optional
+ Branch index.
+ tol : float, optional
+ Evaluation tolerance.
+
+ Returns
+ -------
+ w : array
+ `w` will have the same shape as `z`.
+
+ See Also
+ --------
+ wrightomega : the Wright Omega function
+
+ Notes
+ -----
+ All branches are supported by `lambertw`:
+
+ * ``lambertw(z)`` gives the principal solution (branch 0)
+ * ``lambertw(z, k)`` gives the solution on branch `k`
+
+ The Lambert W function has two partially real branches: the
+ principal branch (`k = 0`) is real for real ``z > -1/e``, and the
+ ``k = -1`` branch is real for ``-1/e < z < 0``. All branches except
+ ``k = 0`` have a logarithmic singularity at ``z = 0``.
+
+ **Possible issues**
+
+ The evaluation can become inaccurate very close to the branch point
+ at ``-1/e``. In some corner cases, `lambertw` might currently
+ fail to converge, or can end up on the wrong branch.
+
+ **Algorithm**
+
+ Halley's iteration is used to invert ``w * exp(w)``, using a first-order
+ asymptotic approximation (O(log(w)) or `O(w)`) as the initial estimate.
+
+ The definition, implementation and choice of branches is based on [2]_.
+
+ References
+ ----------
+ .. [1] https://en.wikipedia.org/wiki/Lambert_W_function
+ .. [2] Corless et al, "On the Lambert W function", Adv. Comp. Math. 5
+ (1996) 329-359.
+ https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf
+
+ Examples
+ --------
+ The Lambert W function is the inverse of ``w exp(w)``:
+
+ >>> import numpy as np
+ >>> from scipy.special import lambertw
+ >>> w = lambertw(1)
+ >>> w
+ (0.56714329040978384+0j)
+ >>> w * np.exp(w)
+ (1.0+0j)
+
+ Any branch gives a valid inverse:
+
+ >>> w = lambertw(1, k=3)
+ >>> w
+ (-2.8535817554090377+17.113535539412148j)
+ >>> w*np.exp(w)
+ (1.0000000000000002+1.609823385706477e-15j)
+
+ **Applications to equation-solving**
+
+ The Lambert W function may be used to solve various kinds of
+ equations. We give two examples here.
+
+ First, the function can be used to solve implicit equations of the
+ form
+
+ :math:`x = a + b e^{c x}`
+
+ for :math:`x`. We assume :math:`c` is not zero. After a little
+ algebra, the equation may be written
+
+ :math:`z e^z = -b c e^{a c}`
+
+ where :math:`z = c (a - x)`. :math:`z` may then be expressed using
+ the Lambert W function
+
+ :math:`z = W(-b c e^{a c})`
+
+ giving
+
+ :math:`x = a - W(-b c e^{a c})/c`
+
+ For example,
+
+ >>> a = 3
+ >>> b = 2
+ >>> c = -0.5
+
+ The solution to :math:`x = a + b e^{c x}` is:
+
+ >>> x = a - lambertw(-b*c*np.exp(a*c))/c
+ >>> x
+ (3.3707498368978794+0j)
+
+ Verify that it solves the equation:
+
+ >>> a + b*np.exp(c*x)
+ (3.37074983689788+0j)
+
+ The Lambert W function may also be used find the value of the infinite
+ power tower :math:`z^{z^{z^{\ldots}}}`:
+
+ >>> def tower(z, n):
+ ... if n == 0:
+ ... return z
+ ... return z ** tower(z, n-1)
+ ...
+ >>> tower(0.5, 100)
+ 0.641185744504986
+ >>> -lambertw(-np.log(0.5)) / np.log(0.5)
+ (0.64118574450498589+0j)
+ """
+ # TODO: special expert should inspect this
+ # interception; better place to do it?
+ k = np.asarray(k, dtype=np.dtype("long"))
+ return _lambertw(z, k, tol)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_logsumexp.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_logsumexp.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abf08e54767c50e6aba5bf12a50219d1cd21b44
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_logsumexp.py
@@ -0,0 +1,420 @@
+import numpy as np
+from scipy._lib._array_api import (
+ array_namespace,
+ xp_capabilities,
+ xp_device,
+ xp_size,
+ xp_promote,
+ xp_float_to_complex,
+)
+from scipy._lib import array_api_extra as xpx
+
+__all__ = ["logsumexp", "softmax", "log_softmax"]
+
+
+@xp_capabilities()
+def logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):
+ """Compute the log of the sum of exponentials of input elements.
+
+ Parameters
+ ----------
+ a : array_like
+ Input array.
+ axis : None or int or tuple of ints, optional
+ Axis or axes over which the sum is taken. By default `axis` is None,
+ and all elements are summed.
+
+ .. versionadded:: 0.11.0
+ b : array-like, optional
+ Scaling factor for exp(`a`) must be of the same shape as `a` or
+ broadcastable to `a`. These values may be negative in order to
+ implement subtraction.
+
+ .. versionadded:: 0.12.0
+ keepdims : bool, optional
+ If this is set to True, the axes which are reduced are left in the
+ result as dimensions with size one. With this option, the result
+ will broadcast correctly against the original array.
+
+ .. versionadded:: 0.15.0
+ return_sign : bool, optional
+ If this is set to True, the result will be a pair containing sign
+ information; if False, results that are negative will be returned
+ as NaN. Default is False (no sign information).
+
+ .. versionadded:: 0.16.0
+
+ Returns
+ -------
+ res : ndarray
+ The result, ``np.log(np.sum(np.exp(a)))`` calculated in a numerically
+ more stable way. If `b` is given then ``np.log(np.sum(b*np.exp(a)))``
+ is returned. If ``return_sign`` is True, ``res`` contains the log of
+ the absolute value of the argument.
+ sgn : ndarray
+ If ``return_sign`` is True, this will be an array of floating-point
+ numbers matching res containing +1, 0, -1 (for real-valued inputs)
+ or a complex phase (for complex inputs). This gives the sign of the
+ argument of the logarithm in ``res``.
+ If ``return_sign`` is False, only one result is returned.
+
+ See Also
+ --------
+ :data:`numpy.logaddexp`
+ :data:`numpy.logaddexp2`
+
+ Notes
+ -----
+ NumPy has a logaddexp function which is very similar to `logsumexp`, but
+ only handles two arguments. `logaddexp.reduce` is similar to this
+ function, but may be less stable.
+
+ The logarithm is a multivalued function: for each :math:`x` there is an
+ infinite number of :math:`z` such that :math:`exp(z) = x`. The convention
+ is to return the :math:`z` whose imaginary part lies in :math:`(-pi, pi]`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import logsumexp
+ >>> a = np.arange(10)
+ >>> logsumexp(a)
+ 9.4586297444267107
+ >>> np.log(np.sum(np.exp(a)))
+ 9.4586297444267107
+
+ With weights
+
+ >>> a = np.arange(10)
+ >>> b = np.arange(10, 0, -1)
+ >>> logsumexp(a, b=b)
+ 9.9170178533034665
+ >>> np.log(np.sum(b*np.exp(a)))
+ 9.9170178533034647
+
+ Returning a sign flag
+
+ >>> logsumexp([1,2],b=[1,-1],return_sign=True)
+ (1.5413248546129181, -1.0)
+
+ Notice that `logsumexp` does not directly support masked arrays. To use it
+ on a masked array, convert the mask into zero weights:
+
+ >>> a = np.ma.array([np.log(2), 2, np.log(3)],
+ ... mask=[False, True, False])
+ >>> b = (~a.mask).astype(int)
+ >>> logsumexp(a.data, b=b), np.log(5)
+ 1.6094379124341005, 1.6094379124341005
+
+ """
+ xp = array_namespace(a, b)
+ a, b = xp_promote(a, b, broadcast=True, force_floating=True, xp=xp)
+ a = xpx.atleast_nd(a, ndim=1, xp=xp)
+ b = xpx.atleast_nd(b, ndim=1, xp=xp) if b is not None else b
+ axis = tuple(range(a.ndim)) if axis is None else axis
+
+ if xp_size(a) != 0:
+ with np.errstate(divide='ignore', invalid='ignore', over='ignore'):
+ # Where result is infinite, we use the direct logsumexp calculation to
+ # delegate edge case handling to the behavior of `xp.log` and `xp.exp`,
+ # which should follow the C99 standard for complex values.
+ b_exp_a = xp.exp(a) if b is None else b * xp.exp(a)
+ sum_ = xp.sum(b_exp_a, axis=axis, keepdims=True)
+ sgn_inf = xp.sign(sum_) if return_sign else None
+ sum_ = xp.abs(sum_) if return_sign else sum_
+ out_inf = xp.log(sum_)
+
+ with np.errstate(divide='ignore', invalid='ignore'): # log of zero is OK
+ out, sgn = _logsumexp(a, b, axis=axis, return_sign=return_sign, xp=xp)
+
+ # Replace infinite results. This probably could be done with an
+ # `apply_where`-like strategy to avoid redundant calculation, but currently
+ # `apply_where` itself is only for elementwise functions.
+ out_finite = xp.isfinite(out)
+ out = xp.where(out_finite, out, out_inf)
+ sgn = xp.where(out_finite, sgn, sgn_inf) if return_sign else sgn
+ else:
+ shape = np.asarray(a.shape) # NumPy is convenient for shape manipulation
+ shape[axis] = 1
+ out = xp.full(tuple(shape), -xp.inf, dtype=a.dtype, device=xp_device(a))
+ sgn = xp.sign(out)
+
+ if xp.isdtype(out.dtype, 'complex floating'):
+ if return_sign:
+ real = xp.real(sgn)
+ imag = xp_float_to_complex(_wrap_radians(xp.imag(sgn), xp=xp), xp=xp)
+ sgn = real + imag*1j
+ else:
+ real = xp.real(out)
+ imag = xp_float_to_complex(_wrap_radians(xp.imag(out), xp=xp), xp=xp)
+ out = real + imag*1j
+
+ # Deal with shape details - reducing dimensions and convert 0-D to scalar for NumPy
+ out = xp.squeeze(out, axis=axis) if not keepdims else out
+ sgn = xp.squeeze(sgn, axis=axis) if (sgn is not None and not keepdims) else sgn
+ out = out[()] if out.ndim == 0 else out
+ sgn = sgn[()] if (sgn is not None and sgn.ndim == 0) else sgn
+
+ return (out, sgn) if return_sign else out
+
+
+def _wrap_radians(x, *, xp):
+ # Wrap radians to (-pi, pi] interval
+ wrapped = -((-x + xp.pi) % (2 * xp.pi) - xp.pi)
+ # preserve relative precision
+ no_wrap = xp.abs(x) < xp.pi
+ return xp.where(no_wrap, x, wrapped)
+
+
+def _elements_and_indices_with_max_real(a, *, axis=-1, xp):
+ # This is an array-API compatible `max` function that works something
+ # like `np.max` for complex input. The important part is that it finds
+ # the element with maximum real part. When there are multiple complex values
+ # with this real part, it doesn't matter which we choose.
+ # We could use `argmax` on real component, but array API doesn't yet have
+ # `take_along_axis`, and even if it did, we would have problems with axis tuples.
+ # Feel free to rewrite! It's ugly, but it's not the purpose of the PR, and
+ # it gets the job done.
+
+ if xp.isdtype(a.dtype, "complex floating"):
+ # select all elements with max real part.
+ real_a = xp.real(a)
+ max_ = xp.max(real_a, axis=axis, keepdims=True)
+ mask = real_a == max_
+
+ # Of those, choose one arbitrarily. This is a reasonably
+ # simple, array-API compatible way of doing so that doesn't
+ # have a problem with `axis` being a tuple or None.
+ i = xp.reshape(xp.arange(xp_size(a), device=xp_device(a)), a.shape)
+ i = xpx.at(i, ~mask).set(-1)
+ max_i = xp.max(i, axis=axis, keepdims=True)
+ mask = i == max_i
+ a = xp.where(mask, a, 0.)
+ max_ = xp.sum(a, axis=axis, dtype=a.dtype, keepdims=True)
+ else:
+ max_ = xp.max(a, axis=axis, keepdims=True)
+ mask = a == max_
+
+ return max_, mask
+
+
+def _logsumexp(a, b, *, axis, return_sign, xp):
+ # This has been around for about a decade, so let's consider it a feature:
+ # Even if element of `a` is infinite or NaN, it adds nothing to the sum if
+ # the corresponding weight is zero.
+ if b is not None:
+ a = xpx.at(a, b == 0).set(-xp.inf, copy=True)
+
+ # Find element with maximum real part, since this is what affects the magnitude
+ # of the exponential. Possible enhancement: include log of `b` magnitude in `a`.
+ a_max, i_max = _elements_and_indices_with_max_real(a, axis=axis, xp=xp)
+
+ # for precision, these terms are separated out of the main sum.
+ a = xpx.at(a, i_max).set(-xp.inf, copy=True if b is None else None)
+ i_max_dt = xp.astype(i_max, a.dtype)
+ # This is an inefficient way of getting `m` because it is the sum of a sparse
+ # array; however, this is the simplest way I can think of to get the right shape.
+ b_i_max = i_max_dt if b is None else b * i_max_dt
+ m = xp.sum(b_i_max, axis=axis, keepdims=True, dtype=a.dtype)
+
+ # Shift, exponentiate, scale, and sum
+ exp = b * xp.exp(a - a_max) if b is not None else xp.exp(a - a_max)
+ s = xp.sum(exp, axis=axis, keepdims=True, dtype=exp.dtype)
+ s = xp.where(s == 0, s, s/m)
+
+ # Separate sign/magnitude information
+ # Originally, this was only performed if `return_sign=True`.
+ # However, this is also needed if any elements of `m < 0` or `s < -1`.
+ # An improvement would be to perform the calculations only on these entries.
+
+ sgn = xp.sign(s + 1) * xp.sign(m)
+
+ if xp.isdtype(s.dtype, "real floating"):
+ # The log functions need positive arguments
+ s = xp.where(s < -1, -s - 2, s)
+ m = xp.abs(m)
+ else:
+ # `a_max` can have a sign component for complex input
+ sgn = sgn * xp.exp(xp.imag(a_max) * 1.0j)
+
+ # Take log and undo shift
+ out = xp.log1p(s) + xp.log(m) + a_max
+
+ if return_sign:
+ out = xp.real(out)
+ elif xp.isdtype(out.dtype, 'real floating'):
+ out = xpx.at(out)[sgn < 0].set(xp.nan)
+
+ return out, sgn
+
+
+@xp_capabilities()
+def softmax(x, axis=None):
+ r"""Compute the softmax function.
+
+ The softmax function transforms each element of a collection by
+ computing the exponential of each element divided by the sum of the
+ exponentials of all the elements. That is, if `x` is a one-dimensional
+ numpy array::
+
+ softmax(x) = np.exp(x)/sum(np.exp(x))
+
+ Parameters
+ ----------
+ x : array_like
+ Input array.
+ axis : int or tuple of ints, optional
+ Axis to compute values along. Default is None and softmax will be
+ computed over the entire array `x`.
+
+ Returns
+ -------
+ s : ndarray
+ An array the same shape as `x`. The result will sum to 1 along the
+ specified axis.
+
+ Notes
+ -----
+ The formula for the softmax function :math:`\sigma(x)` for a vector
+ :math:`x = \{x_0, x_1, ..., x_{n-1}\}` is
+
+ .. math:: \sigma(x)_j = \frac{e^{x_j}}{\sum_k e^{x_k}}
+
+ The `softmax` function is the gradient of `logsumexp`.
+
+ The implementation uses shifting to avoid overflow. See [1]_ for more
+ details.
+
+ .. versionadded:: 1.2.0
+
+ References
+ ----------
+ .. [1] P. Blanchard, D.J. Higham, N.J. Higham, "Accurately computing the
+ log-sum-exp and softmax functions", IMA Journal of Numerical Analysis,
+ Vol.41(4), :doi:`10.1093/imanum/draa038`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import softmax
+ >>> np.set_printoptions(precision=5)
+
+ >>> x = np.array([[1, 0.5, 0.2, 3],
+ ... [1, -1, 7, 3],
+ ... [2, 12, 13, 3]])
+ ...
+
+ Compute the softmax transformation over the entire array.
+
+ >>> m = softmax(x)
+ >>> m
+ array([[ 4.48309e-06, 2.71913e-06, 2.01438e-06, 3.31258e-05],
+ [ 4.48309e-06, 6.06720e-07, 1.80861e-03, 3.31258e-05],
+ [ 1.21863e-05, 2.68421e-01, 7.29644e-01, 3.31258e-05]])
+
+ >>> m.sum()
+ 1.0
+
+ Compute the softmax transformation along the first axis (i.e., the
+ columns).
+
+ >>> m = softmax(x, axis=0)
+
+ >>> m
+ array([[ 2.11942e-01, 1.01300e-05, 2.75394e-06, 3.33333e-01],
+ [ 2.11942e-01, 2.26030e-06, 2.47262e-03, 3.33333e-01],
+ [ 5.76117e-01, 9.99988e-01, 9.97525e-01, 3.33333e-01]])
+
+ >>> m.sum(axis=0)
+ array([ 1., 1., 1., 1.])
+
+ Compute the softmax transformation along the second axis (i.e., the rows).
+
+ >>> m = softmax(x, axis=1)
+ >>> m
+ array([[ 1.05877e-01, 6.42177e-02, 4.75736e-02, 7.82332e-01],
+ [ 2.42746e-03, 3.28521e-04, 9.79307e-01, 1.79366e-02],
+ [ 1.22094e-05, 2.68929e-01, 7.31025e-01, 3.31885e-05]])
+
+ >>> m.sum(axis=1)
+ array([ 1., 1., 1.])
+
+ """
+ xp = array_namespace(x)
+ x = xp.asarray(x)
+ x_max = xp.max(x, axis=axis, keepdims=True)
+ exp_x_shifted = xp.exp(x - x_max)
+ return exp_x_shifted / xp.sum(exp_x_shifted, axis=axis, keepdims=True)
+
+
+@xp_capabilities()
+def log_softmax(x, axis=None):
+ r"""Compute the logarithm of the softmax function.
+
+ In principle::
+
+ log_softmax(x) = log(softmax(x))
+
+ but using a more accurate implementation.
+
+ Parameters
+ ----------
+ x : array_like
+ Input array.
+ axis : int or tuple of ints, optional
+ Axis to compute values along. Default is None and softmax will be
+ computed over the entire array `x`.
+
+ Returns
+ -------
+ s : ndarray or scalar
+ An array with the same shape as `x`. Exponential of the result will
+ sum to 1 along the specified axis. If `x` is a scalar, a scalar is
+ returned.
+
+ Notes
+ -----
+ `log_softmax` is more accurate than ``np.log(softmax(x))`` with inputs that
+ make `softmax` saturate (see examples below).
+
+ .. versionadded:: 1.5.0
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import log_softmax
+ >>> from scipy.special import softmax
+ >>> np.set_printoptions(precision=5)
+
+ >>> x = np.array([1000.0, 1.0])
+
+ >>> y = log_softmax(x)
+ >>> y
+ array([ 0., -999.])
+
+ >>> with np.errstate(divide='ignore'):
+ ... y = np.log(softmax(x))
+ ...
+ >>> y
+ array([ 0., -inf])
+
+ """
+ xp = array_namespace(x)
+ x = xp.asarray(x)
+
+ x_max = xp.max(x, axis=axis, keepdims=True)
+
+ if x_max.ndim > 0:
+ x_max = xpx.at(x_max, ~xp.isfinite(x_max)).set(0)
+ elif not xp.isfinite(x_max):
+ x_max = 0
+
+ tmp = x - x_max
+ exp_tmp = xp.exp(tmp)
+
+ # suppress warnings about log of zero
+ with np.errstate(divide='ignore'):
+ s = xp.sum(exp_tmp, axis=axis, keepdims=True)
+ out = xp.log(s)
+
+ return tmp - out
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_mptestutils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_mptestutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e519093dface79e21f16d7063541ad107f5ca96
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_mptestutils.py
@@ -0,0 +1,453 @@
+import os
+import sys
+import time
+from itertools import zip_longest
+
+import numpy as np
+from numpy.testing import assert_
+import pytest
+
+from scipy.special._testutils import assert_func_equal
+
+try:
+ import mpmath
+except ImportError:
+ pass
+
+
+# ------------------------------------------------------------------------------
+# Machinery for systematic tests with mpmath
+# ------------------------------------------------------------------------------
+
+class Arg:
+ """Generate a set of numbers on the real axis, concentrating on
+ 'interesting' regions and covering all orders of magnitude.
+
+ """
+
+ def __init__(self, a=-np.inf, b=np.inf, inclusive_a=True, inclusive_b=True):
+ if a > b:
+ raise ValueError("a should be less than or equal to b")
+ if a == -np.inf:
+ a = -0.5*np.finfo(float).max
+ if b == np.inf:
+ b = 0.5*np.finfo(float).max
+ self.a, self.b = a, b
+
+ self.inclusive_a, self.inclusive_b = inclusive_a, inclusive_b
+
+ def _positive_values(self, a, b, n):
+ if a < 0:
+ raise ValueError("a should be positive")
+
+ # Try to put half of the points into a linspace between a and
+ # 10 the other half in a logspace.
+ if n % 2 == 0:
+ nlogpts = n//2
+ nlinpts = nlogpts
+ else:
+ nlogpts = n//2
+ nlinpts = nlogpts + 1
+
+ if a >= 10:
+ # Outside of linspace range; just return a logspace.
+ pts = np.logspace(np.log10(a), np.log10(b), n)
+ elif a > 0 and b < 10:
+ # Outside of logspace range; just return a linspace
+ pts = np.linspace(a, b, n)
+ elif a > 0:
+ # Linspace between a and 10 and a logspace between 10 and
+ # b.
+ linpts = np.linspace(a, 10, nlinpts, endpoint=False)
+ logpts = np.logspace(1, np.log10(b), nlogpts)
+ pts = np.hstack((linpts, logpts))
+ elif a == 0 and b <= 10:
+ # Linspace between 0 and b and a logspace between 0 and
+ # the smallest positive point of the linspace
+ linpts = np.linspace(0, b, nlinpts)
+ if linpts.size > 1:
+ right = np.log10(linpts[1])
+ else:
+ right = -30
+ logpts = np.logspace(-30, right, nlogpts, endpoint=False)
+ pts = np.hstack((logpts, linpts))
+ else:
+ # Linspace between 0 and 10, logspace between 0 and the
+ # smallest positive point of the linspace, and a logspace
+ # between 10 and b.
+ if nlogpts % 2 == 0:
+ nlogpts1 = nlogpts//2
+ nlogpts2 = nlogpts1
+ else:
+ nlogpts1 = nlogpts//2
+ nlogpts2 = nlogpts1 + 1
+ linpts = np.linspace(0, 10, nlinpts, endpoint=False)
+ if linpts.size > 1:
+ right = np.log10(linpts[1])
+ else:
+ right = -30
+ logpts1 = np.logspace(-30, right, nlogpts1, endpoint=False)
+ logpts2 = np.logspace(1, np.log10(b), nlogpts2)
+ pts = np.hstack((logpts1, linpts, logpts2))
+
+ return np.sort(pts)
+
+ def values(self, n):
+ """Return an array containing n numbers."""
+ a, b = self.a, self.b
+ if a == b:
+ return np.zeros(n)
+
+ if not self.inclusive_a:
+ n += 1
+ if not self.inclusive_b:
+ n += 1
+
+ if n % 2 == 0:
+ n1 = n//2
+ n2 = n1
+ else:
+ n1 = n//2
+ n2 = n1 + 1
+
+ if a >= 0:
+ pospts = self._positive_values(a, b, n)
+ negpts = []
+ elif b <= 0:
+ pospts = []
+ negpts = -self._positive_values(-b, -a, n)
+ else:
+ pospts = self._positive_values(0, b, n1)
+ negpts = -self._positive_values(0, -a, n2 + 1)
+ # Don't want to get zero twice
+ negpts = negpts[1:]
+ pts = np.hstack((negpts[::-1], pospts))
+
+ if not self.inclusive_a:
+ pts = pts[1:]
+ if not self.inclusive_b:
+ pts = pts[:-1]
+ return pts
+
+
+class FixedArg:
+ def __init__(self, values):
+ self._values = np.asarray(values)
+
+ def values(self, n):
+ return self._values
+
+
+class ComplexArg:
+ def __init__(self, a=complex(-np.inf, -np.inf), b=complex(np.inf, np.inf)):
+ self.real = Arg(a.real, b.real)
+ self.imag = Arg(a.imag, b.imag)
+
+ def values(self, n):
+ m = int(np.floor(np.sqrt(n)))
+ x = self.real.values(m)
+ y = self.imag.values(m + 1)
+ return (x[:,None] + 1j*y[None,:]).ravel()
+
+
+class IntArg:
+ def __init__(self, a=-1000, b=1000):
+ self.a = a
+ self.b = b
+
+ def values(self, n):
+ v1 = Arg(self.a, self.b).values(max(1 + n//2, n-5)).astype(int)
+ v2 = np.arange(-5, 5)
+ v = np.unique(np.r_[v1, v2])
+ v = v[(v >= self.a) & (v < self.b)]
+ return v
+
+
+def get_args(argspec, n):
+ if isinstance(argspec, np.ndarray):
+ args = argspec.copy()
+ else:
+ nargs = len(argspec)
+ ms = np.asarray(
+ [1.5 if isinstance(spec, ComplexArg) else 1.0 for spec in argspec]
+ )
+ ms = (n**(ms/sum(ms))).astype(int) + 1
+
+ args = [spec.values(m) for spec, m in zip(argspec, ms)]
+ args = np.array(np.broadcast_arrays(*np.ix_(*args))).reshape(nargs, -1).T
+
+ return args
+
+
+class MpmathData:
+ def __init__(self, scipy_func, mpmath_func, arg_spec, name=None,
+ dps=None, prec=None, n=None, rtol=1e-7, atol=1e-300,
+ ignore_inf_sign=False, distinguish_nan_and_inf=True,
+ nan_ok=True, param_filter=None):
+
+ # mpmath tests are really slow (see gh-6989). Use a small number of
+ # points by default, increase back to 5000 (old default) if XSLOW is
+ # set
+ if n is None:
+ try:
+ is_xslow = int(os.environ.get('SCIPY_XSLOW', '0'))
+ except ValueError:
+ is_xslow = False
+
+ n = 5000 if is_xslow else 500
+
+ self.scipy_func = scipy_func
+ self.mpmath_func = mpmath_func
+ self.arg_spec = arg_spec
+ self.dps = dps
+ self.prec = prec
+ self.n = n
+ self.rtol = rtol
+ self.atol = atol
+ self.ignore_inf_sign = ignore_inf_sign
+ self.nan_ok = nan_ok
+ if isinstance(self.arg_spec, np.ndarray):
+ self.is_complex = np.issubdtype(self.arg_spec.dtype, np.complexfloating)
+ else:
+ self.is_complex = any(
+ [isinstance(arg, ComplexArg) for arg in self.arg_spec]
+ )
+ self.ignore_inf_sign = ignore_inf_sign
+ self.distinguish_nan_and_inf = distinguish_nan_and_inf
+ if not name or name == '':
+ name = getattr(scipy_func, '__name__', None)
+ if not name or name == '':
+ name = getattr(mpmath_func, '__name__', None)
+ self.name = name
+ self.param_filter = param_filter
+
+ def check(self):
+ np.random.seed(1234)
+
+ # Generate values for the arguments
+ argarr = get_args(self.arg_spec, self.n)
+
+ # Check
+ old_dps, old_prec = mpmath.mp.dps, mpmath.mp.prec
+ try:
+ if self.dps is not None:
+ dps_list = [self.dps]
+ else:
+ dps_list = [20]
+ if self.prec is not None:
+ mpmath.mp.prec = self.prec
+
+ # Proper casting of mpmath input and output types. Using
+ # native mpmath types as inputs gives improved precision
+ # in some cases.
+ if np.issubdtype(argarr.dtype, np.complexfloating):
+ pytype = mpc2complex
+
+ def mptype(x):
+ return mpmath.mpc(complex(x))
+ else:
+ def mptype(x):
+ return mpmath.mpf(float(x))
+
+ def pytype(x):
+ if abs(x.imag) > 1e-16*(1 + abs(x.real)):
+ return np.nan
+ else:
+ return mpf2float(x.real)
+
+ # Try out different dps until one (or none) works
+ for j, dps in enumerate(dps_list):
+ mpmath.mp.dps = dps
+
+ try:
+ assert_func_equal(
+ self.scipy_func,
+ lambda *a: pytype(self.mpmath_func(*map(mptype, a))),
+ argarr,
+ vectorized=False,
+ rtol=self.rtol,
+ atol=self.atol,
+ ignore_inf_sign=self.ignore_inf_sign,
+ distinguish_nan_and_inf=self.distinguish_nan_and_inf,
+ nan_ok=self.nan_ok,
+ param_filter=self.param_filter
+ )
+ break
+ except AssertionError:
+ if j >= len(dps_list)-1:
+ # reraise the Exception
+ tp, value, tb = sys.exc_info()
+ if value.__traceback__ is not tb:
+ raise value.with_traceback(tb)
+ raise value
+ finally:
+ mpmath.mp.dps, mpmath.mp.prec = old_dps, old_prec
+
+ def __repr__(self):
+ if self.is_complex:
+ return f""
+ else:
+ return f""
+
+
+def assert_mpmath_equal(*a, **kw):
+ d = MpmathData(*a, **kw)
+ d.check()
+
+
+def nonfunctional_tooslow(func):
+ return pytest.mark.skip(
+ reason=" Test not yet functional (too slow), needs more work."
+ )(func)
+
+
+# ------------------------------------------------------------------------------
+# Tools for dealing with mpmath quirks
+# ------------------------------------------------------------------------------
+
+def mpf2float(x):
+ """
+ Convert an mpf to the nearest floating point number. Just using
+ float directly doesn't work because of results like this:
+
+ with mp.workdps(50):
+ float(mpf("0.99999999999999999")) = 0.9999999999999999
+
+ """
+ return float(mpmath.nstr(x, 17, min_fixed=0, max_fixed=0))
+
+
+def mpc2complex(x):
+ return complex(mpf2float(x.real), mpf2float(x.imag))
+
+
+def trace_args(func):
+ def tofloat(x):
+ if isinstance(x, mpmath.mpc):
+ return complex(x)
+ else:
+ return float(x)
+
+ def wrap(*a, **kw):
+ sys.stderr.write(f"{tuple(map(tofloat, a))!r}: ")
+ sys.stderr.flush()
+ try:
+ r = func(*a, **kw)
+ sys.stderr.write(f"-> {r!r}")
+ finally:
+ sys.stderr.write("\n")
+ sys.stderr.flush()
+ return r
+ return wrap
+
+
+try:
+ import signal
+ POSIX = ('setitimer' in dir(signal))
+except ImportError:
+ POSIX = False
+
+
+class TimeoutError(Exception):
+ pass
+
+
+def time_limited(timeout=0.5, return_val=np.nan, use_sigalrm=True):
+ """
+ Decorator for setting a timeout for pure-Python functions.
+
+ If the function does not return within `timeout` seconds, the
+ value `return_val` is returned instead.
+
+ On POSIX this uses SIGALRM by default. On non-POSIX, settrace is
+ used. Do not use this with threads: the SIGALRM implementation
+ does probably not work well. The settrace implementation only
+ traces the current thread.
+
+ The settrace implementation slows down execution speed. Slowdown
+ by a factor around 10 is probably typical.
+ """
+ if POSIX and use_sigalrm:
+ def sigalrm_handler(signum, frame):
+ raise TimeoutError()
+
+ def deco(func):
+ def wrap(*a, **kw):
+ old_handler = signal.signal(signal.SIGALRM, sigalrm_handler)
+ signal.setitimer(signal.ITIMER_REAL, timeout)
+ try:
+ return func(*a, **kw)
+ except TimeoutError:
+ return return_val
+ finally:
+ signal.setitimer(signal.ITIMER_REAL, 0)
+ signal.signal(signal.SIGALRM, old_handler)
+ return wrap
+ else:
+ def deco(func):
+ def wrap(*a, **kw):
+ start_time = time.time()
+
+ def trace(frame, event, arg):
+ if time.time() - start_time > timeout:
+ raise TimeoutError()
+ return trace
+ sys.settrace(trace)
+ try:
+ return func(*a, **kw)
+ except TimeoutError:
+ sys.settrace(None)
+ return return_val
+ finally:
+ sys.settrace(None)
+ return wrap
+ return deco
+
+
+def exception_to_nan(func):
+ """Decorate function to return nan if it raises an exception"""
+ def wrap(*a, **kw):
+ try:
+ return func(*a, **kw)
+ except Exception:
+ return np.nan
+ return wrap
+
+
+def inf_to_nan(func):
+ """Decorate function to return nan if it returns inf"""
+ def wrap(*a, **kw):
+ v = func(*a, **kw)
+ if not np.isfinite(v):
+ return np.nan
+ return v
+ return wrap
+
+
+def mp_assert_allclose(res, std, atol=0, rtol=1e-17):
+ """
+ Compare lists of mpmath.mpf's or mpmath.mpc's directly so that it
+ can be done to higher precision than double.
+ """
+ failures = []
+ for k, (resval, stdval) in enumerate(zip_longest(res, std)):
+ if resval is None or stdval is None:
+ raise ValueError('Lengths of inputs res and std are not equal.')
+ if mpmath.fabs(resval - stdval) > atol + rtol*mpmath.fabs(stdval):
+ failures.append((k, resval, stdval))
+
+ nfail = len(failures)
+ if nfail > 0:
+ ndigits = int(abs(np.log10(rtol)))
+ msg = [""]
+ msg.append(f"Bad results ({nfail} out of {k + 1}) for the following points:")
+ for k, resval, stdval in failures:
+ resrep = mpmath.nstr(resval, ndigits, min_fixed=0, max_fixed=0)
+ stdrep = mpmath.nstr(stdval, ndigits, min_fixed=0, max_fixed=0)
+ if stdval == 0:
+ rdiff = "inf"
+ else:
+ rdiff = mpmath.fabs((resval - stdval)/stdval)
+ rdiff = mpmath.nstr(rdiff, 3)
+ msg.append(f"{k}: {resrep} != {stdrep} (rdiff {rdiff})")
+ assert_(False, "\n".join(msg))
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_multiufuncs.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_multiufuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..10c77e0925c766597fdf9c9aa7fc0a65de0cdd3e
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_multiufuncs.py
@@ -0,0 +1,629 @@
+import collections
+import numbers
+import numpy as np
+
+from ._input_validation import _nonneg_int_or_fail
+
+from ._special_ufuncs import (legendre_p, assoc_legendre_p,
+ sph_legendre_p, sph_harm_y)
+from ._gufuncs import (legendre_p_all, assoc_legendre_p_all,
+ sph_legendre_p_all, sph_harm_y_all)
+
+__all__ = [
+ "assoc_legendre_p",
+ "assoc_legendre_p_all",
+ "legendre_p",
+ "legendre_p_all",
+ "sph_harm_y",
+ "sph_harm_y_all",
+ "sph_legendre_p",
+ "sph_legendre_p_all",
+]
+
+
+class MultiUFunc:
+ def __init__(self, ufunc_or_ufuncs, name=None, doc=None, *,
+ force_complex_output=False, **default_kwargs):
+ if not isinstance(ufunc_or_ufuncs, np.ufunc):
+ if isinstance(ufunc_or_ufuncs, collections.abc.Mapping):
+ ufuncs_iter = ufunc_or_ufuncs.values()
+ elif isinstance(ufunc_or_ufuncs, collections.abc.Iterable):
+ ufuncs_iter = ufunc_or_ufuncs
+ else:
+ raise ValueError("ufunc_or_ufuncs should be a ufunc or a"
+ " ufunc collection")
+
+ # Perform input validation to ensure all ufuncs in ufuncs are
+ # actually ufuncs and all take the same input types.
+ seen_input_types = set()
+ for ufunc in ufuncs_iter:
+ if not isinstance(ufunc, np.ufunc):
+ raise ValueError("All ufuncs must have type `numpy.ufunc`."
+ f" Received {ufunc_or_ufuncs}")
+ seen_input_types.add(frozenset(x.split("->")[0] for x in ufunc.types))
+ if len(seen_input_types) > 1:
+ raise ValueError("All ufuncs must take the same input types.")
+
+ self.__name__ = name
+ self._ufunc_or_ufuncs = ufunc_or_ufuncs
+ self.__doc = doc
+ self.__force_complex_output = force_complex_output
+ self._default_kwargs = default_kwargs
+ self._resolve_out_shapes = None
+ self._finalize_out = None
+ self._key = None
+ self._ufunc_default_args = lambda *args, **kwargs: ()
+ self._ufunc_default_kwargs = lambda *args, **kwargs: {}
+
+ @property
+ def __doc__(self):
+ return self.__doc
+
+ def _override_key(self, func):
+ """Set `key` method by decorating a function.
+ """
+ self._key = func
+
+ def _override_ufunc_default_args(self, func):
+ self._ufunc_default_args = func
+
+ def _override_ufunc_default_kwargs(self, func):
+ self._ufunc_default_kwargs = func
+
+ def _override_resolve_out_shapes(self, func):
+ """Set `resolve_out_shapes` method by decorating a function."""
+ if func.__doc__ is None:
+ func.__doc__ = \
+ """Resolve to output shapes based on relevant inputs."""
+ func.__name__ = "resolve_out_shapes"
+ self._resolve_out_shapes = func
+
+ def _override_finalize_out(self, func):
+ self._finalize_out = func
+
+ def _resolve_ufunc(self, **kwargs):
+ """Resolve to a ufunc based on keyword arguments."""
+
+ if isinstance(self._ufunc_or_ufuncs, np.ufunc):
+ return self._ufunc_or_ufuncs
+
+ ufunc_key = self._key(**kwargs)
+ return self._ufunc_or_ufuncs[ufunc_key]
+
+ def __call__(self, *args, **kwargs):
+ kwargs = self._default_kwargs | kwargs
+
+ args += self._ufunc_default_args(**kwargs)
+
+ ufunc = self._resolve_ufunc(**kwargs)
+
+ # array arguments to be passed to the ufunc
+ ufunc_args = [np.asarray(arg) for arg in args[-ufunc.nin:]]
+
+ ufunc_kwargs = self._ufunc_default_kwargs(**kwargs)
+
+ if (self._resolve_out_shapes is not None):
+ ufunc_arg_shapes = tuple(np.shape(ufunc_arg) for ufunc_arg in ufunc_args)
+ ufunc_out_shapes = self._resolve_out_shapes(*args[:-ufunc.nin],
+ *ufunc_arg_shapes, ufunc.nout,
+ **kwargs)
+
+ ufunc_arg_dtypes = tuple(ufunc_arg.dtype if hasattr(ufunc_arg, 'dtype')
+ else np.dtype(type(ufunc_arg))
+ for ufunc_arg in ufunc_args)
+
+ if hasattr(ufunc, 'resolve_dtypes'):
+ ufunc_dtypes = ufunc_arg_dtypes + ufunc.nout * (None,)
+ ufunc_dtypes = ufunc.resolve_dtypes(ufunc_dtypes)
+ ufunc_out_dtypes = ufunc_dtypes[-ufunc.nout:]
+ else:
+ ufunc_out_dtype = np.result_type(*ufunc_arg_dtypes)
+ if (not np.issubdtype(ufunc_out_dtype, np.inexact)):
+ ufunc_out_dtype = np.float64
+
+ ufunc_out_dtypes = ufunc.nout * (ufunc_out_dtype,)
+
+ if self.__force_complex_output:
+ ufunc_out_dtypes = tuple(np.result_type(1j, ufunc_out_dtype)
+ for ufunc_out_dtype in ufunc_out_dtypes)
+
+ out = tuple(np.empty(ufunc_out_shape, dtype=ufunc_out_dtype)
+ for ufunc_out_shape, ufunc_out_dtype
+ in zip(ufunc_out_shapes, ufunc_out_dtypes))
+
+ ufunc_kwargs['out'] = out
+
+ out = ufunc(*ufunc_args, **ufunc_kwargs)
+ if (self._finalize_out is not None):
+ out = self._finalize_out(out)
+
+ return out
+
+
+sph_legendre_p = MultiUFunc(
+ sph_legendre_p,
+ "sph_legendre_p",
+ r"""sph_legendre_p(n, m, theta, *, diff_n=0)
+
+ Spherical Legendre polynomial of the first kind.
+
+ Parameters
+ ----------
+ n : ArrayLike[int]
+ Degree of the spherical Legendre polynomial. Must have ``n >= 0``.
+ m : ArrayLike[int]
+ Order of the spherical Legendre polynomial.
+ theta : ArrayLike[float]
+ Input value.
+ diff_n : Optional[int]
+ A non-negative integer. Compute and return all derivatives up
+ to order ``diff_n``. Default is 0.
+
+ Returns
+ -------
+ p : ndarray or tuple[ndarray]
+ Spherical Legendre polynomial with ``diff_n`` derivatives.
+
+ Notes
+ -----
+ The spherical counterpart of an (unnormalized) associated Legendre polynomial has
+ the additional factor
+
+ .. math::
+
+ \sqrt{\frac{(2 n + 1) (n - m)!}{4 \pi (n + m)!}}
+
+ It is the same as the spherical harmonic :math:`Y_{n}^{m}(\theta, \phi)`
+ with :math:`\phi = 0`.
+ """, diff_n=0
+)
+
+
+@sph_legendre_p._override_key
+def _(diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@sph_legendre_p._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+sph_legendre_p_all = MultiUFunc(
+ sph_legendre_p_all,
+ "sph_legendre_p_all",
+ """sph_legendre_p_all(n, m, theta, *, diff_n=0)
+
+ All spherical Legendre polynomials of the first kind up to the
+ specified degree ``n``, order ``m``, and all derivatives up
+ to order ``diff_n``.
+
+ Output shape is ``(diff_n + 1, n + 1, 2 * m + 1, ...)``. The entry at
+ ``(i, j, k)`` corresponds to the ``i``-th derivative, degree ``j``, and
+ order ``k`` for all ``0 <= i <= diff_n``, ``0 <= j <= n``, and
+ ``-m <= k <= m``.
+
+ See Also
+ --------
+ sph_legendre_p
+ """, diff_n=0
+)
+
+
+@sph_legendre_p_all._override_key
+def _(diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@sph_legendre_p_all._override_ufunc_default_kwargs
+def _(diff_n):
+ return {'axes': [()] + [(0, 1, -1)]}
+
+
+@sph_legendre_p_all._override_resolve_out_shapes
+def _(n, m, theta_shape, nout, diff_n):
+ if not isinstance(n, numbers.Integral) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+
+ return ((n + 1, 2 * abs(m) + 1) + theta_shape + (diff_n + 1,),)
+
+
+@sph_legendre_p_all._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+assoc_legendre_p = MultiUFunc(
+ assoc_legendre_p,
+ "assoc_legendre_p",
+ r"""assoc_legendre_p(n, m, z, *, branch_cut=2, norm=False, diff_n=0)
+
+ Associated Legendre polynomial of the first kind.
+
+ Parameters
+ ----------
+ n : ArrayLike[int]
+ Degree of the associated Legendre polynomial. Must have ``n >= 0``.
+ m : ArrayLike[int]
+ order of the associated Legendre polynomial.
+ z : ArrayLike[float | complex]
+ Input value.
+ branch_cut : Optional[ArrayLike[int]]
+ Selects branch cut. Must be 2 (default) or 3.
+ 2: cut on the real axis ``|z| > 1``
+ 3: cut on the real axis ``-1 < z < 1``
+ norm : Optional[bool]
+ If ``True``, compute the normalized associated Legendre polynomial.
+ Default is ``False``.
+ diff_n : Optional[int]
+ A non-negative integer. Compute and return all derivatives up
+ to order ``diff_n``. Default is 0.
+
+ Returns
+ -------
+ p : ndarray or tuple[ndarray]
+ Associated Legendre polynomial with ``diff_n`` derivatives.
+
+ Notes
+ -----
+ The normalized counterpart of an (unnormalized) associated Legendre
+ polynomial has the additional factor
+
+ .. math::
+
+ \sqrt{\frac{(2 n + 1) (n - m)!}{2 (n + m)!}}
+ """, branch_cut=2, norm=False, diff_n=0
+)
+
+
+@assoc_legendre_p._override_key
+def _(branch_cut, norm, diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return norm, diff_n
+
+
+@assoc_legendre_p._override_ufunc_default_args
+def _(branch_cut, norm, diff_n):
+ return branch_cut,
+
+
+@assoc_legendre_p._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+assoc_legendre_p_all = MultiUFunc(
+ assoc_legendre_p_all,
+ "assoc_legendre_p_all",
+ """assoc_legendre_p_all(n, m, z, *, branch_cut=2, norm=False, diff_n=0)
+
+ All associated Legendre polynomials of the first kind up to the
+ specified degree ``n``, order ``m``, and all derivatives up
+ to order ``diff_n``.
+
+ Output shape is ``(diff_n + 1, n + 1, 2 * m + 1, ...)``. The entry at
+ ``(i, j, k)`` corresponds to the ``i``-th derivative, degree ``j``, and
+ order ``k`` for all ``0 <= i <= diff_n``, ``0 <= j <= n``, and
+ ``-m <= k <= m``.
+
+ See Also
+ --------
+ assoc_legendre_p
+ """, branch_cut=2, norm=False, diff_n=0
+)
+
+
+@assoc_legendre_p_all._override_key
+def _(branch_cut, norm, diff_n):
+ if not ((isinstance(diff_n, numbers.Integral))
+ and diff_n >= 0):
+ raise ValueError(
+ f"diff_n must be a non-negative integer, received: {diff_n}."
+ )
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return norm, diff_n
+
+
+@assoc_legendre_p_all._override_ufunc_default_args
+def _(branch_cut, norm, diff_n):
+ return branch_cut,
+
+
+@assoc_legendre_p_all._override_ufunc_default_kwargs
+def _(branch_cut, norm, diff_n):
+ return {'axes': [(), ()] + [(0, 1, -1)]}
+
+
+@assoc_legendre_p_all._override_resolve_out_shapes
+def _(n, m, z_shape, branch_cut_shape, nout, **kwargs):
+ diff_n = kwargs['diff_n']
+
+ if not isinstance(n, numbers.Integral) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+ if not isinstance(m, numbers.Integral) or (m < 0):
+ raise ValueError("m must be a non-negative integer.")
+
+ return ((n + 1, 2 * abs(m) + 1) +
+ np.broadcast_shapes(z_shape, branch_cut_shape) + (diff_n + 1,),)
+
+
+@assoc_legendre_p_all._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+legendre_p = MultiUFunc(
+ legendre_p,
+ "legendre_p",
+ """legendre_p(n, z, *, diff_n=0)
+
+ Legendre polynomial of the first kind.
+
+ Parameters
+ ----------
+ n : ArrayLike[int]
+ Degree of the Legendre polynomial. Must have ``n >= 0``.
+ z : ArrayLike[float]
+ Input value.
+ diff_n : Optional[int]
+ A non-negative integer. Compute and return all derivatives up
+ to order ``diff_n``. Default is 0.
+
+ Returns
+ -------
+ p : ndarray or tuple[ndarray]
+ Legendre polynomial with ``diff_n`` derivatives.
+
+ See Also
+ --------
+ legendre
+
+ References
+ ----------
+ .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
+ Functions", John Wiley and Sons, 1996.
+ https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
+ """, diff_n=0
+)
+
+
+@legendre_p._override_key
+def _(diff_n):
+ if (not isinstance(diff_n, numbers.Integral)) or (diff_n < 0):
+ raise ValueError(
+ f"diff_n must be a non-negative integer, received: {diff_n}."
+ )
+ if not 0 <= diff_n <= 2:
+ raise NotImplementedError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@legendre_p._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+legendre_p_all = MultiUFunc(
+ legendre_p_all,
+ "legendre_p_all",
+ """legendre_p_all(n, z, *, diff_n=0)
+
+ All Legendre polynomials of the first kind up to the specified degree
+ ``n`` and all derivatives up to order ``diff_n``.
+
+ Output shape is ``(diff_n + 1, n + 1, ...)``. The entry at ``(i, j)``
+ corresponds to the ``i``-th derivative and degree ``j`` for all
+ ``0 <= i <= diff_n`` and ``0 <= j <= n``.
+
+ See Also
+ --------
+ legendre_p
+ """, diff_n=0
+)
+
+
+@legendre_p_all._override_key
+def _(diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@legendre_p_all._override_ufunc_default_kwargs
+def _(diff_n):
+ return {'axes': [(), (0, -1)]}
+
+
+@legendre_p_all._override_resolve_out_shapes
+def _(n, z_shape, nout, diff_n):
+ n = _nonneg_int_or_fail(n, 'n', strict=False)
+
+ return nout * ((n + 1,) + z_shape + (diff_n + 1,),)
+
+
+@legendre_p_all._override_finalize_out
+def _(out):
+ return np.moveaxis(out, -1, 0)
+
+
+sph_harm_y = MultiUFunc(
+ sph_harm_y,
+ "sph_harm_y",
+ r"""sph_harm_y(n, m, theta, phi, *, diff_n=0)
+
+ Spherical harmonics. They are defined as
+
+ .. math::
+
+ Y_n^m(\theta,\phi) = \sqrt{\frac{2 n + 1}{4 \pi} \frac{(n - m)!}{(n + m)!}}
+ P_n^m(\cos(\theta)) e^{i m \phi}
+
+ where :math:`P_n^m` are the (unnormalized) associated Legendre polynomials.
+
+ Parameters
+ ----------
+ n : ArrayLike[int]
+ Degree of the harmonic. Must have ``n >= 0``. This is
+ often denoted by ``l`` (lower case L) in descriptions of
+ spherical harmonics.
+ m : ArrayLike[int]
+ Order of the harmonic.
+ theta : ArrayLike[float]
+ Polar (colatitudinal) coordinate; must be in ``[0, pi]``.
+ phi : ArrayLike[float]
+ Azimuthal (longitudinal) coordinate; must be in ``[0, 2*pi]``.
+ diff_n : Optional[int]
+ A non-negative integer. Compute and return all derivatives up
+ to order ``diff_n``. Default is 0.
+
+ Returns
+ -------
+ y : ndarray[complex] or tuple[ndarray[complex]]
+ Spherical harmonics with ``diff_n`` derivatives.
+
+ Notes
+ -----
+ There are different conventions for the meanings of the input
+ arguments ``theta`` and ``phi``. In SciPy ``theta`` is the
+ polar angle and ``phi`` is the azimuthal angle. It is common to
+ see the opposite convention, that is, ``theta`` as the azimuthal angle
+ and ``phi`` as the polar angle.
+
+ Note that SciPy's spherical harmonics include the Condon-Shortley
+ phase [2]_ because it is part of `sph_legendre_p`.
+
+ With SciPy's conventions, the first several spherical harmonics
+ are
+
+ .. math::
+
+ Y_0^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{1}{\pi}} \\
+ Y_1^{-1}(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{2\pi}}
+ e^{-i\phi} \sin(\theta) \\
+ Y_1^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{\pi}}
+ \cos(\theta) \\
+ Y_1^1(\theta, \phi) &= -\frac{1}{2} \sqrt{\frac{3}{2\pi}}
+ e^{i\phi} \sin(\theta).
+
+ References
+ ----------
+ .. [1] Digital Library of Mathematical Functions, 14.30.
+ https://dlmf.nist.gov/14.30
+ .. [2] https://en.wikipedia.org/wiki/Spherical_harmonics#Condon.E2.80.93Shortley_phase
+ """, force_complex_output=True, diff_n=0
+)
+
+
+@sph_harm_y._override_key
+def _(diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 0, 1, and 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@sph_harm_y._override_finalize_out
+def _(out):
+ if (out.shape[-1] == 1):
+ return out[..., 0, 0]
+
+ if (out.shape[-1] == 2):
+ return out[..., 0, 0], out[..., [1, 0], [0, 1]]
+
+ if (out.shape[-1] == 3):
+ return (out[..., 0, 0], out[..., [1, 0], [0, 1]],
+ out[..., [[2, 1], [1, 0]], [[0, 1], [1, 2]]])
+
+
+sph_harm_y_all = MultiUFunc(
+ sph_harm_y_all,
+ "sph_harm_y_all",
+ """sph_harm_y_all(n, m, theta, phi, *, diff_n=0)
+
+ All spherical harmonics up to the specified degree ``n``, order ``m``,
+ and all derivatives up to order ``diff_n``.
+
+ Returns a tuple of length ``diff_n + 1`` (if ``diff_n > 0``). The first
+ entry corresponds to the spherical harmonics, the second entry
+ (if ``diff_n >= 1``) to the gradient, and the third entry
+ (if ``diff_n >= 2``) to the Hessian matrix. Each entry is an array of
+ shape ``(n + 1, 2 * m + 1, ...)``, where the entry at ``(i, j)``
+ corresponds to degree ``i`` and order ``j`` for all ``0 <= i <= n``
+ and ``-m <= j <= m``.
+
+ See Also
+ --------
+ sph_harm_y
+ """, force_complex_output=True, diff_n=0
+)
+
+
+@sph_harm_y_all._override_key
+def _(diff_n):
+ diff_n = _nonneg_int_or_fail(diff_n, "diff_n", strict=False)
+ if not 0 <= diff_n <= 2:
+ raise ValueError(
+ "diff_n is currently only implemented for orders 2,"
+ f" received: {diff_n}."
+ )
+ return diff_n
+
+
+@sph_harm_y_all._override_ufunc_default_kwargs
+def _(diff_n):
+ return {'axes': [(), ()] + [(0, 1, -2, -1)]}
+
+
+@sph_harm_y_all._override_resolve_out_shapes
+def _(n, m, theta_shape, phi_shape, nout, **kwargs):
+ diff_n = kwargs['diff_n']
+
+ if not isinstance(n, numbers.Integral) or (n < 0):
+ raise ValueError("n must be a non-negative integer.")
+
+ return ((n + 1, 2 * abs(m) + 1) + np.broadcast_shapes(theta_shape, phi_shape) +
+ (diff_n + 1, diff_n + 1),)
+
+
+@sph_harm_y_all._override_finalize_out
+def _(out):
+ if (out.shape[-1] == 1):
+ return out[..., 0, 0]
+
+ if (out.shape[-1] == 2):
+ return out[..., 0, 0], out[..., [1, 0], [0, 1]]
+
+ if (out.shape[-1] == 3):
+ return (out[..., 0, 0], out[..., [1, 0], [0, 1]],
+ out[..., [[2, 1], [1, 0]], [[0, 1], [1, 2]]])
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.py
new file mode 100644
index 0000000000000000000000000000000000000000..a2b93529d37b5965241c3d208004cc0c15cfd623
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.py
@@ -0,0 +1,2606 @@
+"""
+A collection of functions to find the weights and abscissas for
+Gaussian Quadrature.
+
+These calculations are done by finding the eigenvalues of a
+tridiagonal matrix whose entries are dependent on the coefficients
+in the recursion formula for the orthogonal polynomials with the
+corresponding weighting function over the interval.
+
+Many recursion relations for orthogonal polynomials are given:
+
+.. math::
+
+ a1n f_{n+1} (x) = (a2n + a3n x ) f_n (x) - a4n f_{n-1} (x)
+
+The recursion relation of interest is
+
+.. math::
+
+ P_{n+1} (x) = (x - A_n) P_n (x) - B_n P_{n-1} (x)
+
+where :math:`P` has a different normalization than :math:`f`.
+
+The coefficients can be found as:
+
+.. math::
+
+ A_n = -a2n / a3n
+ \\qquad
+ B_n = ( a4n / a3n \\sqrt{h_n-1 / h_n})^2
+
+where
+
+.. math::
+
+ h_n = \\int_a^b w(x) f_n(x)^2
+
+assume:
+
+.. math::
+
+ P_0 (x) = 1
+ \\qquad
+ P_{-1} (x) == 0
+
+For the mathematical background, see [golub.welsch-1969-mathcomp]_ and
+[abramowitz.stegun-1965]_.
+
+References
+----------
+.. [golub.welsch-1969-mathcomp]
+ Golub, Gene H, and John H Welsch. 1969. Calculation of Gauss
+ Quadrature Rules. *Mathematics of Computation* 23, 221-230+s1--s10.
+
+.. [abramowitz.stegun-1965]
+ Abramowitz, Milton, and Irene A Stegun. (1965) *Handbook of
+ Mathematical Functions: with Formulas, Graphs, and Mathematical
+ Tables*. Gaithersburg, MD: National Bureau of Standards.
+ http://www.math.sfu.ca/~cbm/aands/
+
+.. [townsend.trogdon.olver-2014]
+ Townsend, A. and Trogdon, T. and Olver, S. (2014)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*. :arXiv:`1410.5286`.
+
+.. [townsend.trogdon.olver-2015]
+ Townsend, A. and Trogdon, T. and Olver, S. (2015)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*.
+ IMA Journal of Numerical Analysis
+ :doi:`10.1093/imanum/drv002`.
+"""
+#
+# Author: Travis Oliphant 2000
+# Updated Sep. 2003 (fixed bugs --- tested to be accurate)
+
+# SciPy imports.
+import numpy as np
+from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around,
+ hstack, arccos, arange)
+from scipy.special import airy
+
+# Local imports.
+# There is no .pyi file for _specfun
+from . import _specfun # type: ignore
+from . import _ufuncs
+_gam = _ufuncs.gamma
+
+_polyfuns = ['legendre', 'chebyt', 'chebyu', 'chebyc', 'chebys',
+ 'jacobi', 'laguerre', 'genlaguerre', 'hermite',
+ 'hermitenorm', 'gegenbauer', 'sh_legendre', 'sh_chebyt',
+ 'sh_chebyu', 'sh_jacobi']
+
+# Correspondence between new and old names of root functions
+_rootfuns_map = {'roots_legendre': 'p_roots',
+ 'roots_chebyt': 't_roots',
+ 'roots_chebyu': 'u_roots',
+ 'roots_chebyc': 'c_roots',
+ 'roots_chebys': 's_roots',
+ 'roots_jacobi': 'j_roots',
+ 'roots_laguerre': 'l_roots',
+ 'roots_genlaguerre': 'la_roots',
+ 'roots_hermite': 'h_roots',
+ 'roots_hermitenorm': 'he_roots',
+ 'roots_gegenbauer': 'cg_roots',
+ 'roots_sh_legendre': 'ps_roots',
+ 'roots_sh_chebyt': 'ts_roots',
+ 'roots_sh_chebyu': 'us_roots',
+ 'roots_sh_jacobi': 'js_roots'}
+
+__all__ = _polyfuns + list(_rootfuns_map.keys())
+
+
+class orthopoly1d(np.poly1d):
+
+ def __init__(self, roots, weights=None, hn=1.0, kn=1.0, wfunc=None,
+ limits=None, monic=False, eval_func=None):
+ equiv_weights = [weights[k] / wfunc(roots[k]) for
+ k in range(len(roots))]
+ mu = sqrt(hn)
+ if monic:
+ evf = eval_func
+ if evf:
+ knn = kn
+ def eval_func(x):
+ return evf(x) / knn
+ mu = mu / abs(kn)
+ kn = 1.0
+
+ # compute coefficients from roots, then scale
+ poly = np.poly1d(roots, r=True)
+ np.poly1d.__init__(self, poly.coeffs * float(kn))
+
+ self.weights = np.array(list(zip(roots, weights, equiv_weights)))
+ self.weight_func = wfunc
+ self.limits = limits
+ self.normcoef = mu
+
+ # Note: eval_func will be discarded on arithmetic
+ self._eval_func = eval_func
+
+ def __call__(self, v):
+ if self._eval_func and not isinstance(v, np.poly1d):
+ return self._eval_func(v)
+ else:
+ return np.poly1d.__call__(self, v)
+
+ def _scale(self, p):
+ if p == 1.0:
+ return
+ self._coeffs *= p
+
+ evf = self._eval_func
+ if evf:
+ self._eval_func = lambda x: evf(x) * p
+ self.normcoef *= p
+
+
+def _gen_roots_and_weights(n, mu0, an_func, bn_func, f, df, symmetrize, mu):
+ """[x,w] = gen_roots_and_weights(n,an_func,sqrt_bn_func,mu)
+
+ Returns the roots (x) of an nth order orthogonal polynomial,
+ and weights (w) to use in appropriate Gaussian quadrature with that
+ orthogonal polynomial.
+
+ The polynomials have the recurrence relation
+ P_n+1(x) = (x - A_n) P_n(x) - B_n P_n-1(x)
+
+ an_func(n) should return A_n
+ sqrt_bn_func(n) should return sqrt(B_n)
+ mu ( = h_0 ) is the integral of the weight over the orthogonal
+ interval
+ """
+ # lazy import to prevent to prevent linalg dependency for whole module (gh-23420)
+ from scipy import linalg
+ k = np.arange(n, dtype='d')
+ c = np.zeros((2, n))
+ c[0,1:] = bn_func(k[1:])
+ c[1,:] = an_func(k)
+ x = linalg.eigvals_banded(c, overwrite_a_band=True)
+
+ # improve roots by one application of Newton's method
+ y = f(n, x)
+ dy = df(n, x)
+ x -= y/dy
+
+ # fm and dy may contain very large/small values, so we
+ # log-normalize them to maintain precision in the product fm*dy
+ fm = f(n-1, x)
+ log_fm = np.log(np.abs(fm))
+ log_dy = np.log(np.abs(dy))
+ fm /= np.exp((log_fm.max() + log_fm.min()) / 2.)
+ dy /= np.exp((log_dy.max() + log_dy.min()) / 2.)
+ w = 1.0 / (fm * dy)
+
+ if symmetrize:
+ w = (w + w[::-1]) / 2
+ x = (x - x[::-1]) / 2
+
+ w *= mu0 / w.sum()
+
+ if mu:
+ return x, w, mu0
+ else:
+ return x, w
+
+# Jacobi Polynomials 1 P^(alpha,beta)_n(x)
+
+
+def roots_jacobi(n, alpha, beta, mu=False):
+ r"""Gauss-Jacobi quadrature.
+
+ Compute the sample points and weights for Gauss-Jacobi
+ quadrature. The sample points are the roots of the nth degree
+ Jacobi polynomial, :math:`P^{\alpha, \beta}_n(x)`. These sample
+ points and weights correctly integrate polynomials of degree
+ :math:`2n - 1` or less over the interval :math:`[-1, 1]` with
+ weight function :math:`w(x) = (1 - x)^{\alpha} (1 +
+ x)^{\beta}`. See 22.2.1 in [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order.
+ alpha : float
+ alpha must be > -1
+ beta : float
+ beta must be > -1
+ mu : bool, optional
+ If True, return the sum of the weights in addition to sample points and weights.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points.
+ w : ndarray
+ Weights.
+ mu : float, optional
+ Sum of the weights, only returned if `mu=True`.
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ >>> from scipy.special import roots_jacobi
+ >>> x, w = roots_jacobi(3, 0.5, 0.5)
+ >>> x
+ array([-0.70710678, 0. , 0.70710678])
+ >>> w
+ array([0.39269908, 0.78539816, 0.39269908])
+
+ >>> x, w, mu = roots_jacobi(3, 0.5, 0.5, mu=True)
+ >>> mu
+ 1.5707963267948966 # Sum of weights, equals pi/2 for alpha = beta = 0.5
+ """
+
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+ if alpha <= -1 or beta <= -1:
+ raise ValueError("alpha and beta must be greater than -1.")
+
+ if alpha == 0.0 and beta == 0.0:
+ return roots_legendre(m, mu)
+ if alpha == beta:
+ return roots_gegenbauer(m, alpha+0.5, mu)
+
+ if (alpha + beta) <= 1000:
+ mu0 = 2.0**(alpha+beta+1) * _ufuncs.beta(alpha+1, beta+1)
+ else:
+ # Avoid overflows in pow and beta for very large parameters
+ mu0 = np.exp((alpha + beta + 1) * np.log(2.0)
+ + _ufuncs.betaln(alpha+1, beta+1))
+ a = alpha
+ b = beta
+ if a + b == 0.0:
+ def an_func(k):
+ return np.where(k == 0, (b - a) / (2 + a + b), 0.0)
+ else:
+ def an_func(k):
+ return np.where(
+ k == 0,
+ (b - a) / (2 + a + b),
+ (b * b - a * a) / ((2.0 * k + a + b) * (2.0 * k + a + b + 2))
+ )
+
+ def bn_func(k):
+ return (
+ 2.0 / (2.0 * k + a + b)
+ * np.sqrt((k + a) * (k + b) / (2 * k + a + b + 1))
+ * np.where(k == 1, 1.0, np.sqrt(k * (k + a + b) / (2.0 * k + a + b - 1)))
+ )
+
+ def f(n, x):
+ return _ufuncs.eval_jacobi(n, a, b, x)
+ def df(n, x):
+ return 0.5 * (n + a + b + 1) * _ufuncs.eval_jacobi(n - 1, a + 1, b + 1, x)
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, False, mu)
+
+
+def jacobi(n, alpha, beta, monic=False):
+ r"""Jacobi polynomial.
+
+ Defined to be the solution of
+
+ .. math::
+ (1 - x^2)\frac{d^2}{dx^2}P_n^{(\alpha, \beta)}
+ + (\beta - \alpha - (\alpha + \beta + 2)x)
+ \frac{d}{dx}P_n^{(\alpha, \beta)}
+ + n(n + \alpha + \beta + 1)P_n^{(\alpha, \beta)} = 0
+
+ for :math:`\alpha, \beta > -1`; :math:`P_n^{(\alpha, \beta)}` is a
+ polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ alpha : float
+ Parameter, must be greater than -1.
+ beta : float
+ Parameter, must be greater than -1.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ P : orthopoly1d
+ Jacobi polynomial.
+
+ Notes
+ -----
+ For fixed :math:`\alpha, \beta`, the polynomials
+ :math:`P_n^{(\alpha, \beta)}` are orthogonal over :math:`[-1, 1]`
+ with weight function :math:`(1 - x)^\alpha(1 + x)^\beta`.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The Jacobi polynomials satisfy the recurrence relation:
+
+ .. math::
+ P_n^{(\alpha, \beta-1)}(x) - P_n^{(\alpha-1, \beta)}(x)
+ = P_{n-1}^{(\alpha, \beta)}(x)
+
+ This can be verified, for example, for :math:`\alpha = \beta = 2`
+ and :math:`n = 1` over the interval :math:`[-1, 1]`:
+
+ >>> import numpy as np
+ >>> from scipy.special import jacobi
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> np.allclose(jacobi(0, 2, 2)(x),
+ ... jacobi(1, 2, 1)(x) - jacobi(1, 1, 2)(x))
+ True
+
+ Plot of the Jacobi polynomial :math:`P_5^{(\alpha, -0.5)}` for
+ different values of :math:`\alpha`:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-2.0, 2.0)
+ >>> ax.set_title(r'Jacobi polynomials $P_5^{(\alpha, -0.5)}$')
+ >>> for alpha in np.arange(0, 4, 1):
+ ... ax.plot(x, jacobi(5, alpha, -0.5)(x), label=rf'$\alpha={alpha}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ def wfunc(x):
+ return (1 - x) ** alpha * (1 + x) ** beta
+ if n == 0:
+ return orthopoly1d([], [], 1.0, 1.0, wfunc, (-1, 1), monic,
+ eval_func=np.ones_like)
+ x, w, mu = roots_jacobi(n, alpha, beta, mu=True)
+ ab1 = alpha + beta + 1.0
+ hn = 2**ab1 / (2 * n + ab1) * _gam(n + alpha + 1)
+ hn *= _gam(n + beta + 1.0) / _gam(n + 1) / _gam(n + ab1)
+ kn = _gam(2 * n + ab1) / 2.0**n / _gam(n + 1) / _gam(n + ab1)
+ # here kn = coefficient on x^n term
+ p = orthopoly1d(x, w, hn, kn, wfunc, (-1, 1), monic,
+ lambda x: _ufuncs.eval_jacobi(n, alpha, beta, x))
+ return p
+
+# Jacobi Polynomials shifted G_n(p,q,x)
+
+
+def roots_sh_jacobi(n, p1, q1, mu=False):
+ """Gauss-Jacobi (shifted) quadrature.
+
+ Compute the sample points and weights for Gauss-Jacobi (shifted)
+ quadrature. The sample points are the roots of the nth degree
+ shifted Jacobi polynomial, :math:`G^{p,q}_n(x)`. These sample
+ points and weights correctly integrate polynomials of degree
+ :math:`2n - 1` or less over the interval :math:`[0, 1]` with
+ weight function :math:`w(x) = (1 - x)^{p-q} x^{q-1}`. See 22.2.2
+ in [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ p1 : float
+ (p1 - q1) must be > -1
+ q1 : float
+ q1 must be > 0
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ if (p1-q1) <= -1 or q1 <= 0:
+ message = "(p - q) must be greater than -1, and q must be greater than 0."
+ raise ValueError(message)
+ x, w, m = roots_jacobi(n, p1-q1, q1-1, True)
+ x = (x + 1) / 2
+ scale = 2.0**p1
+ w /= scale
+ m /= scale
+ if mu:
+ return x, w, m
+ else:
+ return x, w
+
+
+def sh_jacobi(n, p, q, monic=False):
+ r"""Shifted Jacobi polynomial.
+
+ Defined by
+
+ .. math::
+
+ G_n^{(p, q)}(x)
+ = \binom{2n + p - 1}{n}^{-1}P_n^{(p - q, q - 1)}(2x - 1),
+
+ where :math:`P_n^{(\cdot, \cdot)}` is the nth Jacobi polynomial.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ p : float
+ Parameter, must have :math:`p > q - 1`.
+ q : float
+ Parameter, must be greater than 0.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ G : orthopoly1d
+ Shifted Jacobi polynomial.
+
+ Notes
+ -----
+ For fixed :math:`p, q`, the polynomials :math:`G_n^{(p, q)}` are
+ orthogonal over :math:`[0, 1]` with weight function :math:`(1 -
+ x)^{p - q}x^{q - 1}`.
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ def wfunc(x):
+ return (1.0 - x) ** (p - q) * x ** (q - 1.0)
+ if n == 0:
+ return orthopoly1d([], [], 1.0, 1.0, wfunc, (-1, 1), monic,
+ eval_func=np.ones_like)
+ n1 = n
+ x, w = roots_sh_jacobi(n1, p, q)
+ hn = _gam(n + 1) * _gam(n + q) * _gam(n + p) * _gam(n + p - q + 1)
+ hn /= (2 * n + p) * (_gam(2 * n + p)**2)
+ # kn = 1.0 in standard form so monic is redundant. Kept for compatibility.
+ kn = 1.0
+ pp = orthopoly1d(x, w, hn, kn, wfunc=wfunc, limits=(0, 1), monic=monic,
+ eval_func=lambda x: _ufuncs.eval_sh_jacobi(n, p, q, x))
+ return pp
+
+# Generalized Laguerre L^(alpha)_n(x)
+
+
+def roots_genlaguerre(n, alpha, mu=False):
+ r"""Gauss-generalized Laguerre quadrature.
+
+ Compute the sample points and weights for Gauss-generalized
+ Laguerre quadrature. The sample points are the roots of the nth
+ degree generalized Laguerre polynomial, :math:`L^{\alpha}_n(x)`.
+ These sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[0,
+ \infty]` with weight function :math:`w(x) = x^{\alpha}
+ e^{-x}`. See 22.3.9 in [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ alpha : float
+ alpha must be > -1
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+ if alpha < -1:
+ raise ValueError("alpha must be greater than -1.")
+
+ mu0 = _ufuncs.gamma(alpha + 1)
+
+ if m == 1:
+ x = np.array([alpha+1.0], 'd')
+ w = np.array([mu0], 'd')
+ if mu:
+ return x, w, mu0
+ else:
+ return x, w
+
+ def an_func(k):
+ return 2 * k + alpha + 1
+ def bn_func(k):
+ return -np.sqrt(k * (k + alpha))
+ def f(n, x):
+ return _ufuncs.eval_genlaguerre(n, alpha, x)
+ def df(n, x):
+ return (n * _ufuncs.eval_genlaguerre(n, alpha, x)
+ - (n + alpha) * _ufuncs.eval_genlaguerre(n - 1, alpha, x)) / x
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, False, mu)
+
+
+def genlaguerre(n, alpha, monic=False):
+ r"""Generalized (associated) Laguerre polynomial.
+
+ Defined to be the solution of
+
+ .. math::
+ x\frac{d^2}{dx^2}L_n^{(\alpha)}
+ + (\alpha + 1 - x)\frac{d}{dx}L_n^{(\alpha)}
+ + nL_n^{(\alpha)} = 0,
+
+ where :math:`\alpha > -1`; :math:`L_n^{(\alpha)}` is a polynomial
+ of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ alpha : float
+ Parameter, must be greater than -1.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ L : orthopoly1d
+ Generalized Laguerre polynomial.
+
+ See Also
+ --------
+ laguerre : Laguerre polynomial.
+ hyp1f1 : confluent hypergeometric function
+
+ Notes
+ -----
+ For fixed :math:`\alpha`, the polynomials :math:`L_n^{(\alpha)}`
+ are orthogonal over :math:`[0, \infty)` with weight function
+ :math:`e^{-x}x^\alpha`.
+
+ The Laguerre polynomials are the special case where :math:`\alpha
+ = 0`.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The generalized Laguerre polynomials are closely related to the confluent
+ hypergeometric function :math:`{}_1F_1`:
+
+ .. math::
+ L_n^{(\alpha)} = \binom{n + \alpha}{n} {}_1F_1(-n, \alpha +1, x)
+
+ This can be verified, for example, for :math:`n = \alpha = 3` over the
+ interval :math:`[-1, 1]`:
+
+ >>> import numpy as np
+ >>> from scipy.special import binom
+ >>> from scipy.special import genlaguerre
+ >>> from scipy.special import hyp1f1
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> np.allclose(genlaguerre(3, 3)(x), binom(6, 3) * hyp1f1(-3, 4, x))
+ True
+
+ This is the plot of the generalized Laguerre polynomials
+ :math:`L_3^{(\alpha)}` for some values of :math:`\alpha`:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(-4.0, 12.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-5.0, 10.0)
+ >>> ax.set_title(r'Generalized Laguerre polynomials $L_3^{\alpha}$')
+ >>> for alpha in np.arange(0, 5):
+ ... ax.plot(x, genlaguerre(3, alpha)(x), label=rf'$L_3^{(alpha)}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ if alpha <= -1:
+ raise ValueError("alpha must be > -1")
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_genlaguerre(n1, alpha)
+ def wfunc(x):
+ return exp(-x) * x ** alpha
+ if n == 0:
+ x, w = [], []
+ hn = _gam(n + alpha + 1) / _gam(n + 1)
+ kn = (-1)**n / _gam(n + 1)
+ p = orthopoly1d(x, w, hn, kn, wfunc, (0, inf), monic,
+ lambda x: _ufuncs.eval_genlaguerre(n, alpha, x))
+ return p
+
+# Laguerre L_n(x)
+
+
+def roots_laguerre(n, mu=False):
+ r"""Gauss-Laguerre quadrature.
+
+ Compute the sample points and weights for Gauss-Laguerre
+ quadrature. The sample points are the roots of the nth degree
+ Laguerre polynomial, :math:`L_n(x)`. These sample points and
+ weights correctly integrate polynomials of degree :math:`2n - 1`
+ or less over the interval :math:`[0, \infty]` with weight function
+ :math:`w(x) = e^{-x}`. See 22.2.13 in [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+ numpy.polynomial.laguerre.laggauss
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ return roots_genlaguerre(n, 0.0, mu=mu)
+
+
+def laguerre(n, monic=False):
+ r"""Laguerre polynomial.
+
+ Defined to be the solution of
+
+ .. math::
+ x\frac{d^2}{dx^2}L_n + (1 - x)\frac{d}{dx}L_n + nL_n = 0;
+
+ :math:`L_n` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ L : orthopoly1d
+ Laguerre Polynomial.
+
+ See Also
+ --------
+ genlaguerre : Generalized (associated) Laguerre polynomial.
+
+ Notes
+ -----
+ The polynomials :math:`L_n` are orthogonal over :math:`[0,
+ \infty)` with weight function :math:`e^{-x}`.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The Laguerre polynomials :math:`L_n` are the special case
+ :math:`\alpha = 0` of the generalized Laguerre polynomials
+ :math:`L_n^{(\alpha)}`.
+ Let's verify it on the interval :math:`[-1, 1]`:
+
+ >>> import numpy as np
+ >>> from scipy.special import genlaguerre
+ >>> from scipy.special import laguerre
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> np.allclose(genlaguerre(3, 0)(x), laguerre(3)(x))
+ True
+
+ The polynomials :math:`L_n` also satisfy the recurrence relation:
+
+ .. math::
+ (n + 1)L_{n+1}(x) = (2n +1 -x)L_n(x) - nL_{n-1}(x)
+
+ This can be easily checked on :math:`[0, 1]` for :math:`n = 3`:
+
+ >>> x = np.arange(0.0, 1.0, 0.01)
+ >>> np.allclose(4 * laguerre(4)(x),
+ ... (7 - x) * laguerre(3)(x) - 3 * laguerre(2)(x))
+ True
+
+ This is the plot of the first few Laguerre polynomials :math:`L_n`:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(-1.0, 5.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-5.0, 5.0)
+ >>> ax.set_title(r'Laguerre polynomials $L_n$')
+ >>> for n in np.arange(0, 5):
+ ... ax.plot(x, laguerre(n)(x), label=rf'$L_{n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_laguerre(n1)
+ if n == 0:
+ x, w = [], []
+ hn = 1.0
+ kn = (-1)**n / _gam(n + 1)
+ p = orthopoly1d(x, w, hn, kn, lambda x: exp(-x), (0, inf), monic,
+ lambda x: _ufuncs.eval_laguerre(n, x))
+ return p
+
+# Hermite 1 H_n(x)
+
+
+def roots_hermite(n, mu=False):
+ r"""Gauss-Hermite (physicist's) quadrature.
+
+ Compute the sample points and weights for Gauss-Hermite
+ quadrature. The sample points are the roots of the nth degree
+ Hermite polynomial, :math:`H_n(x)`. These sample points and
+ weights correctly integrate polynomials of degree :math:`2n - 1`
+ or less over the interval :math:`[-\infty, \infty]` with weight
+ function :math:`w(x) = e^{-x^2}`. See 22.2.14 in [AS]_ for
+ details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+ numpy.polynomial.hermite.hermgauss
+ roots_hermitenorm
+
+ Notes
+ -----
+ For small n up to 150 a modified version of the Golub-Welsch
+ algorithm is used. Nodes are computed from the eigenvalue
+ problem and improved by one step of a Newton iteration.
+ The weights are computed from the well-known analytical formula.
+
+ For n larger than 150 an optimal asymptotic algorithm is applied
+ which computes nodes and weights in a numerically stable manner.
+ The algorithm has linear runtime making computation for very
+ large n (several thousand or more) feasible.
+
+ References
+ ----------
+ .. [townsend.trogdon.olver-2014]
+ Townsend, A. and Trogdon, T. and Olver, S. (2014)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*. :arXiv:`1410.5286`.
+ .. [townsend.trogdon.olver-2015]
+ Townsend, A. and Trogdon, T. and Olver, S. (2015)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*.
+ IMA Journal of Numerical Analysis
+ :doi:`10.1093/imanum/drv002`.
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+
+ mu0 = np.sqrt(np.pi)
+ if n <= 150:
+ def an_func(k):
+ return 0.0 * k
+ def bn_func(k):
+ return np.sqrt(k / 2.0)
+ f = _ufuncs.eval_hermite
+ def df(n, x):
+ return 2.0 * n * _ufuncs.eval_hermite(n - 1, x)
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, True, mu)
+ else:
+ nodes, weights = _roots_hermite_asy(m)
+ if mu:
+ return nodes, weights, mu0
+ else:
+ return nodes, weights
+
+
+def _compute_tauk(n, k, maxit=5):
+ """Helper function for Tricomi initial guesses
+
+ For details, see formula 3.1 in lemma 3.1 in the
+ original paper.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+ k : ndarray of type int
+ Index of roots :math:`\tau_k` to compute
+ maxit : int
+ Number of Newton maxit performed, the default
+ value of 5 is sufficient.
+
+ Returns
+ -------
+ tauk : ndarray
+ Roots of equation 3.1
+
+ See Also
+ --------
+ initial_nodes_a
+ roots_hermite_asy
+ """
+ a = n % 2 - 0.5
+ c = (4.0*floor(n/2.0) - 4.0*k + 3.0)*pi / (4.0*floor(n/2.0) + 2.0*a + 2.0)
+ def f(x):
+ return x - sin(x) - c
+ def df(x):
+ return 1.0 - cos(x)
+ xi = 0.5*pi
+ for i in range(maxit):
+ xi = xi - f(xi)/df(xi)
+ return xi
+
+
+def _initial_nodes_a(n, k):
+ r"""Tricomi initial guesses
+
+ Computes an initial approximation to the square of the `k`-th
+ (positive) root :math:`x_k` of the Hermite polynomial :math:`H_n`
+ of order :math:`n`. The formula is the one from lemma 3.1 in the
+ original paper. The guesses are accurate except in the region
+ near :math:`\sqrt{2n + 1}`.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+ k : ndarray of type int
+ Index of roots to compute
+
+ Returns
+ -------
+ xksq : ndarray
+ Square of the approximate roots
+
+ See Also
+ --------
+ initial_nodes
+ roots_hermite_asy
+ """
+ tauk = _compute_tauk(n, k)
+ sigk = cos(0.5*tauk)**2
+ a = n % 2 - 0.5
+ nu = 4.0*floor(n/2.0) + 2.0*a + 2.0
+ # Initial approximation of Hermite roots (square)
+ xksq = nu*sigk - 1.0/(3.0*nu) * (5.0/(4.0*(1.0-sigk)**2) - 1.0/(1.0-sigk) - 0.25)
+ return xksq
+
+
+def _initial_nodes_b(n, k):
+ r"""Gatteschi initial guesses
+
+ Computes an initial approximation to the square of the kth
+ (positive) root :math:`x_k` of the Hermite polynomial :math:`H_n`
+ of order :math:`n`. The formula is the one from lemma 3.2 in the
+ original paper. The guesses are accurate in the region just
+ below :math:`\sqrt{2n + 1}`.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+ k : ndarray of type int
+ Index of roots to compute
+
+ Returns
+ -------
+ xksq : ndarray
+ Square of the approximate root
+
+ See Also
+ --------
+ initial_nodes
+ roots_hermite_asy
+ """
+ a = n % 2 - 0.5
+ nu = 4.0*floor(n/2.0) + 2.0*a + 2.0
+ # Airy roots by approximation
+ ak = _specfun.airyzo(k.max(), 1)[0][::-1]
+ # Initial approximation of Hermite roots (square)
+ xksq = (nu
+ + 2.0**(2.0/3.0) * ak * nu**(1.0/3.0)
+ + 1.0/5.0 * 2.0**(4.0/3.0) * ak**2 * nu**(-1.0/3.0)
+ + (9.0/140.0 - 12.0/175.0 * ak**3) * nu**(-1.0)
+ + (16.0/1575.0 * ak + 92.0/7875.0 * ak**4) * 2.0**(2.0/3.0) * nu**(-5.0/3.0)
+ - (15152.0/3031875.0 * ak**5 + 1088.0/121275.0 * ak**2)
+ * 2.0**(1.0/3.0) * nu**(-7.0/3.0))
+ return xksq
+
+
+def _initial_nodes(n):
+ """Initial guesses for the Hermite roots
+
+ Computes an initial approximation to the non-negative
+ roots :math:`x_k` of the Hermite polynomial :math:`H_n`
+ of order :math:`n`. The Tricomi and Gatteschi initial
+ guesses are used in the region where they are accurate.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+
+ Returns
+ -------
+ xk : ndarray
+ Approximate roots
+
+ See Also
+ --------
+ roots_hermite_asy
+ """
+ # Turnover point
+ # linear polynomial fit to error of 10, 25, 40, ..., 1000 point rules
+ fit = 0.49082003*n - 4.37859653
+ turnover = around(fit).astype(int)
+ # Compute all approximations
+ ia = arange(1, int(floor(n*0.5)+1))
+ ib = ia[::-1]
+ xasq = _initial_nodes_a(n, ia[:turnover+1])
+ xbsq = _initial_nodes_b(n, ib[turnover+1:])
+ # Combine
+ iv = sqrt(hstack([xasq, xbsq]))
+ # Central node is always zero
+ if n % 2 == 1:
+ iv = hstack([0.0, iv])
+ return iv
+
+
+def _pbcf(n, theta):
+ r"""Asymptotic series expansion of parabolic cylinder function
+
+ The implementation is based on sections 3.2 and 3.3 from the
+ original paper. Compared to the published version this code
+ adds one more term to the asymptotic series. The detailed
+ formulas can be found at [parabolic-asymptotics]_. The evaluation
+ is done in a transformed variable :math:`\theta := \arccos(t)`
+ where :math:`t := x / \mu` and :math:`\mu := \sqrt{2n + 1}`.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+ theta : ndarray
+ Transformed position variable
+
+ Returns
+ -------
+ U : ndarray
+ Value of the parabolic cylinder function :math:`U(a, \theta)`.
+ Ud : ndarray
+ Value of the derivative :math:`U^{\prime}(a, \theta)` of
+ the parabolic cylinder function.
+
+ See Also
+ --------
+ roots_hermite_asy
+
+ References
+ ----------
+ .. [parabolic-asymptotics]
+ https://dlmf.nist.gov/12.10#vii
+ """
+ st = sin(theta)
+ ct = cos(theta)
+ # https://dlmf.nist.gov/12.10#vii
+ mu = 2.0*n + 1.0
+ # https://dlmf.nist.gov/12.10#E23
+ eta = 0.5*theta - 0.5*st*ct
+ # https://dlmf.nist.gov/12.10#E39
+ zeta = -(3.0*eta/2.0) ** (2.0/3.0)
+ # https://dlmf.nist.gov/12.10#E40
+ phi = (-zeta / st**2) ** (0.25)
+ # Coefficients
+ # https://dlmf.nist.gov/12.10#E43
+ a0 = 1.0
+ a1 = 0.10416666666666666667
+ a2 = 0.08355034722222222222
+ a3 = 0.12822657455632716049
+ a4 = 0.29184902646414046425
+ a5 = 0.88162726744375765242
+ b0 = 1.0
+ b1 = -0.14583333333333333333
+ b2 = -0.09874131944444444444
+ b3 = -0.14331205391589506173
+ b4 = -0.31722720267841354810
+ b5 = -0.94242914795712024914
+ # Polynomials
+ # https://dlmf.nist.gov/12.10#E9
+ # https://dlmf.nist.gov/12.10#E10
+ ctp = ct ** arange(16).reshape((-1,1))
+ u0 = 1.0
+ u1 = (1.0*ctp[3,:] - 6.0*ct) / 24.0
+ u2 = (-9.0*ctp[4,:] + 249.0*ctp[2,:] + 145.0) / 1152.0
+ u3 = (-4042.0*ctp[9,:] + 18189.0*ctp[7,:] - 28287.0*ctp[5,:]
+ - 151995.0*ctp[3,:] - 259290.0*ct) / 414720.0
+ u4 = (72756.0*ctp[10,:] - 321339.0*ctp[8,:] - 154982.0*ctp[6,:]
+ + 50938215.0*ctp[4,:] + 122602962.0*ctp[2,:] + 12773113.0) / 39813120.0
+ u5 = (82393456.0*ctp[15,:] - 617950920.0*ctp[13,:] + 1994971575.0*ctp[11,:]
+ - 3630137104.0*ctp[9,:] + 4433574213.0*ctp[7,:] - 37370295816.0*ctp[5,:]
+ - 119582875013.0*ctp[3,:] - 34009066266.0*ct) / 6688604160.0
+ v0 = 1.0
+ v1 = (1.0*ctp[3,:] + 6.0*ct) / 24.0
+ v2 = (15.0*ctp[4,:] - 327.0*ctp[2,:] - 143.0) / 1152.0
+ v3 = (-4042.0*ctp[9,:] + 18189.0*ctp[7,:] - 36387.0*ctp[5,:]
+ + 238425.0*ctp[3,:] + 259290.0*ct) / 414720.0
+ v4 = (-121260.0*ctp[10,:] + 551733.0*ctp[8,:] - 151958.0*ctp[6,:]
+ - 57484425.0*ctp[4,:] - 132752238.0*ctp[2,:] - 12118727) / 39813120.0
+ v5 = (82393456.0*ctp[15,:] - 617950920.0*ctp[13,:] + 2025529095.0*ctp[11,:]
+ - 3750839308.0*ctp[9,:] + 3832454253.0*ctp[7,:] + 35213253348.0*ctp[5,:]
+ + 130919230435.0*ctp[3,:] + 34009066266*ct) / 6688604160.0
+ # Airy Evaluation (Bi and Bip unused)
+ Ai, Aip, Bi, Bip = airy(mu**(4.0/6.0) * zeta)
+ # Prefactor for U
+ P = 2.0*sqrt(pi) * mu**(1.0/6.0) * phi
+ # Terms for U
+ # https://dlmf.nist.gov/12.10#E42
+ phip = phi ** arange(6, 31, 6).reshape((-1,1))
+ A0 = b0*u0
+ A1 = (b2*u0 + phip[0,:]*b1*u1 + phip[1,:]*b0*u2) / zeta**3
+ A2 = (b4*u0 + phip[0,:]*b3*u1 + phip[1,:]*b2*u2 + phip[2,:]*b1*u3
+ + phip[3,:]*b0*u4) / zeta**6
+ B0 = -(a1*u0 + phip[0,:]*a0*u1) / zeta**2
+ B1 = -(a3*u0 + phip[0,:]*a2*u1 + phip[1,:]*a1*u2 + phip[2,:]*a0*u3) / zeta**5
+ B2 = -(a5*u0 + phip[0,:]*a4*u1 + phip[1,:]*a3*u2 + phip[2,:]*a2*u3
+ + phip[3,:]*a1*u4 + phip[4,:]*a0*u5) / zeta**8
+ # U
+ # https://dlmf.nist.gov/12.10#E35
+ U = P * (Ai * (A0 + A1/mu**2.0 + A2/mu**4.0) +
+ Aip * (B0 + B1/mu**2.0 + B2/mu**4.0) / mu**(8.0/6.0))
+ # Prefactor for derivative of U
+ Pd = sqrt(2.0*pi) * mu**(2.0/6.0) / phi
+ # Terms for derivative of U
+ # https://dlmf.nist.gov/12.10#E46
+ C0 = -(b1*v0 + phip[0,:]*b0*v1) / zeta
+ C1 = -(b3*v0 + phip[0,:]*b2*v1 + phip[1,:]*b1*v2 + phip[2,:]*b0*v3) / zeta**4
+ C2 = -(b5*v0 + phip[0,:]*b4*v1 + phip[1,:]*b3*v2 + phip[2,:]*b2*v3
+ + phip[3,:]*b1*v4 + phip[4,:]*b0*v5) / zeta**7
+ D0 = a0*v0
+ D1 = (a2*v0 + phip[0,:]*a1*v1 + phip[1,:]*a0*v2) / zeta**3
+ D2 = (a4*v0 + phip[0,:]*a3*v1 + phip[1,:]*a2*v2 + phip[2,:]*a1*v3
+ + phip[3,:]*a0*v4) / zeta**6
+ # Derivative of U
+ # https://dlmf.nist.gov/12.10#E36
+ Ud = Pd * (Ai * (C0 + C1/mu**2.0 + C2/mu**4.0) / mu**(4.0/6.0) +
+ Aip * (D0 + D1/mu**2.0 + D2/mu**4.0))
+ return U, Ud
+
+
+def _newton(n, x_initial, maxit=5):
+ """Newton iteration for polishing the asymptotic approximation
+ to the zeros of the Hermite polynomials.
+
+ Parameters
+ ----------
+ n : int
+ Quadrature order
+ x_initial : ndarray
+ Initial guesses for the roots
+ maxit : int
+ Maximal number of Newton iterations.
+ The default 5 is sufficient, usually
+ only one or two steps are needed.
+
+ Returns
+ -------
+ nodes : ndarray
+ Quadrature nodes
+ weights : ndarray
+ Quadrature weights
+
+ See Also
+ --------
+ roots_hermite_asy
+ """
+ # Variable transformation
+ mu = sqrt(2.0*n + 1.0)
+ t = x_initial / mu
+ theta = arccos(t)
+ # Newton iteration
+ for i in range(maxit):
+ u, ud = _pbcf(n, theta)
+ dtheta = u / (sqrt(2.0) * mu * sin(theta) * ud)
+ theta = theta + dtheta
+ if max(abs(dtheta)) < 1e-14:
+ break
+ # Undo variable transformation
+ x = mu * cos(theta)
+ # Central node is always zero
+ if n % 2 == 1:
+ x[0] = 0.0
+ # Compute weights
+ w = exp(-x**2) / (2.0*ud**2)
+ return x, w
+
+
+def _roots_hermite_asy(n):
+ r"""Gauss-Hermite (physicist's) quadrature for large n.
+
+ Computes the sample points and weights for Gauss-Hermite quadrature.
+ The sample points are the roots of the nth degree Hermite polynomial,
+ :math:`H_n(x)`. These sample points and weights correctly integrate
+ polynomials of degree :math:`2n - 1` or less over the interval
+ :math:`[-\infty, \infty]` with weight function :math:`f(x) = e^{-x^2}`.
+
+ This method relies on asymptotic expansions which work best for n > 150.
+ The algorithm has linear runtime making computation for very large n
+ feasible.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+
+ Returns
+ -------
+ nodes : ndarray
+ Quadrature nodes
+ weights : ndarray
+ Quadrature weights
+
+ See Also
+ --------
+ roots_hermite
+
+ References
+ ----------
+ .. [townsend.trogdon.olver-2014]
+ Townsend, A. and Trogdon, T. and Olver, S. (2014)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*. :arXiv:`1410.5286`.
+
+ .. [townsend.trogdon.olver-2015]
+ Townsend, A. and Trogdon, T. and Olver, S. (2015)
+ *Fast computation of Gauss quadrature nodes and
+ weights on the whole real line*.
+ IMA Journal of Numerical Analysis
+ :doi:`10.1093/imanum/drv002`.
+ """
+ iv = _initial_nodes(n)
+ nodes, weights = _newton(n, iv)
+ # Combine with negative parts
+ if n % 2 == 0:
+ nodes = hstack([-nodes[::-1], nodes])
+ weights = hstack([weights[::-1], weights])
+ else:
+ nodes = hstack([-nodes[-1:0:-1], nodes])
+ weights = hstack([weights[-1:0:-1], weights])
+ # Scale weights
+ weights *= sqrt(pi) / sum(weights)
+ return nodes, weights
+
+
+def hermite(n, monic=False):
+ r"""Physicist's Hermite polynomial.
+
+ Defined by
+
+ .. math::
+
+ H_n(x) = (-1)^ne^{x^2}\frac{d^n}{dx^n}e^{-x^2};
+
+ :math:`H_n` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ H : orthopoly1d
+ Hermite polynomial.
+
+ Notes
+ -----
+ The polynomials :math:`H_n` are orthogonal over :math:`(-\infty,
+ \infty)` with weight function :math:`e^{-x^2}`.
+
+ Examples
+ --------
+ >>> from scipy import special
+ >>> import matplotlib.pyplot as plt
+ >>> import numpy as np
+
+ >>> p_monic = special.hermite(3, monic=True)
+ >>> p_monic
+ poly1d([ 1. , 0. , -1.5, 0. ])
+ >>> p_monic(1)
+ -0.49999999999999983
+ >>> x = np.linspace(-3, 3, 400)
+ >>> y = p_monic(x)
+ >>> plt.plot(x, y)
+ >>> plt.title("Monic Hermite polynomial of degree 3")
+ >>> plt.xlabel("x")
+ >>> plt.ylabel("H_3(x)")
+ >>> plt.show()
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_hermite(n1)
+ def wfunc(x):
+ return exp(-x * x)
+ if n == 0:
+ x, w = [], []
+ hn = 2**n * _gam(n + 1) * sqrt(pi)
+ kn = 2**n
+ p = orthopoly1d(x, w, hn, kn, wfunc, (-inf, inf), monic,
+ lambda x: _ufuncs.eval_hermite(n, x))
+ return p
+
+# Hermite 2 He_n(x)
+
+
+def roots_hermitenorm(n, mu=False):
+ r"""Gauss-Hermite (statistician's) quadrature.
+
+ Compute the sample points and weights for Gauss-Hermite
+ quadrature. The sample points are the roots of the nth degree
+ Hermite polynomial, :math:`He_n(x)`. These sample points and
+ weights correctly integrate polynomials of degree :math:`2n - 1`
+ or less over the interval :math:`[-\infty, \infty]` with weight
+ function :math:`w(x) = e^{-x^2/2}`. See 22.2.15 in [AS]_ for more
+ details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+ numpy.polynomial.hermite_e.hermegauss
+
+ Notes
+ -----
+ For small n up to 150 a modified version of the Golub-Welsch
+ algorithm is used. Nodes are computed from the eigenvalue
+ problem and improved by one step of a Newton iteration.
+ The weights are computed from the well-known analytical formula.
+
+ For n larger than 150 an optimal asymptotic algorithm is used
+ which computes nodes and weights in a numerical stable manner.
+ The algorithm has linear runtime making computation for very
+ large n (several thousand or more) feasible.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+
+ mu0 = np.sqrt(2.0*np.pi)
+ if n <= 150:
+ def an_func(k):
+ return 0.0 * k
+ def bn_func(k):
+ return np.sqrt(k)
+ f = _ufuncs.eval_hermitenorm
+ def df(n, x):
+ return n * _ufuncs.eval_hermitenorm(n - 1, x)
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, True, mu)
+ else:
+ nodes, weights = _roots_hermite_asy(m)
+ # Transform
+ nodes *= sqrt(2)
+ weights *= sqrt(2)
+ if mu:
+ return nodes, weights, mu0
+ else:
+ return nodes, weights
+
+
+def hermitenorm(n, monic=False):
+ r"""Normalized (probabilist's) Hermite polynomial.
+
+ Defined by
+
+ .. math::
+
+ He_n(x) = (-1)^ne^{x^2/2}\frac{d^n}{dx^n}e^{-x^2/2};
+
+ :math:`He_n` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ He : orthopoly1d
+ Hermite polynomial.
+
+ Notes
+ -----
+
+ The polynomials :math:`He_n` are orthogonal over :math:`(-\infty,
+ \infty)` with weight function :math:`e^{-x^2/2}`.
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_hermitenorm(n1)
+ def wfunc(x):
+ return exp(-x * x / 2.0)
+ if n == 0:
+ x, w = [], []
+ hn = sqrt(2 * pi) * _gam(n + 1)
+ kn = 1.0
+ p = orthopoly1d(x, w, hn, kn, wfunc=wfunc, limits=(-inf, inf), monic=monic,
+ eval_func=lambda x: _ufuncs.eval_hermitenorm(n, x))
+ return p
+
+# The remainder of the polynomials can be derived from the ones above.
+
+# Ultraspherical (Gegenbauer) C^(alpha)_n(x)
+
+
+def roots_gegenbauer(n, alpha, mu=False):
+ r"""Gauss-Gegenbauer quadrature.
+
+ Compute the sample points and weights for Gauss-Gegenbauer
+ quadrature. The sample points are the roots of the nth degree
+ Gegenbauer polynomial, :math:`C^{\alpha}_n(x)`. These sample
+ points and weights correctly integrate polynomials of degree
+ :math:`2n - 1` or less over the interval :math:`[-1, 1]` with
+ weight function :math:`w(x) = (1 - x^2)^{\alpha - 1/2}`. See
+ 22.2.3 in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ alpha : float
+ alpha must be > -0.5
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+ if alpha < -0.5:
+ raise ValueError("alpha must be greater than -0.5.")
+ elif alpha == 0.0:
+ # C(n,0,x) == 0 uniformly, however, as alpha->0, C(n,alpha,x)->T(n,x)
+ # strictly, we should just error out here, since the roots are not
+ # really defined, but we used to return something useful, so let's
+ # keep doing so.
+ return roots_chebyt(n, mu)
+
+ if alpha <= 170:
+ mu0 = (np.sqrt(np.pi) * _ufuncs.gamma(alpha + 0.5)) \
+ / _ufuncs.gamma(alpha + 1)
+ else:
+ # For large alpha we use a Taylor series expansion around inf,
+ # expressed as a 6th order polynomial of a^-1 and using Horner's
+ # method to minimize computation and maximize precision
+ inv_alpha = 1. / alpha
+ coeffs = np.array([0.000207186, -0.00152206, -0.000640869,
+ 0.00488281, 0.0078125, -0.125, 1.])
+ mu0 = coeffs[0]
+ for term in range(1, len(coeffs)):
+ mu0 = mu0 * inv_alpha + coeffs[term]
+ mu0 = mu0 * np.sqrt(np.pi / alpha)
+ def an_func(k):
+ return 0.0 * k
+ def bn_func(k):
+ return np.sqrt(k * (k + 2 * alpha - 1) / (4 * (k + alpha) * (k + alpha - 1)))
+ def f(n, x):
+ return _ufuncs.eval_gegenbauer(n, alpha, x)
+ def df(n, x):
+ return (
+ -n * x * _ufuncs.eval_gegenbauer(n, alpha, x)
+ + (n + 2 * alpha - 1) * _ufuncs.eval_gegenbauer(n - 1, alpha, x)
+ ) / (1 - x ** 2)
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, True, mu)
+
+
+def gegenbauer(n, alpha, monic=False):
+ r"""Gegenbauer (ultraspherical) polynomial.
+
+ Defined to be the solution of
+
+ .. math::
+ (1 - x^2)\frac{d^2}{dx^2}C_n^{(\alpha)}
+ - (2\alpha + 1)x\frac{d}{dx}C_n^{(\alpha)}
+ + n(n + 2\alpha)C_n^{(\alpha)} = 0
+
+ for :math:`\alpha > -1/2`; :math:`C_n^{(\alpha)}` is a polynomial
+ of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ alpha : float
+ Parameter, must be greater than -0.5.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ C : orthopoly1d
+ Gegenbauer polynomial.
+
+ Notes
+ -----
+ The polynomials :math:`C_n^{(\alpha)}` are orthogonal over
+ :math:`[-1,1]` with weight function :math:`(1 - x^2)^{(\alpha -
+ 1/2)}`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy import special
+ >>> import matplotlib.pyplot as plt
+
+ We can initialize a variable ``p`` as a Gegenbauer polynomial using the
+ `gegenbauer` function and evaluate at a point ``x = 1``.
+
+ >>> p = special.gegenbauer(3, 0.5, monic=False)
+ >>> p
+ poly1d([ 2.5, 0. , -1.5, 0. ])
+ >>> p(1)
+ 1.0
+
+ To evaluate ``p`` at various points ``x`` in the interval ``(-3, 3)``,
+ simply pass an array ``x`` to ``p`` as follows:
+
+ >>> x = np.linspace(-3, 3, 400)
+ >>> y = p(x)
+
+ We can then visualize ``x, y`` using `matplotlib.pyplot`.
+
+ >>> fig, ax = plt.subplots()
+ >>> ax.plot(x, y)
+ >>> ax.set_title("Gegenbauer (ultraspherical) polynomial of degree 3")
+ >>> ax.set_xlabel("x")
+ >>> ax.set_ylabel("G_3(x)")
+ >>> plt.show()
+
+ """
+ if not np.isfinite(alpha) or alpha <= -0.5 :
+ raise ValueError("`alpha` must be a finite number greater than -1/2")
+ base = jacobi(n, alpha - 0.5, alpha - 0.5, monic=monic)
+ if monic or n == 0:
+ return base
+ # Abrahmowitz and Stegan 22.5.20
+ factor = (_gam(2*alpha + n) * _gam(alpha + 0.5) /
+ _gam(2*alpha) / _gam(alpha + 0.5 + n))
+ base._scale(factor)
+ base.__dict__['_eval_func'] = lambda x: _ufuncs.eval_gegenbauer(float(n),
+ alpha, x)
+ return base
+
+# Chebyshev of the first kind: T_n(x) =
+# n! sqrt(pi) / _gam(n+1./2)* P^(-1/2,-1/2)_n(x)
+# Computed anew.
+
+
+def roots_chebyt(n, mu=False):
+ r"""Gauss-Chebyshev (first kind) quadrature.
+
+ Computes the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ Chebyshev polynomial of the first kind, :math:`T_n(x)`. These
+ sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[-1, 1]`
+ with weight function :math:`w(x) = 1/\sqrt{1 - x^2}`. See 22.2.4
+ in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+ numpy.polynomial.chebyshev.chebgauss
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError('n must be a positive integer.')
+ x = _ufuncs._sinpi(np.arange(-m + 1, m, 2) / (2*m))
+ w = np.full_like(x, pi/m)
+ if mu:
+ return x, w, pi
+ else:
+ return x, w
+
+
+def chebyt(n, monic=False):
+ r"""Chebyshev polynomial of the first kind.
+
+ Defined to be the solution of
+
+ .. math::
+ (1 - x^2)\frac{d^2}{dx^2}T_n - x\frac{d}{dx}T_n + n^2T_n = 0;
+
+ :math:`T_n` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ T : orthopoly1d
+ Chebyshev polynomial of the first kind.
+
+ See Also
+ --------
+ chebyu : Chebyshev polynomial of the second kind.
+
+ Notes
+ -----
+ The polynomials :math:`T_n` are orthogonal over :math:`[-1, 1]`
+ with weight function :math:`(1 - x^2)^{-1/2}`.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ Chebyshev polynomials of the first kind of order :math:`n` can
+ be obtained as the determinant of specific :math:`n \times n`
+ matrices. As an example we can check how the points obtained from
+ the determinant of the following :math:`3 \times 3` matrix
+ lay exactly on :math:`T_3`:
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.linalg import det
+ >>> from scipy.special import chebyt
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-2.0, 2.0)
+ >>> ax.set_title(r'Chebyshev polynomial $T_3$')
+ >>> ax.plot(x, chebyt(3)(x), label=rf'$T_3$')
+ >>> for p in np.arange(-1.0, 1.0, 0.1):
+ ... ax.plot(p,
+ ... det(np.array([[p, 1, 0], [1, 2*p, 1], [0, 1, 2*p]])),
+ ... 'rx')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ They are also related to the Jacobi Polynomials
+ :math:`P_n^{(-0.5, -0.5)}` through the relation:
+
+ .. math::
+ P_n^{(-0.5, -0.5)}(x) = \frac{1}{4^n} \binom{2n}{n} T_n(x)
+
+ Let's verify it for :math:`n = 3`:
+
+ >>> from scipy.special import binom
+ >>> from scipy.special import jacobi
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> np.allclose(jacobi(3, -0.5, -0.5)(x),
+ ... 1/64 * binom(6, 3) * chebyt(3)(x))
+ True
+
+ We can plot the Chebyshev polynomials :math:`T_n` for some values
+ of :math:`n`:
+
+ >>> x = np.arange(-1.5, 1.5, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-4.0, 4.0)
+ >>> ax.set_title(r'Chebyshev polynomials $T_n$')
+ >>> for n in np.arange(2,5):
+ ... ax.plot(x, chebyt(n)(x), label=rf'$T_n={n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ def wfunc(x):
+ return 1.0 / sqrt(1 - x * x)
+ if n == 0:
+ return orthopoly1d([], [], pi, 1.0, wfunc, (-1, 1), monic,
+ lambda x: _ufuncs.eval_chebyt(n, x))
+ n1 = n
+ x, w, mu = roots_chebyt(n1, mu=True)
+ hn = pi / 2
+ kn = 2**(n - 1)
+ p = orthopoly1d(x, w, hn, kn, wfunc, (-1, 1), monic,
+ lambda x: _ufuncs.eval_chebyt(n, x))
+ return p
+
+# Chebyshev of the second kind
+# U_n(x) = (n+1)! sqrt(pi) / (2*_gam(n+3./2)) * P^(1/2,1/2)_n(x)
+
+
+def roots_chebyu(n, mu=False):
+ r"""Gauss-Chebyshev (second kind) quadrature.
+
+ Computes the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ Chebyshev polynomial of the second kind, :math:`U_n(x)`. These
+ sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[-1, 1]`
+ with weight function :math:`w(x) = \sqrt{1 - x^2}`. See 22.2.5 in
+ [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError('n must be a positive integer.')
+ t = np.arange(m, 0, -1) * pi / (m + 1)
+ x = np.cos(t)
+ w = pi * np.sin(t)**2 / (m + 1)
+ if mu:
+ return x, w, pi / 2
+ else:
+ return x, w
+
+
+def chebyu(n, monic=False):
+ r"""Chebyshev polynomial of the second kind.
+
+ Defined to be the solution of
+
+ .. math::
+ (1 - x^2)\frac{d^2}{dx^2}U_n - 3x\frac{d}{dx}U_n
+ + n(n + 2)U_n = 0;
+
+ :math:`U_n` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ U : orthopoly1d
+ Chebyshev polynomial of the second kind.
+
+ See Also
+ --------
+ chebyt : Chebyshev polynomial of the first kind.
+
+ Notes
+ -----
+ The polynomials :math:`U_n` are orthogonal over :math:`[-1, 1]`
+ with weight function :math:`(1 - x^2)^{1/2}`.
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ Chebyshev polynomials of the second kind of order :math:`n` can
+ be obtained as the determinant of specific :math:`n \times n`
+ matrices. As an example we can check how the points obtained from
+ the determinant of the following :math:`3 \times 3` matrix
+ lay exactly on :math:`U_3`:
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from scipy.linalg import det
+ >>> from scipy.special import chebyu
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-2.0, 2.0)
+ >>> ax.set_title(r'Chebyshev polynomial $U_3$')
+ >>> ax.plot(x, chebyu(3)(x), label=rf'$U_3$')
+ >>> for p in np.arange(-1.0, 1.0, 0.1):
+ ... ax.plot(p,
+ ... det(np.array([[2*p, 1, 0], [1, 2*p, 1], [0, 1, 2*p]])),
+ ... 'rx')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ They satisfy the recurrence relation:
+
+ .. math::
+ U_{2n-1}(x) = 2 T_n(x)U_{n-1}(x)
+
+ where the :math:`T_n` are the Chebyshev polynomial of the first kind.
+ Let's verify it for :math:`n = 2`:
+
+ >>> from scipy.special import chebyt
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> np.allclose(chebyu(3)(x), 2 * chebyt(2)(x) * chebyu(1)(x))
+ True
+
+ We can plot the Chebyshev polynomials :math:`U_n` for some values
+ of :math:`n`:
+
+ >>> x = np.arange(-1.0, 1.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-1.5, 1.5)
+ >>> ax.set_title(r'Chebyshev polynomials $U_n$')
+ >>> for n in np.arange(1,5):
+ ... ax.plot(x, chebyu(n)(x), label=rf'$U_n={n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ base = jacobi(n, 0.5, 0.5, monic=monic)
+ if monic:
+ return base
+ factor = sqrt(pi) / 2.0 * _gam(n + 2) / _gam(n + 1.5)
+ base._scale(factor)
+ return base
+
+# Chebyshev of the first kind C_n(x)
+
+
+def roots_chebyc(n, mu=False):
+ r"""Gauss-Chebyshev (first kind) quadrature.
+
+ Compute the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ Chebyshev polynomial of the first kind, :math:`C_n(x)`. These
+ sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[-2, 2]`
+ with weight function :math:`w(x) = 1 / \sqrt{1 - (x/2)^2}`. See
+ 22.2.6 in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ x, w, m = roots_chebyt(n, True)
+ x *= 2
+ w *= 2
+ m *= 2
+ if mu:
+ return x, w, m
+ else:
+ return x, w
+
+
+def chebyc(n, monic=False):
+ r"""Chebyshev polynomial of the first kind on :math:`[-2, 2]`.
+
+ Defined as :math:`C_n(x) = 2T_n(x/2)`, where :math:`T_n` is the
+ nth Chebychev polynomial of the first kind.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ C : orthopoly1d
+ Chebyshev polynomial of the first kind on :math:`[-2, 2]`.
+
+ See Also
+ --------
+ chebyt : Chebyshev polynomial of the first kind.
+
+ Notes
+ -----
+ The polynomials :math:`C_n(x)` are orthogonal over :math:`[-2, 2]`
+ with weight function :math:`1/\sqrt{1 - (x/2)^2}`.
+
+ References
+ ----------
+ .. [1] Abramowitz and Stegun, "Handbook of Mathematical Functions"
+ Section 22. National Bureau of Standards, 1972.
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_chebyc(n1)
+ if n == 0:
+ x, w = [], []
+ hn = 4 * pi * ((n == 0) + 1)
+ kn = 1.0
+ p = orthopoly1d(x, w, hn, kn,
+ wfunc=lambda x: 1.0 / sqrt(1 - x * x / 4.0),
+ limits=(-2, 2), monic=monic)
+ if not monic:
+ p._scale(2.0 / p(2))
+ p.__dict__['_eval_func'] = lambda x: _ufuncs.eval_chebyc(n, x)
+ return p
+
+# Chebyshev of the second kind S_n(x)
+
+
+def roots_chebys(n, mu=False):
+ r"""Gauss-Chebyshev (second kind) quadrature.
+
+ Compute the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ Chebyshev polynomial of the second kind, :math:`S_n(x)`. These
+ sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[-2, 2]`
+ with weight function :math:`w(x) = \sqrt{1 - (x/2)^2}`. See 22.2.7
+ in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ x, w, m = roots_chebyu(n, True)
+ x *= 2
+ w *= 2
+ m *= 2
+ if mu:
+ return x, w, m
+ else:
+ return x, w
+
+
+def chebys(n, monic=False):
+ r"""Chebyshev polynomial of the second kind on :math:`[-2, 2]`.
+
+ Defined as :math:`S_n(x) = U_n(x/2)` where :math:`U_n` is the
+ nth Chebychev polynomial of the second kind.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ S : orthopoly1d
+ Chebyshev polynomial of the second kind on :math:`[-2, 2]`.
+
+ See Also
+ --------
+ chebyu : Chebyshev polynomial of the second kind
+
+ Notes
+ -----
+ The polynomials :math:`S_n(x)` are orthogonal over :math:`[-2, 2]`
+ with weight function :math:`\sqrt{1 - (x/2)}^2`.
+
+ References
+ ----------
+ .. [1] Abramowitz and Stegun, "Handbook of Mathematical Functions"
+ Section 22. National Bureau of Standards, 1972.
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_chebys(n1)
+ if n == 0:
+ x, w = [], []
+ hn = pi
+ kn = 1.0
+ p = orthopoly1d(x, w, hn, kn,
+ wfunc=lambda x: sqrt(1 - x * x / 4.0),
+ limits=(-2, 2), monic=monic)
+ if not monic:
+ factor = (n + 1.0) / p(2)
+ p._scale(factor)
+ p.__dict__['_eval_func'] = lambda x: _ufuncs.eval_chebys(n, x)
+ return p
+
+# Shifted Chebyshev of the first kind T^*_n(x)
+
+
+def roots_sh_chebyt(n, mu=False):
+ r"""Gauss-Chebyshev (first kind, shifted) quadrature.
+
+ Compute the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ shifted Chebyshev polynomial of the first kind, :math:`T_n(x)`.
+ These sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[0, 1]`
+ with weight function :math:`w(x) = 1/\sqrt{x - x^2}`. See 22.2.8
+ in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ xw = roots_chebyt(n, mu)
+ return ((xw[0] + 1) / 2,) + xw[1:]
+
+
+def sh_chebyt(n, monic=False):
+ r"""Shifted Chebyshev polynomial of the first kind.
+
+ Defined as :math:`T^*_n(x) = T_n(2x - 1)` for :math:`T_n` the nth
+ Chebyshev polynomial of the first kind.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ T : orthopoly1d
+ Shifted Chebyshev polynomial of the first kind.
+
+ Notes
+ -----
+ The polynomials :math:`T^*_n` are orthogonal over :math:`[0, 1]`
+ with weight function :math:`(x - x^2)^{-1/2}`.
+
+ """
+ base = sh_jacobi(n, 0.0, 0.5, monic=monic)
+ if monic:
+ return base
+ if n > 0:
+ factor = 4**n / 2.0
+ else:
+ factor = 1.0
+ base._scale(factor)
+ return base
+
+
+# Shifted Chebyshev of the second kind U^*_n(x)
+def roots_sh_chebyu(n, mu=False):
+ r"""Gauss-Chebyshev (second kind, shifted) quadrature.
+
+ Computes the sample points and weights for Gauss-Chebyshev
+ quadrature. The sample points are the roots of the nth degree
+ shifted Chebyshev polynomial of the second kind, :math:`U_n(x)`.
+ These sample points and weights correctly integrate polynomials of
+ degree :math:`2n - 1` or less over the interval :math:`[0, 1]`
+ with weight function :math:`w(x) = \sqrt{x - x^2}`. See 22.2.9 in
+ [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ x, w, m = roots_chebyu(n, True)
+ x = (x + 1) / 2
+ m_us = _ufuncs.beta(1.5, 1.5)
+ w *= m_us / m
+ if mu:
+ return x, w, m_us
+ else:
+ return x, w
+
+
+def sh_chebyu(n, monic=False):
+ r"""Shifted Chebyshev polynomial of the second kind.
+
+ Defined as :math:`U^*_n(x) = U_n(2x - 1)` for :math:`U_n` the nth
+ Chebyshev polynomial of the second kind.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ U : orthopoly1d
+ Shifted Chebyshev polynomial of the second kind.
+
+ Notes
+ -----
+ The polynomials :math:`U^*_n` are orthogonal over :math:`[0, 1]`
+ with weight function :math:`(x - x^2)^{1/2}`.
+
+ """
+ base = sh_jacobi(n, 2.0, 1.5, monic=monic)
+ if monic:
+ return base
+ factor = 4**n
+ base._scale(factor)
+ return base
+
+# Legendre
+
+
+def roots_legendre(n, mu=False):
+ r"""Gauss-Legendre quadrature.
+
+ Compute the sample points and weights for Gauss-Legendre
+ quadrature [GL]_. The sample points are the roots of the nth degree
+ Legendre polynomial :math:`P_n(x)`. These sample points and
+ weights correctly integrate polynomials of degree :math:`2n - 1`
+ or less over the interval :math:`[-1, 1]` with weight function
+ :math:`w(x) = 1`. See 2.2.10 in [AS]_ for more details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+ numpy.polynomial.legendre.leggauss
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+ .. [GL] Gauss-Legendre quadrature, Wikipedia,
+ https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import roots_legendre, eval_legendre
+ >>> roots, weights = roots_legendre(9)
+
+ ``roots`` holds the roots, and ``weights`` holds the weights for
+ Gauss-Legendre quadrature.
+
+ >>> roots
+ array([-0.96816024, -0.83603111, -0.61337143, -0.32425342, 0. ,
+ 0.32425342, 0.61337143, 0.83603111, 0.96816024])
+ >>> weights
+ array([0.08127439, 0.18064816, 0.2606107 , 0.31234708, 0.33023936,
+ 0.31234708, 0.2606107 , 0.18064816, 0.08127439])
+
+ Verify that we have the roots by evaluating the degree 9 Legendre
+ polynomial at ``roots``. All the values are approximately zero:
+
+ >>> eval_legendre(9, roots)
+ array([-8.88178420e-16, -2.22044605e-16, 1.11022302e-16, 1.11022302e-16,
+ 0.00000000e+00, -5.55111512e-17, -1.94289029e-16, 1.38777878e-16,
+ -8.32667268e-17])
+
+ Here we'll show how the above values can be used to estimate the
+ integral from 1 to 2 of f(t) = t + 1/t with Gauss-Legendre
+ quadrature [GL]_. First define the function and the integration
+ limits.
+
+ >>> def f(t):
+ ... return t + 1/t
+ ...
+ >>> a = 1
+ >>> b = 2
+
+ We'll use ``integral(f(t), t=a, t=b)`` to denote the definite integral
+ of f from t=a to t=b. The sample points in ``roots`` are from the
+ interval [-1, 1], so we'll rewrite the integral with the simple change
+ of variable::
+
+ x = 2/(b - a) * t - (a + b)/(b - a)
+
+ with inverse::
+
+ t = (b - a)/2 * x + (a + b)/2
+
+ Then::
+
+ integral(f(t), a, b) =
+ (b - a)/2 * integral(f((b-a)/2*x + (a+b)/2), x=-1, x=1)
+
+ We can approximate the latter integral with the values returned
+ by `roots_legendre`.
+
+ Map the roots computed above from [-1, 1] to [a, b].
+
+ >>> t = (b - a)/2 * roots + (a + b)/2
+
+ Approximate the integral as the weighted sum of the function values.
+
+ >>> (b - a)/2 * f(t).dot(weights)
+ 2.1931471805599276
+
+ Compare that to the exact result, which is 3/2 + log(2):
+
+ >>> 1.5 + np.log(2)
+ 2.1931471805599454
+
+ """
+ m = int(n)
+ if n < 1 or n != m:
+ raise ValueError("n must be a positive integer.")
+
+ mu0 = 2.0
+ def an_func(k):
+ return 0.0 * k
+ def bn_func(k):
+ return k * np.sqrt(1.0 / (4 * k * k - 1))
+ f = _ufuncs.eval_legendre
+ def df(n, x):
+ return (-n * x * _ufuncs.eval_legendre(n, x)
+ + n * _ufuncs.eval_legendre(n - 1, x)) / (1 - x ** 2)
+ return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, True, mu)
+
+
+def legendre(n, monic=False):
+ r"""Legendre polynomial.
+
+ Defined to be the solution of
+
+ .. math::
+ \frac{d}{dx}\left[(1 - x^2)\frac{d}{dx}P_n(x)\right]
+ + n(n + 1)P_n(x) = 0;
+
+ :math:`P_n(x)` is a polynomial of degree :math:`n`.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ P : orthopoly1d
+ Legendre polynomial.
+
+ Notes
+ -----
+ The polynomials :math:`P_n` are orthogonal over :math:`[-1, 1]`
+ with weight function 1.
+
+ Examples
+ --------
+ Generate the 3rd-order Legendre polynomial 1/2*(5x^3 + 0x^2 - 3x + 0):
+
+ >>> from scipy.special import legendre
+ >>> legendre(3)
+ poly1d([ 2.5, 0. , -1.5, 0. ])
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ if n == 0:
+ n1 = n + 1
+ else:
+ n1 = n
+ x, w = roots_legendre(n1)
+ if n == 0:
+ x, w = [], []
+ hn = 2.0 / (2 * n + 1)
+ kn = _gam(2 * n + 1) / _gam(n + 1)**2 / 2.0**n
+ p = orthopoly1d(x, w, hn, kn, wfunc=lambda x: 1.0, limits=(-1, 1),
+ monic=monic,
+ eval_func=lambda x: _ufuncs.eval_legendre(n, x))
+ return p
+
+# Shifted Legendre P^*_n(x)
+
+
+def roots_sh_legendre(n, mu=False):
+ r"""Gauss-Legendre (shifted) quadrature.
+
+ Compute the sample points and weights for Gauss-Legendre
+ quadrature. The sample points are the roots of the nth degree
+ shifted Legendre polynomial :math:`P^*_n(x)`. These sample points
+ and weights correctly integrate polynomials of degree :math:`2n -
+ 1` or less over the interval :math:`[0, 1]` with weight function
+ :math:`w(x) = 1.0`. See 2.2.11 in [AS]_ for details.
+
+ Parameters
+ ----------
+ n : int
+ quadrature order
+ mu : bool, optional
+ If True, return the sum of the weights, optional.
+
+ Returns
+ -------
+ x : ndarray
+ Sample points
+ w : ndarray
+ Weights
+ mu : float
+ Sum of the weights
+
+ See Also
+ --------
+ scipy.integrate.fixed_quad
+
+ References
+ ----------
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ """
+ x, w = roots_legendre(n)
+ x = (x + 1) / 2
+ w /= 2
+ if mu:
+ return x, w, 1.0
+ else:
+ return x, w
+
+
+def sh_legendre(n, monic=False):
+ r"""Shifted Legendre polynomial.
+
+ Defined as :math:`P^*_n(x) = P_n(2x - 1)` for :math:`P_n` the nth
+ Legendre polynomial.
+
+ Parameters
+ ----------
+ n : int
+ Degree of the polynomial.
+ monic : bool, optional
+ If `True`, scale the leading coefficient to be 1. Default is
+ `False`.
+
+ Returns
+ -------
+ P : orthopoly1d
+ Shifted Legendre polynomial.
+
+ Notes
+ -----
+ The polynomials :math:`P^*_n` are orthogonal over :math:`[0, 1]`
+ with weight function 1.
+
+ """
+ if n < 0:
+ raise ValueError("n must be nonnegative.")
+
+ def wfunc(x):
+ return 0.0 * x + 1.0
+ if n == 0:
+ return orthopoly1d([], [], 1.0, 1.0, wfunc, (0, 1), monic,
+ lambda x: _ufuncs.eval_sh_legendre(n, x))
+ x, w = roots_sh_legendre(n)
+ hn = 1.0 / (2 * n + 1.0)
+ kn = _gam(2 * n + 1) / _gam(n + 1)**2
+ p = orthopoly1d(x, w, hn, kn, wfunc, limits=(0, 1), monic=monic,
+ eval_func=lambda x: _ufuncs.eval_sh_legendre(n, x))
+ return p
+
+
+# Make the old root function names an alias for the new ones
+_modattrs = globals()
+for newfun, oldfun in _rootfuns_map.items():
+ _modattrs[oldfun] = _modattrs[newfun]
+ __all__.append(oldfun)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..298f13ca35f1f497e2c4cec9d4f1e5cf0ed028c1
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_orthogonal.pyi
@@ -0,0 +1,330 @@
+from typing import (
+ Any,
+ Literal,
+ Optional,
+ overload,
+)
+from collections.abc import Callable
+
+import numpy as np
+
+_IntegerType = int | np.integer
+_FloatingType = float | np.floating
+_PointsAndWeights = tuple[np.ndarray, np.ndarray]
+_PointsAndWeightsAndMu = tuple[np.ndarray, np.ndarray, float]
+
+_ArrayLike0D = bool | int | float | complex | str | bytes | np.generic
+
+__all__ = [
+ 'legendre',
+ 'chebyt',
+ 'chebyu',
+ 'chebyc',
+ 'chebys',
+ 'jacobi',
+ 'laguerre',
+ 'genlaguerre',
+ 'hermite',
+ 'hermitenorm',
+ 'gegenbauer',
+ 'sh_legendre',
+ 'sh_chebyt',
+ 'sh_chebyu',
+ 'sh_jacobi',
+ 'roots_legendre',
+ 'roots_chebyt',
+ 'roots_chebyu',
+ 'roots_chebyc',
+ 'roots_chebys',
+ 'roots_jacobi',
+ 'roots_laguerre',
+ 'roots_genlaguerre',
+ 'roots_hermite',
+ 'roots_hermitenorm',
+ 'roots_gegenbauer',
+ 'roots_sh_legendre',
+ 'roots_sh_chebyt',
+ 'roots_sh_chebyu',
+ 'roots_sh_jacobi',
+]
+
+@overload
+def roots_jacobi(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ beta: _FloatingType,
+) -> _PointsAndWeights: ...
+@overload
+def roots_jacobi(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ beta: _FloatingType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_jacobi(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ beta: _FloatingType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_sh_jacobi(
+ n: _IntegerType,
+ p1: _FloatingType,
+ q1: _FloatingType,
+) -> _PointsAndWeights: ...
+@overload
+def roots_sh_jacobi(
+ n: _IntegerType,
+ p1: _FloatingType,
+ q1: _FloatingType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_sh_jacobi(
+ n: _IntegerType,
+ p1: _FloatingType,
+ q1: _FloatingType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_genlaguerre(
+ n: _IntegerType,
+ alpha: _FloatingType,
+) -> _PointsAndWeights: ...
+@overload
+def roots_genlaguerre(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_genlaguerre(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_laguerre(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_laguerre(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_laguerre(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_hermite(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_hermite(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_hermite(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_hermitenorm(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_hermitenorm(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_hermitenorm(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_gegenbauer(
+ n: _IntegerType,
+ alpha: _FloatingType,
+) -> _PointsAndWeights: ...
+@overload
+def roots_gegenbauer(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_gegenbauer(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_chebyt(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_chebyt(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_chebyt(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_chebyu(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_chebyu(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_chebyu(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_chebyc(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_chebyc(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_chebyc(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_chebys(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_chebys(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_chebys(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_sh_chebyt(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_sh_chebyt(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_sh_chebyt(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_sh_chebyu(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_sh_chebyu(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_sh_chebyu(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_legendre(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_legendre(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_legendre(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+@overload
+def roots_sh_legendre(n: _IntegerType) -> _PointsAndWeights: ...
+@overload
+def roots_sh_legendre(
+ n: _IntegerType,
+ mu: Literal[False],
+) -> _PointsAndWeights: ...
+@overload
+def roots_sh_legendre(
+ n: _IntegerType,
+ mu: Literal[True],
+) -> _PointsAndWeightsAndMu: ...
+
+class orthopoly1d(np.poly1d):
+ def __init__(
+ self,
+ roots: np.typing.ArrayLike,
+ weights: np.typing.ArrayLike | None,
+ hn: float = ...,
+ kn: float = ...,
+ wfunc = Optional[Callable[[float], float]], # noqa: UP045
+ limits = tuple[float, float] | None,
+ monic: bool = ...,
+ eval_func: np.ufunc = ...,
+ ) -> None: ...
+ @property
+ def limits(self) -> tuple[float, float]: ...
+ def weight_func(self, x: float) -> float: ...
+ @overload
+ def __call__(self, x: _ArrayLike0D) -> Any: ...
+ @overload
+ def __call__(self, x: np.poly1d) -> np.poly1d: ... # type: ignore[overload-overlap]
+ @overload
+ def __call__(self, x: np.typing.ArrayLike) -> np.ndarray: ...
+
+def legendre(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def chebyt(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def chebyu(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def chebyc(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def chebys(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def jacobi(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ beta: _FloatingType,
+ monic: bool = ...,
+) -> orthopoly1d: ...
+def laguerre(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def genlaguerre(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ monic: bool = ...,
+) -> orthopoly1d: ...
+def hermite(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def hermitenorm(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def gegenbauer(
+ n: _IntegerType,
+ alpha: _FloatingType,
+ monic: bool = ...,
+) -> orthopoly1d: ...
+def sh_legendre(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def sh_chebyt(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def sh_chebyu(n: _IntegerType, monic: bool = ...) -> orthopoly1d: ...
+def sh_jacobi(
+ n: _IntegerType,
+ p: _FloatingType,
+ q: _FloatingType,
+ monic: bool = ...,
+) -> orthopoly1d: ...
+
+# These functions are not public, but still need stubs because they
+# get checked in the tests.
+def _roots_hermite_asy(n: _IntegerType) -> _PointsAndWeights: ...
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___init__.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___pycache__
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/.___pycache__ differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._cosine_cdf.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._cosine_cdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._cosine_cdf.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._expn_asy.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._expn_asy.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._expn_asy.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_asy.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_asy.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_asy.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._gammainc_data.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._hyp2f1_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._hyp2f1_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._hyp2f1_data.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._lambertw.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._lambertw.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._lambertw.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._loggamma.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._loggamma.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._loggamma.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._struve_convergence.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._struve_convergence.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._struve_convergence.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._utils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._utils.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wright_bessel_data.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wrightomega.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wrightomega.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._wrightomega.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._zetac.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._zetac.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/._zetac.py differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/__init__.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/cosine_cdf.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/cosine_cdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..662c12bc74b31478c87471fbd1cce8bea285e765
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/cosine_cdf.py
@@ -0,0 +1,17 @@
+import mpmath
+
+
+def f(x):
+ return (mpmath.pi + x + mpmath.sin(x)) / (2*mpmath.pi)
+
+
+# Note: 40 digits might be overkill; a few more digits than the default
+# might be sufficient.
+mpmath.mp.dps = 40
+ts = mpmath.taylor(f, -mpmath.pi, 20)
+p, q = mpmath.pade(ts, 9, 10)
+
+p = [float(c) for c in p]
+q = [float(c) for c in q]
+print('p =', p)
+print('q =', q)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/expn_asy.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/expn_asy.py
new file mode 100644
index 0000000000000000000000000000000000000000..3491b8acd588a2cacfc48f0a3a60c6ae88c3e8c5
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/expn_asy.py
@@ -0,0 +1,54 @@
+"""Precompute the polynomials for the asymptotic expansion of the
+generalized exponential integral.
+
+Sources
+-------
+[1] NIST, Digital Library of Mathematical Functions,
+ https://dlmf.nist.gov/8.20#ii
+
+"""
+import os
+
+try:
+ import sympy
+ from sympy import Poly
+ x = sympy.symbols('x')
+except ImportError:
+ pass
+
+
+def generate_A(K):
+ A = [Poly(1, x)]
+ for k in range(K):
+ A.append(Poly(1 - 2*k*x, x)*A[k] + Poly(x*(x + 1))*A[k].diff())
+ return A
+
+
+WARNING = """\
+/* This file was automatically generated by _precompute/expn_asy.py.
+ * Do not edit it manually!
+ */
+"""
+
+
+def main():
+ print(__doc__)
+ fn = os.path.join('..', 'cephes', 'expn.h')
+
+ K = 12
+ A = generate_A(K)
+ with open(fn + '.new', 'w') as f:
+ f.write(WARNING)
+ f.write(f"#define nA {len(A)}\n")
+ for k, Ak in enumerate(A):
+ ', '.join([str(x.evalf(18)) for x in Ak.coeffs()])
+ f.write(f"static const double A{k}[] = {{tmp}};\n")
+ ", ".join([f"A{k}" for k in range(K + 1)])
+ f.write("static const double *A[] = {{tmp}};\n")
+ ", ".join([str(Ak.degree()) for Ak in A])
+ f.write("static const int Adegs[] = {{tmp}};\n")
+ os.rename(fn + '.new', fn)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_asy.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_asy.py
new file mode 100644
index 0000000000000000000000000000000000000000..98035457c78706ae01c02273ae1ab458b4ca140d
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_asy.py
@@ -0,0 +1,116 @@
+"""
+Precompute coefficients of Temme's asymptotic expansion for gammainc.
+
+This takes about 8 hours to run on a 2.3 GHz Macbook Pro with 4GB ram.
+
+Sources:
+[1] NIST, "Digital Library of Mathematical Functions",
+ https://dlmf.nist.gov/
+
+"""
+import os
+from scipy.special._precompute.utils import lagrange_inversion
+
+try:
+ import mpmath as mp
+except ImportError:
+ pass
+
+
+def compute_a(n):
+ """a_k from DLMF 5.11.6"""
+ a = [mp.sqrt(2)/2]
+ for k in range(1, n):
+ ak = a[-1]/k
+ for j in range(1, len(a)):
+ ak -= a[j]*a[-j]/(j + 1)
+ ak /= a[0]*(1 + mp.mpf(1)/(k + 1))
+ a.append(ak)
+ return a
+
+
+def compute_g(n):
+ """g_k from DLMF 5.11.3/5.11.5"""
+ a = compute_a(2*n)
+ g = [mp.sqrt(2)*mp.rf(0.5, k)*a[2*k] for k in range(n)]
+ return g
+
+
+def eta(lam):
+ """Function from DLMF 8.12.1 shifted to be centered at 0."""
+ if lam > 0:
+ return mp.sqrt(2*(lam - mp.log(lam + 1)))
+ elif lam < 0:
+ return -mp.sqrt(2*(lam - mp.log(lam + 1)))
+ else:
+ return 0
+
+
+def compute_alpha(n):
+ """alpha_n from DLMF 8.12.13"""
+ coeffs = mp.taylor(eta, 0, n - 1)
+ return lagrange_inversion(coeffs)
+
+
+def compute_d(K, N):
+ """d_{k, n} from DLMF 8.12.12"""
+ M = N + 2*K
+ d0 = [-mp.mpf(1)/3]
+ alpha = compute_alpha(M + 2)
+ for n in range(1, M):
+ d0.append((n + 2)*alpha[n+2])
+ d = [d0]
+ g = compute_g(K)
+ for k in range(1, K):
+ dk = []
+ for n in range(M - 2*k):
+ dk.append((-1)**k*g[k]*d[0][n] + (n + 2)*d[k-1][n+2])
+ d.append(dk)
+ for k in range(K):
+ d[k] = d[k][:N]
+ return d
+
+
+header = \
+r"""/* This file was automatically generated by _precomp/gammainc.py.
+ * Do not edit it manually!
+ */
+
+#ifndef IGAM_H
+#define IGAM_H
+
+#define K {}
+#define N {}
+
+static const double d[K][N] =
+{{"""
+
+footer = \
+r"""
+#endif
+"""
+
+
+def main():
+ print(__doc__)
+ K = 25
+ N = 25
+ with mp.workdps(50):
+ d = compute_d(K, N)
+ fn = os.path.join(os.path.dirname(__file__), '..', 'cephes', 'igam.h')
+ with open(fn + '.new', 'w') as f:
+ f.write(header.format(K, N))
+ for k, row in enumerate(d):
+ row = [mp.nstr(x, 17, min_fixed=0, max_fixed=0) for x in row]
+ f.write('{')
+ f.write(", ".join(row))
+ if k < K - 1:
+ f.write('},\n')
+ else:
+ f.write('}};\n')
+ f.write(footer)
+ os.rename(fn + '.new', fn)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ebbe39f6159fb80c424dbb38eedeba46bd8cccf2
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/gammainc_data.py
@@ -0,0 +1,124 @@
+"""Compute gammainc and gammaincc for large arguments and parameters
+and save the values to data files for use in tests. We can't just
+compare to mpmath's gammainc in test_mpmath.TestSystematic because it
+would take too long.
+
+Note that mpmath's gammainc is computed using hypercomb, but since it
+doesn't allow the user to increase the maximum number of terms used in
+the series it doesn't converge for many arguments. To get around this
+we copy the mpmath implementation but use more terms.
+
+This takes about 17 minutes to run on a 2.3 GHz Macbook Pro with 4GB
+ram.
+
+Sources:
+[1] Fredrik Johansson and others. mpmath: a Python library for
+ arbitrary-precision floating-point arithmetic (version 0.19),
+ December 2013. http://mpmath.org/.
+
+"""
+import os
+from time import time
+import numpy as np
+from numpy import pi
+
+from scipy.special._mptestutils import mpf2float
+
+try:
+ import mpmath as mp
+except ImportError:
+ pass
+
+
+def gammainc(a, x, dps=50, maxterms=10**8):
+ """Compute gammainc exactly like mpmath does but allow for more
+ summands in hypercomb. See
+
+ mpmath/functions/expintegrals.py#L134
+
+ in the mpmath GitHub repository.
+
+ """
+ with mp.workdps(dps):
+ z, a, b = mp.mpf(a), mp.mpf(x), mp.mpf(x)
+ G = [z]
+ negb = mp.fneg(b, exact=True)
+
+ def h(z):
+ T1 = [mp.exp(negb), b, z], [1, z, -1], [], G, [1], [1+z], b
+ return (T1,)
+
+ res = mp.hypercomb(h, [z], maxterms=maxterms)
+ return mpf2float(res)
+
+
+def gammaincc(a, x, dps=50, maxterms=10**8):
+ """Compute gammaincc exactly like mpmath does but allow for more
+ terms in hypercomb. See
+
+ mpmath/functions/expintegrals.py#L187
+
+ in the mpmath GitHub repository.
+
+ """
+ with mp.workdps(dps):
+ z, a = a, x
+
+ if mp.isint(z):
+ try:
+ # mpmath has a fast integer path
+ return mpf2float(mp.gammainc(z, a=a, regularized=True))
+ except mp.libmp.NoConvergence:
+ pass
+ nega = mp.fneg(a, exact=True)
+ G = [z]
+ # Use 2F0 series when possible; fall back to lower gamma representation
+ try:
+ def h(z):
+ r = z-1
+ return [([mp.exp(nega), a], [1, r], [], G, [1, -r], [], 1/nega)]
+ return mpf2float(mp.hypercomb(h, [z], force_series=True))
+ except mp.libmp.NoConvergence:
+ def h(z):
+ T1 = [], [1, z-1], [z], G, [], [], 0
+ T2 = [-mp.exp(nega), a, z], [1, z, -1], [], G, [1], [1+z], a
+ return T1, T2
+ return mpf2float(mp.hypercomb(h, [z], maxterms=maxterms))
+
+
+def main():
+ t0 = time()
+ # It would be nice to have data for larger values, but either this
+ # requires prohibitively large precision (dps > 800) or mpmath has
+ # a bug. For example, gammainc(1e20, 1e20, dps=800) returns a
+ # value around 0.03, while the true value should be close to 0.5
+ # (DLMF 8.12.15).
+ print(__doc__)
+ pwd = os.path.dirname(__file__)
+ r = np.logspace(4, 14, 30)
+ ltheta = np.logspace(np.log10(pi/4), np.log10(np.arctan(0.6)), 30)
+ utheta = np.logspace(np.log10(pi/4), np.log10(np.arctan(1.4)), 30)
+
+ regimes = [(gammainc, ltheta), (gammaincc, utheta)]
+ for func, theta in regimes:
+ rg, thetag = np.meshgrid(r, theta)
+ a, x = rg*np.cos(thetag), rg*np.sin(thetag)
+ a, x = a.flatten(), x.flatten()
+ dataset = []
+ for i, (a0, x0) in enumerate(zip(a, x)):
+ if func == gammaincc:
+ # Exploit the fast integer path in gammaincc whenever
+ # possible so that the computation doesn't take too
+ # long
+ a0, x0 = np.floor(a0), np.floor(x0)
+ dataset.append((a0, x0, func(a0, x0)))
+ dataset = np.array(dataset)
+ filename = os.path.join(pwd, '..', 'tests', 'data', 'local',
+ f'{func.__name__}.txt')
+ np.savetxt(filename, dataset)
+
+ print(f"{(time() - t0)/60} minutes elapsed")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/hyp2f1_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/hyp2f1_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..c4adf14f49184bf75048a28a823909d24e778e04
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/hyp2f1_data.py
@@ -0,0 +1,484 @@
+"""This script evaluates scipy's implementation of hyp2f1 against mpmath's.
+
+Author: Albert Steppi
+
+This script is long running and generates a large output file. With default
+arguments, the generated file is roughly 700MB in size and it takes around
+40 minutes using an Intel(R) Core(TM) i5-8250U CPU with n_jobs set to 8
+(full utilization). There are optional arguments which can be used to restrict
+(or enlarge) the computations performed. These are described below.
+The output of this script can be analyzed to identify suitable test cases and
+to find parameter and argument regions where hyp2f1 needs to be improved.
+
+The script has one mandatory positional argument for specifying the path to
+the location where the output file is to be placed, and 4 optional arguments
+--n_jobs, --grid_size, --regions, and --parameter_groups. --n_jobs specifies
+the number of processes to use if running in parallel. The default value is 1.
+The other optional arguments are explained below.
+
+Produces a tab separated values file with 11 columns. The first four columns
+contain the parameters a, b, c and the argument z. The next two contain |z| and
+a region code for which region of the complex plane belongs to. The regions are
+
+ 0) z == 1
+ 1) |z| < 0.9 and real(z) >= 0
+ 2) |z| <= 1 and real(z) < 0
+ 3) 0.9 <= |z| <= 1 and |1 - z| < 0.9:
+ 4) 0.9 <= |z| <= 1 and |1 - z| >= 0.9 and real(z) >= 0:
+ 5) 1 < |z| < 1.1 and |1 - z| >= 0.9 and real(z) >= 0
+ 6) |z| > 1 and not in 5)
+
+The --regions optional argument allows the user to specify a list of regions
+to which computation will be restricted.
+
+Parameters a, b, c are taken from a 10 * 10 * 10 grid with values at
+
+ -16, -8, -4, -2, -1, 1, 2, 4, 8, 16
+
+with random perturbations applied.
+
+There are 9 parameter groups handling the following cases.
+
+ 1) A, B, C, B - A, C - A, C - B, C - A - B all non-integral.
+ 2) B - A integral
+ 3) C - A integral
+ 4) C - B integral
+ 5) C - A - B integral
+ 6) A integral
+ 7) B integral
+ 8) C integral
+ 9) Wider range with c - a - b > 0.
+
+The seventh column of the output file is an integer between 1 and 8 specifying
+the parameter group as above.
+
+The --parameter_groups optional argument allows the user to specify a list of
+parameter groups to which computation will be restricted.
+
+The argument z is taken from a grid in the box
+ -box_size <= real(z) <= box_size, -box_size <= imag(z) <= box_size.
+with grid size specified using the optional command line argument --grid_size,
+and box_size specified with the command line argument --box_size.
+The default value of grid_size is 20 and the default value of box_size is 2.0,
+yielding a 20 * 20 grid in the box with corners -2-2j, -2+2j, 2-2j, 2+2j.
+
+The final four columns have the expected value of hyp2f1 for the given
+parameters and argument as calculated with mpmath, the observed value
+calculated with scipy's hyp2f1, the relative error, and the absolute error.
+
+As special cases of hyp2f1 are moved from the original Fortran implementation
+into Cython, this script can be used to ensure that no regressions occur and
+to point out where improvements are needed.
+"""
+
+
+import os
+import csv
+import argparse
+import numpy as np
+from itertools import product
+from multiprocessing import Pool
+
+
+from scipy.special import hyp2f1
+from scipy.special.tests.test_hyp2f1 import mp_hyp2f1
+
+
+def get_region(z):
+ """Assign numbers for regions where hyp2f1 must be handled differently."""
+ if z == 1 + 0j:
+ return 0
+ elif abs(z) < 0.9 and z.real >= 0:
+ return 1
+ elif abs(z) <= 1 and z.real < 0:
+ return 2
+ elif 0.9 <= abs(z) <= 1 and abs(1 - z) < 0.9:
+ return 3
+ elif 0.9 <= abs(z) <= 1 and abs(1 - z) >= 0.9:
+ return 4
+ elif 1 < abs(z) < 1.1 and abs(1 - z) >= 0.9 and z.real >= 0:
+ return 5
+ else:
+ return 6
+
+
+def get_result(a, b, c, z, group):
+ """Get results for given parameter and value combination."""
+ expected, observed = mp_hyp2f1(a, b, c, z), hyp2f1(a, b, c, z)
+ if (
+ np.isnan(observed) and np.isnan(expected) or
+ expected == observed
+ ):
+ relative_error = 0.0
+ absolute_error = 0.0
+ elif np.isnan(observed):
+ # Set error to infinity if result is nan when not expected to be.
+ # Makes results easier to interpret.
+ relative_error = float("inf")
+ absolute_error = float("inf")
+ else:
+ absolute_error = abs(expected - observed)
+ relative_error = absolute_error / abs(expected)
+
+ return (
+ a,
+ b,
+ c,
+ z,
+ abs(z),
+ get_region(z),
+ group,
+ expected,
+ observed,
+ relative_error,
+ absolute_error,
+ )
+
+
+def get_result_no_mp(a, b, c, z, group):
+ """Get results for given parameter and value combination."""
+ expected, observed = complex('nan'), hyp2f1(a, b, c, z)
+ relative_error, absolute_error = float('nan'), float('nan')
+ return (
+ a,
+ b,
+ c,
+ z,
+ abs(z),
+ get_region(z),
+ group,
+ expected,
+ observed,
+ relative_error,
+ absolute_error,
+ )
+
+
+def get_results(params, Z, n_jobs=1, compute_mp=True):
+ """Batch compute results for multiple parameter and argument values.
+
+ Parameters
+ ----------
+ params : iterable
+ iterable of tuples of floats (a, b, c) specifying parameter values
+ a, b, c for hyp2f1
+ Z : iterable of complex
+ Arguments at which to evaluate hyp2f1
+ n_jobs : Optional[int]
+ Number of jobs for parallel execution.
+
+ Returns
+ -------
+ list
+ List of tuples of results values. See return value in source code
+ of `get_result`.
+ """
+ input_ = (
+ (a, b, c, z, group) for (a, b, c, group), z in product(params, Z)
+ )
+
+ with Pool(n_jobs) as pool:
+ rows = pool.starmap(
+ get_result if compute_mp else get_result_no_mp,
+ input_
+ )
+ return rows
+
+
+def _make_hyp2f1_test_case(a, b, c, z, rtol):
+ """Generate string for single test case as used in test_hyp2f1.py."""
+ expected = mp_hyp2f1(a, b, c, z)
+ return (
+ " pytest.param(\n"
+ " Hyp2f1TestCase(\n"
+ f" a={a},\n"
+ f" b={b},\n"
+ f" c={c},\n"
+ f" z={z},\n"
+ f" expected={expected},\n"
+ f" rtol={rtol},\n"
+ " ),\n"
+ " ),"
+ )
+
+
+def make_hyp2f1_test_cases(rows):
+ """Generate string for a list of test cases for test_hyp2f1.py.
+
+ Parameters
+ ----------
+ rows : list
+ List of lists of the form [a, b, c, z, rtol] where a, b, c, z are
+ parameters and the argument for hyp2f1 and rtol is an expected
+ relative error for the associated test case.
+
+ Returns
+ -------
+ str
+ String for a list of test cases. The output string can be printed
+ or saved to a file and then copied into an argument for
+ `pytest.mark.parameterize` within `scipy.special.tests.test_hyp2f1.py`.
+ """
+ result = "[\n"
+ result += '\n'.join(
+ _make_hyp2f1_test_case(a, b, c, z, rtol)
+ for a, b, c, z, rtol in rows
+ )
+ result += "\n]"
+ return result
+
+
+def main(
+ outpath,
+ n_jobs=1,
+ box_size=2.0,
+ grid_size=20,
+ regions=None,
+ parameter_groups=None,
+ compute_mp=True,
+):
+ outpath = os.path.realpath(os.path.expanduser(outpath))
+
+ random_state = np.random.RandomState(1234)
+ # Parameters a, b, c selected near these values.
+ root_params = np.array(
+ [-16, -8, -4, -2, -1, 1, 2, 4, 8, 16]
+ )
+ # Perturbations to apply to root values.
+ perturbations = 0.1 * random_state.random_sample(
+ size=(3, len(root_params))
+ )
+
+ params = []
+ # Parameter group 1
+ # -----------------
+ # No integer differences. This has been confirmed for the above seed.
+ A = root_params + perturbations[0, :]
+ B = root_params + perturbations[1, :]
+ C = root_params + perturbations[2, :]
+ params.extend(
+ sorted(
+ ((a, b, c, 1) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 2
+ # -----------------
+ # B - A an integer
+ A = root_params + 0.5
+ B = root_params + 0.5
+ C = root_params + perturbations[1, :]
+ params.extend(
+ sorted(
+ ((a, b, c, 2) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 3
+ # -----------------
+ # C - A an integer
+ A = root_params + 0.5
+ B = root_params + perturbations[1, :]
+ C = root_params + 0.5
+ params.extend(
+ sorted(
+ ((a, b, c, 3) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 4
+ # -----------------
+ # C - B an integer
+ A = root_params + perturbations[0, :]
+ B = root_params + 0.5
+ C = root_params + 0.5
+ params.extend(
+ sorted(
+ ((a, b, c, 4) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 5
+ # -----------------
+ # C - A - B an integer
+ A = root_params + 0.25
+ B = root_params + 0.25
+ C = root_params + 0.5
+ params.extend(
+ sorted(
+ ((a, b, c, 5) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 6
+ # -----------------
+ # A an integer
+ A = root_params
+ B = root_params + perturbations[0, :]
+ C = root_params + perturbations[1, :]
+ params.extend(
+ sorted(
+ ((a, b, c, 6) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 7
+ # -----------------
+ # B an integer
+ A = root_params + perturbations[0, :]
+ B = root_params
+ C = root_params + perturbations[1, :]
+ params.extend(
+ sorted(
+ ((a, b, c, 7) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 8
+ # -----------------
+ # C an integer
+ A = root_params + perturbations[0, :]
+ B = root_params + perturbations[1, :]
+ C = root_params
+ params.extend(
+ sorted(
+ ((a, b, c, 8) for a, b, c in product(A, B, C)),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+ )
+
+ # Parameter group 9
+ # -----------------
+ # Wide range of magnitudes, c - a - b > 0.
+ phi = (1 + np.sqrt(5))/2
+ P = phi**np.arange(16)
+ P = np.hstack([-P, P])
+ group_9_params = sorted(
+ (
+ (a, b, c, 9) for a, b, c in product(P, P, P) if c - a - b > 0
+ ),
+ key=lambda x: max(abs(x[0]), abs(x[1])),
+ )
+
+ if parameter_groups is not None:
+ # Group 9 params only used if specified in arguments.
+ params.extend(group_9_params)
+ params = [
+ (a, b, c, group) for a, b, c, group in params
+ if group in parameter_groups
+ ]
+
+ # grid_size * grid_size grid in box with corners
+ # -2 - 2j, -2 + 2j, 2 - 2j, 2 + 2j
+ X, Y = np.meshgrid(
+ np.linspace(-box_size, box_size, grid_size),
+ np.linspace(-box_size, box_size, grid_size)
+ )
+ Z = X + Y * 1j
+ Z = Z.flatten().tolist()
+ # Add z = 1 + 0j (region 0).
+ Z.append(1 + 0j)
+ if regions is not None:
+ Z = [z for z in Z if get_region(z) in regions]
+
+ # Evaluate scipy and mpmath's hyp2f1 for all parameter combinations
+ # above against all arguments in the grid Z
+ rows = get_results(params, Z, n_jobs=n_jobs, compute_mp=compute_mp)
+
+ with open(outpath, "w", newline="") as f:
+ writer = csv.writer(f, delimiter="\t")
+ writer.writerow(
+ [
+ "a",
+ "b",
+ "c",
+ "z",
+ "|z|",
+ "region",
+ "parameter_group",
+ "expected", # mpmath's hyp2f1
+ "observed", # scipy's hyp2f1
+ "relative_error",
+ "absolute_error",
+ ]
+ )
+ for row in rows:
+ writer.writerow(row)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description="Test scipy's hyp2f1 against mpmath's on a grid in the"
+ " complex plane over a grid of parameter values. Saves output to file"
+ " specified in positional argument \"outpath\"."
+ " Caution: With default arguments, the generated output file is"
+ " roughly 700MB in size. Script may take several hours to finish if"
+ " \"--n_jobs\" is set to 1."
+ )
+ parser.add_argument(
+ "outpath", type=str, help="Path to output tsv file."
+ )
+ parser.add_argument(
+ "--n_jobs",
+ type=int,
+ default=1,
+ help="Number of jobs for multiprocessing.",
+ )
+ parser.add_argument(
+ "--box_size",
+ type=float,
+ default=2.0,
+ help="hyp2f1 is evaluated in box of side_length 2*box_size centered"
+ " at the origin."
+ )
+ parser.add_argument(
+ "--grid_size",
+ type=int,
+ default=20,
+ help="hyp2f1 is evaluated on grid_size * grid_size grid in box of side"
+ " length 2*box_size centered at the origin."
+ )
+ parser.add_argument(
+ "--parameter_groups",
+ type=int,
+ nargs='+',
+ default=None,
+ help="Restrict to supplied parameter groups. See the Docstring for"
+ " this module for more info on parameter groups. Calculate for all"
+ " parameter groups by default."
+ )
+ parser.add_argument(
+ "--regions",
+ type=int,
+ nargs='+',
+ default=None,
+ help="Restrict to argument z only within the supplied regions. See"
+ " the Docstring for this module for more info on regions. Calculate"
+ " for all regions by default."
+ )
+ parser.add_argument(
+ "--no_mp",
+ action='store_true',
+ help="If this flag is set, do not compute results with mpmath. Saves"
+ " time if results have already been computed elsewhere. Fills in"
+ " \"expected\" column with None values."
+ )
+ args = parser.parse_args()
+ compute_mp = not args.no_mp
+ print(args.parameter_groups)
+ main(
+ args.outpath,
+ n_jobs=args.n_jobs,
+ box_size=args.box_size,
+ grid_size=args.grid_size,
+ parameter_groups=args.parameter_groups,
+ regions=args.regions,
+ compute_mp=compute_mp,
+ )
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/lambertw.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/lambertw.py
new file mode 100644
index 0000000000000000000000000000000000000000..1fdbf35b2cf85f1f7a6e73579546ed5cfe508fa6
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/lambertw.py
@@ -0,0 +1,68 @@
+"""Compute a Pade approximation for the principal branch of the
+Lambert W function around 0 and compare it to various other
+approximations.
+
+"""
+import numpy as np
+
+try:
+ import mpmath
+ import matplotlib.pyplot as plt
+except ImportError:
+ pass
+
+
+def lambertw_pade():
+ derivs = [mpmath.diff(mpmath.lambertw, 0, n=n) for n in range(6)]
+ p, q = mpmath.pade(derivs, 3, 2)
+ return p, q
+
+
+def main():
+ print(__doc__)
+ with mpmath.workdps(50):
+ p, q = lambertw_pade()
+ p, q = p[::-1], q[::-1]
+ print(f"p = {p}")
+ print(f"q = {q}")
+
+ x, y = np.linspace(-1.5, 1.5, 75), np.linspace(-1.5, 1.5, 75)
+ x, y = np.meshgrid(x, y)
+ z = x + 1j*y
+ lambertw_std = []
+ for z0 in z.flatten():
+ lambertw_std.append(complex(mpmath.lambertw(z0)))
+ lambertw_std = np.array(lambertw_std).reshape(x.shape)
+
+ fig, axes = plt.subplots(nrows=3, ncols=1)
+ # Compare Pade approximation to true result
+ p = np.array([float(p0) for p0 in p])
+ q = np.array([float(q0) for q0 in q])
+ pade_approx = np.polyval(p, z)/np.polyval(q, z)
+ pade_err = abs(pade_approx - lambertw_std)
+ axes[0].pcolormesh(x, y, pade_err)
+ # Compare two terms of asymptotic series to true result
+ asy_approx = np.log(z) - np.log(np.log(z))
+ asy_err = abs(asy_approx - lambertw_std)
+ axes[1].pcolormesh(x, y, asy_err)
+ # Compare two terms of the series around the branch point to the
+ # true result
+ p = np.sqrt(2*(np.exp(1)*z + 1))
+ series_approx = -1 + p - p**2/3
+ series_err = abs(series_approx - lambertw_std)
+ im = axes[2].pcolormesh(x, y, series_err)
+
+ fig.colorbar(im, ax=axes.ravel().tolist())
+ plt.show()
+
+ fig, ax = plt.subplots(nrows=1, ncols=1)
+ pade_better = pade_err < asy_err
+ im = ax.pcolormesh(x, y, pade_better)
+ t = np.linspace(-0.3, 0.3)
+ ax.plot(-2.5*abs(t) - 0.2, t, 'r')
+ fig.colorbar(im, ax=ax)
+ plt.show()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/loggamma.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/loggamma.py
new file mode 100644
index 0000000000000000000000000000000000000000..74051ac7b46c70dc01919a362d05a8bbbe11333a
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/loggamma.py
@@ -0,0 +1,43 @@
+"""Precompute series coefficients for log-Gamma."""
+
+try:
+ import mpmath
+except ImportError:
+ pass
+
+
+def stirling_series(N):
+ with mpmath.workdps(100):
+ coeffs = [mpmath.bernoulli(2*n)/(2*n*(2*n - 1))
+ for n in range(1, N + 1)]
+ return coeffs
+
+
+def taylor_series_at_1(N):
+ coeffs = []
+ with mpmath.workdps(100):
+ coeffs.append(-mpmath.euler)
+ for n in range(2, N + 1):
+ coeffs.append((-1)**n*mpmath.zeta(n)/n)
+ return coeffs
+
+
+def main():
+ print(__doc__)
+ print()
+ stirling_coeffs = [mpmath.nstr(x, 20, min_fixed=0, max_fixed=0)
+ for x in stirling_series(8)[::-1]]
+ taylor_coeffs = [mpmath.nstr(x, 20, min_fixed=0, max_fixed=0)
+ for x in taylor_series_at_1(23)[::-1]]
+ print("Stirling series coefficients")
+ print("----------------------------")
+ print("\n".join(stirling_coeffs))
+ print()
+ print("Taylor series coefficients")
+ print("--------------------------")
+ print("\n".join(taylor_coeffs))
+ print()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/struve_convergence.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/struve_convergence.py
new file mode 100644
index 0000000000000000000000000000000000000000..dbf6009368540dbf603b61f5b72510f0acd1a65b
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/struve_convergence.py
@@ -0,0 +1,131 @@
+"""
+Convergence regions of the expansions used in ``struve.c``
+
+Note that for v >> z both functions tend rapidly to 0,
+and for v << -z, they tend to infinity.
+
+The floating-point functions over/underflow in the lower left and right
+corners of the figure.
+
+
+Figure legend
+=============
+
+Red region
+ Power series is close (1e-12) to the mpmath result
+
+Blue region
+ Asymptotic series is close to the mpmath result
+
+Green region
+ Bessel series is close to the mpmath result
+
+Dotted colored lines
+ Boundaries of the regions
+
+Solid colored lines
+ Boundaries estimated by the routine itself. These will be used
+ for determining which of the results to use.
+
+Black dashed line
+ The line z = 0.7*|v| + 12
+
+"""
+import numpy as np
+import matplotlib.pyplot as plt
+
+import mpmath
+
+
+def err_metric(a, b, atol=1e-290):
+ m = abs(a - b) / (atol + abs(b))
+ m[np.isinf(b) & (a == b)] = 0
+ return m
+
+
+def do_plot(is_h=True):
+ from scipy.special._ufuncs import (_struve_power_series,
+ _struve_asymp_large_z,
+ _struve_bessel_series)
+
+ vs = np.linspace(-1000, 1000, 91)
+ zs = np.sort(np.r_[1e-5, 1.0, np.linspace(0, 700, 91)[1:]])
+
+ rp = _struve_power_series(vs[:,None], zs[None,:], is_h)
+ ra = _struve_asymp_large_z(vs[:,None], zs[None,:], is_h)
+ rb = _struve_bessel_series(vs[:,None], zs[None,:], is_h)
+
+ mpmath.mp.dps = 50
+ if is_h:
+ def sh(v, z):
+ return float(mpmath.struveh(mpmath.mpf(v), mpmath.mpf(z)))
+ else:
+ def sh(v, z):
+ return float(mpmath.struvel(mpmath.mpf(v), mpmath.mpf(z)))
+ ex = np.vectorize(sh, otypes='d')(vs[:,None], zs[None,:])
+
+ err_a = err_metric(ra[0], ex) + 1e-300
+ err_p = err_metric(rp[0], ex) + 1e-300
+ err_b = err_metric(rb[0], ex) + 1e-300
+
+ err_est_a = abs(ra[1]/ra[0])
+ err_est_p = abs(rp[1]/rp[0])
+ err_est_b = abs(rb[1]/rb[0])
+
+ z_cutoff = 0.7*abs(vs) + 12
+
+ levels = [-1000, -12]
+
+ plt.cla()
+
+ plt.hold(1)
+ plt.contourf(vs, zs, np.log10(err_p).T,
+ levels=levels, colors=['r', 'r'], alpha=0.1)
+ plt.contourf(vs, zs, np.log10(err_a).T,
+ levels=levels, colors=['b', 'b'], alpha=0.1)
+ plt.contourf(vs, zs, np.log10(err_b).T,
+ levels=levels, colors=['g', 'g'], alpha=0.1)
+
+ plt.contour(vs, zs, np.log10(err_p).T,
+ levels=levels, colors=['r', 'r'], linestyles=[':', ':'])
+ plt.contour(vs, zs, np.log10(err_a).T,
+ levels=levels, colors=['b', 'b'], linestyles=[':', ':'])
+ plt.contour(vs, zs, np.log10(err_b).T,
+ levels=levels, colors=['g', 'g'], linestyles=[':', ':'])
+
+ lp = plt.contour(vs, zs, np.log10(err_est_p).T,
+ levels=levels, colors=['r', 'r'], linestyles=['-', '-'])
+ la = plt.contour(vs, zs, np.log10(err_est_a).T,
+ levels=levels, colors=['b', 'b'], linestyles=['-', '-'])
+ lb = plt.contour(vs, zs, np.log10(err_est_b).T,
+ levels=levels, colors=['g', 'g'], linestyles=['-', '-'])
+
+ plt.clabel(lp, fmt={-1000: 'P', -12: 'P'})
+ plt.clabel(la, fmt={-1000: 'A', -12: 'A'})
+ plt.clabel(lb, fmt={-1000: 'B', -12: 'B'})
+
+ plt.plot(vs, z_cutoff, 'k--')
+
+ plt.xlim(vs.min(), vs.max())
+ plt.ylim(zs.min(), zs.max())
+
+ plt.xlabel('v')
+ plt.ylabel('z')
+
+
+def main():
+ plt.clf()
+ plt.subplot(121)
+ do_plot(True)
+ plt.title('Struve H')
+
+ plt.subplot(122)
+ do_plot(False)
+ plt.title('Struve L')
+
+ plt.savefig('struve_convergence.png')
+ plt.show()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/utils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..55cf4083ed5e5a6628fd3316c02ce1a5ce21a92c
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/utils.py
@@ -0,0 +1,38 @@
+try:
+ import mpmath as mp
+except ImportError:
+ pass
+
+try:
+ from sympy.abc import x
+except ImportError:
+ pass
+
+
+def lagrange_inversion(a):
+ """Given a series
+
+ f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1),
+
+ use the Lagrange inversion formula to compute a series
+
+ g(x) = b[1]*x + b[2]*x**2 + ... + b[n-1]*x**(n - 1)
+
+ so that f(g(x)) = g(f(x)) = x mod x**n. We must have a[0] = 0, so
+ necessarily b[0] = 0 too.
+
+ The algorithm is naive and could be improved, but speed isn't an
+ issue here and it's easy to read.
+
+ """
+ n = len(a)
+ f = sum(a[i]*x**i for i in range(n))
+ h = (x/f).series(x, 0, n).removeO()
+ hpower = [h**0]
+ for k in range(n):
+ hpower.append((hpower[-1]*h).expand())
+ b = [mp.mpf(0)]
+ for k in range(1, n):
+ b.append(hpower[k].coeff(x, k - 1)/k)
+ b = [mp.mpf(x) for x in b]
+ return b
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel.py
new file mode 100644
index 0000000000000000000000000000000000000000..51d56b1cd5c47c7ef005d21aad9827a1e85ec0d9
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel.py
@@ -0,0 +1,342 @@
+"""Precompute coefficients of several series expansions
+of Wright's generalized Bessel function Phi(a, b, x).
+
+See https://dlmf.nist.gov/10.46.E1 with rho=a, beta=b, z=x.
+"""
+from argparse import ArgumentParser, RawTextHelpFormatter
+import numpy as np
+from scipy.integrate import quad
+from scipy.optimize import minimize_scalar, curve_fit
+from time import time
+
+try:
+ import sympy
+ from sympy import EulerGamma, Rational, S, Sum, \
+ factorial, gamma, gammasimp, pi, polygamma, symbols, zeta
+ from sympy.polys.polyfuncs import horner
+except ImportError:
+ pass
+
+
+def series_small_a():
+ """Tylor series expansion of Phi(a, b, x) in a=0 up to order 5.
+ """
+ order = 5
+ a, b, x, k = symbols("a b x k")
+ A = [] # terms with a
+ X = [] # terms with x
+ B = [] # terms with b (polygammas)
+ # Phi(a, b, x) = exp(x)/gamma(b) * sum(A[i] * X[i] * B[i])
+ expression = Sum(x**k/factorial(k)/gamma(a*k+b), (k, 0, S.Infinity))
+ expression = gamma(b)/sympy.exp(x) * expression
+
+ # nth term of taylor series in a=0: a^n/n! * (d^n Phi(a, b, x)/da^n at a=0)
+ for n in range(0, order+1):
+ term = expression.diff(a, n).subs(a, 0).simplify().doit()
+ # set the whole bracket involving polygammas to 1
+ x_part = (term.subs(polygamma(0, b), 1)
+ .replace(polygamma, lambda *args: 0))
+ # sign convention: x part always positive
+ x_part *= (-1)**n
+
+ A.append(a**n/factorial(n))
+ X.append(horner(x_part))
+ B.append(horner((term/x_part).simplify()))
+
+ s = "Tylor series expansion of Phi(a, b, x) in a=0 up to order 5.\n"
+ s += "Phi(a, b, x) = exp(x)/gamma(b) * sum(A[i] * X[i] * B[i], i=0..5)\n"
+ for name, c in zip(['A', 'X', 'B'], [A, X, B]):
+ for i in range(len(c)):
+ s += f"\n{name}[{i}] = " + str(c[i])
+ return s
+
+
+# expansion of digamma
+def dg_series(z, n):
+ """Symbolic expansion of digamma(z) in z=0 to order n.
+
+ See https://dlmf.nist.gov/5.7.E4 and with https://dlmf.nist.gov/5.5.E2
+ """
+ k = symbols("k")
+ return -1/z - EulerGamma + \
+ sympy.summation((-1)**k * zeta(k) * z**(k-1), (k, 2, n+1))
+
+
+def pg_series(k, z, n):
+ """Symbolic expansion of polygamma(k, z) in z=0 to order n."""
+ return sympy.diff(dg_series(z, n+k), z, k)
+
+
+def series_small_a_small_b():
+ """Tylor series expansion of Phi(a, b, x) in a=0 and b=0 up to order 5.
+
+ Be aware of cancellation of poles in b=0 of digamma(b)/Gamma(b) and
+ polygamma functions.
+
+ digamma(b)/Gamma(b) = -1 - 2*M_EG*b + O(b^2)
+ digamma(b)^2/Gamma(b) = 1/b + 3*M_EG + b*(-5/12*PI^2+7/2*M_EG^2) + O(b^2)
+ polygamma(1, b)/Gamma(b) = 1/b + M_EG + b*(1/12*PI^2 + 1/2*M_EG^2) + O(b^2)
+ and so on.
+ """
+ order = 5
+ a, b, x, k = symbols("a b x k")
+ M_PI, M_EG, M_Z3 = symbols("M_PI M_EG M_Z3")
+ c_subs = {pi: M_PI, EulerGamma: M_EG, zeta(3): M_Z3}
+ A = [] # terms with a
+ X = [] # terms with x
+ B = [] # terms with b (polygammas expanded)
+ C = [] # terms that generate B
+ # Phi(a, b, x) = exp(x) * sum(A[i] * X[i] * B[i])
+ # B[0] = 1
+ # B[k] = sum(C[k] * b**k/k!, k=0..)
+ # Note: C[k] can be obtained from a series expansion of 1/gamma(b).
+ expression = gamma(b)/sympy.exp(x) * \
+ Sum(x**k/factorial(k)/gamma(a*k+b), (k, 0, S.Infinity))
+
+ # nth term of taylor series in a=0: a^n/n! * (d^n Phi(a, b, x)/da^n at a=0)
+ for n in range(0, order+1):
+ term = expression.diff(a, n).subs(a, 0).simplify().doit()
+ # set the whole bracket involving polygammas to 1
+ x_part = (term.subs(polygamma(0, b), 1)
+ .replace(polygamma, lambda *args: 0))
+ # sign convention: x part always positive
+ x_part *= (-1)**n
+ # expansion of polygamma part with 1/gamma(b)
+ pg_part = term/x_part/gamma(b)
+ if n >= 1:
+ # Note: highest term is digamma^n
+ pg_part = pg_part.replace(polygamma,
+ lambda k, x: pg_series(k, x, order+1+n))
+ pg_part = (pg_part.series(b, 0, n=order+1-n)
+ .removeO()
+ .subs(polygamma(2, 1), -2*zeta(3))
+ .simplify()
+ )
+
+ A.append(a**n/factorial(n))
+ X.append(horner(x_part))
+ B.append(pg_part)
+
+ # Calculate C and put in the k!
+ C = sympy.Poly(B[1].subs(c_subs), b).coeffs()
+ C.reverse()
+ for i in range(len(C)):
+ C[i] = (C[i] * factorial(i)).simplify()
+
+ s = "Tylor series expansion of Phi(a, b, x) in a=0 and b=0 up to order 5."
+ s += "\nPhi(a, b, x) = exp(x) * sum(A[i] * X[i] * B[i], i=0..5)\n"
+ s += "B[0] = 1\n"
+ s += "B[i] = sum(C[k+i-1] * b**k/k!, k=0..)\n"
+ s += "\nM_PI = pi"
+ s += "\nM_EG = EulerGamma"
+ s += "\nM_Z3 = zeta(3)"
+ for name, c in zip(['A', 'X'], [A, X]):
+ for i in range(len(c)):
+ s += f"\n{name}[{i}] = "
+ s += str(c[i])
+ # For C, do also compute the values numerically
+ for i in range(len(C)):
+ s += f"\n# C[{i}] = "
+ s += str(C[i])
+ s += f"\nC[{i}] = "
+ s += str(C[i].subs({M_EG: EulerGamma, M_PI: pi, M_Z3: zeta(3)})
+ .evalf(17))
+
+ # Does B have the assumed structure?
+ s += "\n\nTest if B[i] does have the assumed structure."
+ s += "\nC[i] are derived from B[1] alone."
+ s += "\nTest B[2] == C[1] + b*C[2] + b^2/2*C[3] + b^3/6*C[4] + .."
+ test = sum([b**k/factorial(k) * C[k+1] for k in range(order-1)])
+ test = (test - B[2].subs(c_subs)).simplify()
+ s += f"\ntest successful = {test==S(0)}"
+ s += "\nTest B[3] == C[2] + b*C[3] + b^2/2*C[4] + .."
+ test = sum([b**k/factorial(k) * C[k+2] for k in range(order-2)])
+ test = (test - B[3].subs(c_subs)).simplify()
+ s += f"\ntest successful = {test==S(0)}"
+ return s
+
+
+def asymptotic_series():
+ """Asymptotic expansion for large x.
+
+ Phi(a, b, x) ~ Z^(1/2-b) * exp((1+a)/a * Z) * sum_k (-1)^k * C_k / Z^k
+ Z = (a*x)^(1/(1+a))
+
+ Wright (1935) lists the coefficients C_0 and C_1 (he calls them a_0 and
+ a_1). With slightly different notation, Paris (2017) lists coefficients
+ c_k up to order k=3.
+ Paris (2017) uses ZP = (1+a)/a * Z (ZP = Z of Paris) and
+ C_k = C_0 * (-a/(1+a))^k * c_k
+ """
+ order = 8
+
+ class g(sympy.Function):
+ """Helper function g according to Wright (1935)
+
+ g(n, rho, v) = (1 + (rho+2)/3 * v + (rho+2)*(rho+3)/(2*3) * v^2 + ...)
+
+ Note: Wright (1935) uses square root of above definition.
+ """
+ nargs = 3
+
+ @classmethod
+ def eval(cls, n, rho, v):
+ if not n >= 0:
+ raise ValueError("must have n >= 0")
+ elif n == 0:
+ return 1
+ else:
+ return g(n-1, rho, v) \
+ + gammasimp(gamma(rho+2+n)/gamma(rho+2)) \
+ / gammasimp(gamma(3+n)/gamma(3))*v**n
+
+ class coef_C(sympy.Function):
+ """Calculate coefficients C_m for integer m.
+
+ C_m is the coefficient of v^(2*m) in the Taylor expansion in v=0 of
+ Gamma(m+1/2)/(2*pi) * (2/(rho+1))^(m+1/2) * (1-v)^(-b)
+ * g(rho, v)^(-m-1/2)
+ """
+ nargs = 3
+
+ @classmethod
+ def eval(cls, m, rho, beta):
+ if not m >= 0:
+ raise ValueError("must have m >= 0")
+
+ v = symbols("v")
+ expression = (1-v)**(-beta) * g(2*m, rho, v)**(-m-Rational(1, 2))
+ res = expression.diff(v, 2*m).subs(v, 0) / factorial(2*m)
+ res = res * (gamma(m + Rational(1, 2)) / (2*pi)
+ * (2/(rho+1))**(m + Rational(1, 2)))
+ return res
+
+ # in order to have nice ordering/sorting of expressions, we set a = xa.
+ xa, b, xap1 = symbols("xa b xap1")
+ C0 = coef_C(0, xa, b)
+ # a1 = a(1, rho, beta)
+ s = "Asymptotic expansion for large x\n"
+ s += "Phi(a, b, x) = Z**(1/2-b) * exp((1+a)/a * Z) \n"
+ s += " * sum((-1)**k * C[k]/Z**k, k=0..6)\n\n"
+ s += "Z = pow(a * x, 1/(1+a))\n"
+ s += "A[k] = pow(a, k)\n"
+ s += "B[k] = pow(b, k)\n"
+ s += "Ap1[k] = pow(1+a, k)\n\n"
+ s += "C[0] = 1./sqrt(2. * M_PI * Ap1[1])\n"
+ for i in range(1, order+1):
+ expr = (coef_C(i, xa, b) / (C0/(1+xa)**i)).simplify()
+ factor = [x.denominator() for x in sympy.Poly(expr).coeffs()]
+ factor = sympy.lcm(factor)
+ expr = (expr * factor).simplify().collect(b, sympy.factor)
+ expr = expr.xreplace({xa+1: xap1})
+ s += f"C[{i}] = C[0] / ({factor} * Ap1[{i}])\n"
+ s += f"C[{i}] *= {str(expr)}\n\n"
+ import re
+ re_a = re.compile(r'xa\*\*(\d+)')
+ s = re_a.sub(r'A[\1]', s)
+ re_b = re.compile(r'b\*\*(\d+)')
+ s = re_b.sub(r'B[\1]', s)
+ s = s.replace('xap1', 'Ap1[1]')
+ s = s.replace('xa', 'a')
+ # max integer = 2^31-1 = 2,147,483,647. Solution: Put a point after 10
+ # or more digits.
+ re_digits = re.compile(r'(\d{10,})')
+ s = re_digits.sub(r'\1.', s)
+ return s
+
+
+def optimal_epsilon_integral():
+ """Fit optimal choice of epsilon for integral representation.
+
+ The integrand of
+ int_0^pi P(eps, a, b, x, phi) * dphi
+ can exhibit oscillatory behaviour. It stems from the cosine of P and can be
+ minimized by minimizing the arc length of the argument
+ f(phi) = eps * sin(phi) - x * eps^(-a) * sin(a * phi) + (1 - b) * phi
+ of cos(f(phi)).
+ We minimize the arc length in eps for a grid of values (a, b, x) and fit a
+ parametric function to it.
+ """
+ def fp(eps, a, b, x, phi):
+ """Derivative of f w.r.t. phi."""
+ eps_a = np.power(1. * eps, -a)
+ return eps * np.cos(phi) - a * x * eps_a * np.cos(a * phi) + 1 - b
+
+ def arclength(eps, a, b, x, epsrel=1e-2, limit=100):
+ """Compute Arc length of f.
+
+ Note that the arc length of a function f from t0 to t1 is given by
+ int_t0^t1 sqrt(1 + f'(t)^2) dt
+ """
+ return quad(lambda phi: np.sqrt(1 + fp(eps, a, b, x, phi)**2),
+ 0, np.pi,
+ epsrel=epsrel, limit=100)[0]
+
+ # grid of minimal arc length values
+ data_a = [1e-3, 0.1, 0.5, 0.9, 1, 2, 4, 5, 6, 8]
+ data_b = [0, 1, 4, 7, 10]
+ data_x = [1, 1.5, 2, 4, 10, 20, 50, 100, 200, 500, 1e3, 5e3, 1e4]
+ data_a, data_b, data_x = np.meshgrid(data_a, data_b, data_x)
+ data_a, data_b, data_x = (data_a.flatten(), data_b.flatten(),
+ data_x.flatten())
+ best_eps = []
+ for i in range(data_x.size):
+ best_eps.append(
+ minimize_scalar(lambda eps: arclength(eps, data_a[i], data_b[i],
+ data_x[i]),
+ bounds=(1e-3, 1000),
+ method='Bounded', options={'xatol': 1e-3}).x
+ )
+ best_eps = np.array(best_eps)
+ # pandas would be nice, but here a dictionary is enough
+ df = {'a': data_a,
+ 'b': data_b,
+ 'x': data_x,
+ 'eps': best_eps,
+ }
+
+ def func(data, A0, A1, A2, A3, A4, A5):
+ """Compute parametric function to fit."""
+ a = data['a']
+ b = data['b']
+ x = data['x']
+ return (A0 * b * np.exp(-0.5 * a)
+ + np.exp(A1 + 1 / (1 + a) * np.log(x) - A2 * np.exp(-A3 * a)
+ + A4 / (1 + np.exp(A5 * a))))
+
+ func_params = list(curve_fit(func, df, df['eps'], method='trf')[0])
+
+ s = "Fit optimal eps for integrand P via minimal arc length\n"
+ s += "with parametric function:\n"
+ s += "optimal_eps = (A0 * b * exp(-a/2) + exp(A1 + 1 / (1 + a) * log(x)\n"
+ s += " - A2 * exp(-A3 * a) + A4 / (1 + exp(A5 * a)))\n\n"
+ s += "Fitted parameters A0 to A5 are:\n"
+ s += ', '.join([f'{x:.5g}' for x in func_params])
+ return s
+
+
+def main():
+ t0 = time()
+ parser = ArgumentParser(description=__doc__,
+ formatter_class=RawTextHelpFormatter)
+ parser.add_argument('action', type=int, choices=[1, 2, 3, 4],
+ help='chose what expansion to precompute\n'
+ '1 : Series for small a\n'
+ '2 : Series for small a and small b\n'
+ '3 : Asymptotic series for large x\n'
+ ' This may take some time (>4h).\n'
+ '4 : Fit optimal eps for integral representation.'
+ )
+ args = parser.parse_args()
+
+ switch = {1: lambda: print(series_small_a()),
+ 2: lambda: print(series_small_a_small_b()),
+ 3: lambda: print(asymptotic_series()),
+ 4: lambda: print(optimal_epsilon_integral())
+ }
+ switch.get(args.action, lambda: print("Invalid input."))()
+ print(f"\n{(time() - t0)/60:.1f} minutes elapsed.\n")
+
+
+if __name__ == '__main__':
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel_data.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..1de9b4fe552ca9178c452194ab84af6ca5daac71
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wright_bessel_data.py
@@ -0,0 +1,152 @@
+"""Compute a grid of values for Wright's generalized Bessel function
+and save the values to data files for use in tests. Using mpmath directly in
+tests would take too long.
+
+This takes about 10 minutes to run on a 2.7 GHz i7 Macbook Pro.
+"""
+from functools import lru_cache
+import os
+from time import time
+
+import numpy as np
+from scipy.special._mptestutils import mpf2float
+
+try:
+ import mpmath as mp
+except ImportError:
+ pass
+
+# exp_inf: smallest value x for which exp(x) == inf
+exp_inf = 709.78271289338403
+
+
+# 64 Byte per value
+@lru_cache(maxsize=100_000)
+def rgamma_cached(x, dps):
+ with mp.workdps(dps):
+ return mp.rgamma(x)
+
+
+def mp_wright_bessel(a, b, x, dps=50, maxterms=2000):
+ """Compute Wright's generalized Bessel function as Series with mpmath.
+ """
+ with mp.workdps(dps):
+ a, b, x = mp.mpf(a), mp.mpf(b), mp.mpf(x)
+ res = mp.nsum(lambda k: x**k / mp.fac(k)
+ * rgamma_cached(a * k + b, dps=dps),
+ [0, mp.inf],
+ tol=dps, method='s', steps=[maxterms]
+ )
+ return mpf2float(res)
+
+
+def main():
+ t0 = time()
+ print(__doc__)
+ pwd = os.path.dirname(__file__)
+ eps = np.finfo(float).eps * 100
+
+ a_range = np.array([eps,
+ 1e-4 * (1 - eps), 1e-4, 1e-4 * (1 + eps),
+ 1e-3 * (1 - eps), 1e-3, 1e-3 * (1 + eps),
+ 0.1, 0.5,
+ 1 * (1 - eps), 1, 1 * (1 + eps),
+ 1.5, 2, 4.999, 5, 10])
+ b_range = np.array([0, eps, 1e-10, 1e-5, 0.1, 1, 2, 10, 20, 100])
+ x_range = np.array([0, eps, 1 - eps, 1, 1 + eps,
+ 1.5,
+ 2 - eps, 2, 2 + eps,
+ 9 - eps, 9, 9 + eps,
+ 10 * (1 - eps), 10, 10 * (1 + eps),
+ 100 * (1 - eps), 100, 100 * (1 + eps),
+ 500, exp_inf, 1e3, 1e5, 1e10, 1e20])
+
+ a_range, b_range, x_range = np.meshgrid(a_range, b_range, x_range,
+ indexing='ij')
+ a_range = a_range.flatten()
+ b_range = b_range.flatten()
+ x_range = x_range.flatten()
+
+ # filter out some values, especially too large x
+ bool_filter = ~((a_range < 5e-3) & (x_range >= exp_inf))
+ bool_filter = bool_filter & ~((a_range < 0.2) & (x_range > exp_inf))
+ bool_filter = bool_filter & ~((a_range < 0.5) & (x_range > 1e3))
+ bool_filter = bool_filter & ~((a_range < 0.56) & (x_range > 5e3))
+ bool_filter = bool_filter & ~((a_range < 1) & (x_range > 1e4))
+ bool_filter = bool_filter & ~((a_range < 1.4) & (x_range > 1e5))
+ bool_filter = bool_filter & ~((a_range < 1.8) & (x_range > 1e6))
+ bool_filter = bool_filter & ~((a_range < 2.2) & (x_range > 1e7))
+ bool_filter = bool_filter & ~((a_range < 2.5) & (x_range > 1e8))
+ bool_filter = bool_filter & ~((a_range < 2.9) & (x_range > 1e9))
+ bool_filter = bool_filter & ~((a_range < 3.3) & (x_range > 1e10))
+ bool_filter = bool_filter & ~((a_range < 3.7) & (x_range > 1e11))
+ bool_filter = bool_filter & ~((a_range < 4) & (x_range > 1e12))
+ bool_filter = bool_filter & ~((a_range < 4.4) & (x_range > 1e13))
+ bool_filter = bool_filter & ~((a_range < 4.7) & (x_range > 1e14))
+ bool_filter = bool_filter & ~((a_range < 5.1) & (x_range > 1e15))
+ bool_filter = bool_filter & ~((a_range < 5.4) & (x_range > 1e16))
+ bool_filter = bool_filter & ~((a_range < 5.8) & (x_range > 1e17))
+ bool_filter = bool_filter & ~((a_range < 6.2) & (x_range > 1e18))
+ bool_filter = bool_filter & ~((a_range < 6.2) & (x_range > 1e18))
+ bool_filter = bool_filter & ~((a_range < 6.5) & (x_range > 1e19))
+ bool_filter = bool_filter & ~((a_range < 6.9) & (x_range > 1e20))
+
+ # filter out known values that do not meet the required numerical accuracy
+ # see test test_wright_data_grid_failures
+ failing = np.array([
+ [0.1, 100, 709.7827128933841],
+ [0.5, 10, 709.7827128933841],
+ [0.5, 10, 1000],
+ [0.5, 100, 1000],
+ [1, 20, 100000],
+ [1, 100, 100000],
+ [1.0000000000000222, 20, 100000],
+ [1.0000000000000222, 100, 100000],
+ [1.5, 0, 500],
+ [1.5, 2.220446049250313e-14, 500],
+ [1.5, 1.e-10, 500],
+ [1.5, 1.e-05, 500],
+ [1.5, 0.1, 500],
+ [1.5, 20, 100000],
+ [1.5, 100, 100000],
+ ]).tolist()
+
+ does_fail = np.full_like(a_range, False, dtype=bool)
+ for i in range(x_range.size):
+ if [a_range[i], b_range[i], x_range[i]] in failing:
+ does_fail[i] = True
+
+ # filter and flatten
+ a_range = a_range[bool_filter]
+ b_range = b_range[bool_filter]
+ x_range = x_range[bool_filter]
+ does_fail = does_fail[bool_filter]
+
+ dataset = []
+ print(f"Computing {x_range.size} single points.")
+ print("Tests will fail for the following data points:")
+ for i in range(x_range.size):
+ a = a_range[i]
+ b = b_range[i]
+ x = x_range[i]
+ # take care of difficult corner cases
+ maxterms = 1000
+ if a < 1e-6 and x >= exp_inf/10:
+ maxterms = 2000
+ f = mp_wright_bessel(a, b, x, maxterms=maxterms)
+ if does_fail[i]:
+ print("failing data point a, b, x, value = "
+ f"[{a}, {b}, {x}, {f}]")
+ else:
+ dataset.append((a, b, x, f))
+ dataset = np.array(dataset)
+
+ filename = os.path.join(pwd, '..', 'tests', 'data', 'local',
+ 'wright_bessel.txt')
+ np.savetxt(filename, dataset)
+
+ print(f"{(time() - t0)/60:.1f} minutes elapsed")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wrightomega.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wrightomega.py
new file mode 100644
index 0000000000000000000000000000000000000000..0bcd0345a9c1b90c45b0e9e3340ab4da4ec5c6d7
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/wrightomega.py
@@ -0,0 +1,41 @@
+import numpy as np
+
+try:
+ import mpmath
+except ImportError:
+ pass
+
+
+def mpmath_wrightomega(x):
+ return mpmath.lambertw(mpmath.exp(x), mpmath.mpf('-0.5'))
+
+
+def wrightomega_series_error(x):
+ series = x
+ desired = mpmath_wrightomega(x)
+ return abs(series - desired) / desired
+
+
+def wrightomega_exp_error(x):
+ exponential_approx = mpmath.exp(x)
+ desired = mpmath_wrightomega(x)
+ return abs(exponential_approx - desired) / desired
+
+
+def main():
+ desired_error = 2 * np.finfo(float).eps
+ print('Series Error')
+ for x in [1e5, 1e10, 1e15, 1e20]:
+ with mpmath.workdps(100):
+ error = wrightomega_series_error(x)
+ print(x, error, error < desired_error)
+
+ print('Exp error')
+ for x in [-10, -25, -50, -100, -200, -400, -700, -740]:
+ with mpmath.workdps(100):
+ error = wrightomega_exp_error(x)
+ print(x, error, error < desired_error)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/zetac.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/zetac.py
new file mode 100644
index 0000000000000000000000000000000000000000..d408b1a2fffb6872287452923fcc9394adc13a7c
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_precompute/zetac.py
@@ -0,0 +1,27 @@
+"""Compute the Taylor series for zeta(x) - 1 around x = 0."""
+try:
+ import mpmath
+except ImportError:
+ pass
+
+
+def zetac_series(N):
+ coeffs = []
+ with mpmath.workdps(100):
+ coeffs.append(-1.5)
+ for n in range(1, N):
+ coeff = mpmath.diff(mpmath.zeta, 0, n)/mpmath.factorial(n)
+ coeffs.append(coeff)
+ return coeffs
+
+
+def main():
+ print(__doc__)
+ coeffs = zetac_series(10)
+ coeffs = [mpmath.nstr(x, 20, min_fixed=0, max_fixed=0)
+ for x in coeffs]
+ print("\n".join(coeffs[::-1]))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_sf_error.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_sf_error.py
new file mode 100644
index 0000000000000000000000000000000000000000..e1edc9800759dfda9e49bde1becc775a64bce958
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_sf_error.py
@@ -0,0 +1,15 @@
+"""Warnings and Exceptions that can be raised by special functions."""
+import warnings
+
+
+class SpecialFunctionWarning(Warning):
+ """Warning that can be emitted by special functions."""
+ pass
+
+
+warnings.simplefilter("always", category=SpecialFunctionWarning)
+
+
+class SpecialFunctionError(Exception):
+ """Exception that can be raised by special functions."""
+ pass
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_specfun.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_specfun.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..d83a7253a1394401e71f7ecba1e3e2fabb489f94
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_specfun.cpython-312-darwin.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f2e35d06c0eace7e4f6b60cb409e8d4b253d4c906dec7f0c8140e734938db5e9
+size 184176
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_special_ufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_special_ufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..fe7761a67fdaf64dc1f3da874b92dcf2a00ab635
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_special_ufuncs.cpython-312-darwin.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d36be2c2aaca742033d63a85db5134fc639d3ab0a6e2ba9848af2a65250d866c
+size 1130872
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spfun_stats.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spfun_stats.py
new file mode 100644
index 0000000000000000000000000000000000000000..6e122b7c54a5880ee8846ef4818ac3e0a6f2ac3b
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spfun_stats.py
@@ -0,0 +1,108 @@
+# Last Change: Sat Mar 21 02:00 PM 2009 J
+
+# Copyright (c) 2001, 2002 Enthought, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# a. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# b. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# c. Neither the name of the Enthought nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+
+"""Some more special functions which may be useful for multivariate statistical
+analysis."""
+
+import numpy as np
+from scipy.special import gammaln as loggam
+
+
+__all__ = ['multigammaln']
+
+
+def multigammaln(a, d):
+ r"""Returns the log of multivariate gamma, also sometimes called the
+ generalized gamma.
+
+ Parameters
+ ----------
+ a : ndarray
+ The multivariate gamma is computed for each item of `a`.
+ d : int
+ The dimension of the space of integration.
+
+ Returns
+ -------
+ res : ndarray
+ The values of the log multivariate gamma at the given points `a`.
+
+ Notes
+ -----
+ The formal definition of the multivariate gamma of dimension d for a real
+ `a` is
+
+ .. math::
+
+ \Gamma_d(a) = \int_{A>0} e^{-tr(A)} |A|^{a - (d+1)/2} dA
+
+ with the condition :math:`a > (d-1)/2`, and :math:`A > 0` being the set of
+ all the positive definite matrices of dimension `d`. Note that `a` is a
+ scalar: the integrand only is multivariate, the argument is not (the
+ function is defined over a subset of the real set).
+
+ This can be proven to be equal to the much friendlier equation
+
+ .. math::
+
+ \Gamma_d(a) = \pi^{d(d-1)/4} \prod_{i=1}^{d} \Gamma(a - (i-1)/2).
+
+ References
+ ----------
+ R. J. Muirhead, Aspects of multivariate statistical theory (Wiley Series in
+ probability and mathematical statistics).
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from scipy.special import multigammaln, gammaln
+ >>> a = 23.5
+ >>> d = 10
+ >>> multigammaln(a, d)
+ 454.1488605074416
+
+ Verify that the result agrees with the logarithm of the equation
+ shown above:
+
+ >>> d*(d-1)/4*np.log(np.pi) + gammaln(a - 0.5*np.arange(0, d)).sum()
+ 454.1488605074416
+ """
+ a = np.asarray(a)
+ # Support for 0d arrays is needed for array_api_strict and dask.
+ d = np.asarray(d)[()]
+ if not np.isscalar(d) or (np.floor(d) != d):
+ raise ValueError("d should be a positive integer (dimension)")
+ if np.any(a <= 0.5 * (d - 1)):
+ raise ValueError(f"condition a ({a}) > 0.5 * (d-1) ({0.5 * (d-1)}) not met")
+
+ res = (d * (d-1) * 0.25) * np.log(np.pi)
+ res += np.sum(loggam([(a - (j - 1.)/2) for j in range(1, d+1)]), axis=0)
+ return res
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spherical_bessel.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spherical_bessel.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e5ccfd42fc6b6c855038af81e6ca54779e30653
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_spherical_bessel.py
@@ -0,0 +1,397 @@
+from functools import wraps
+import scipy._lib.array_api_extra as xpx
+import numpy as np
+from ._ufuncs import (_spherical_jn, _spherical_yn, _spherical_in,
+ _spherical_kn, _spherical_jn_d, _spherical_yn_d,
+ _spherical_in_d, _spherical_kn_d)
+
+
+def use_reflection(sign_n_even=None, reflection_fun=None):
+ # - If reflection_fun is not specified, reflects negative `z` and multiplies
+ # output by appropriate sign (indicated by `sign_n_even`).
+ # - If reflection_fun is specified, calls `reflection_fun` instead of `fun`.
+ # See DLMF 10.47(v) https://dlmf.nist.gov/10.47
+ def decorator(fun):
+ def standard_reflection(n, z, derivative):
+ # sign_n_even indicates the sign when the order `n` is even
+ sign = np.where(n % 2 == 0, sign_n_even, -sign_n_even)
+ # By the chain rule, differentiation at `-z` adds a minus sign
+ sign = -sign if derivative else sign
+ # Evaluate at positive z (minus negative z) and adjust the sign
+ return fun(n, -z, derivative) * sign
+
+ @wraps(fun)
+ def wrapper(n, z, derivative=False):
+ z = np.asarray(z)
+
+ if np.issubdtype(z.dtype, np.complexfloating):
+ return fun(n, z, derivative) # complex dtype just works
+
+ f2 = standard_reflection if reflection_fun is None else reflection_fun
+ return xpx.apply_where(z.real >= 0, (n, z),
+ lambda n, z: fun(n, z, derivative),
+ lambda n, z: f2(n, z, derivative))[()]
+ return wrapper
+ return decorator
+
+
+@use_reflection(+1) # See DLMF 10.47(v) https://dlmf.nist.gov/10.47
+def spherical_jn(n, z, derivative=False):
+ r"""Spherical Bessel function of the first kind or its derivative.
+
+ Defined as [1]_,
+
+ .. math:: j_n(z) = \sqrt{\frac{\pi}{2z}} J_{n + 1/2}(z),
+
+ where :math:`J_n` is the Bessel function of the first kind.
+
+ Parameters
+ ----------
+ n : int, array_like
+ Order of the Bessel function (n >= 0).
+ z : complex or float, array_like
+ Argument of the Bessel function.
+ derivative : bool, optional
+ If True, the value of the derivative (rather than the function
+ itself) is returned.
+
+ Returns
+ -------
+ jn : ndarray
+
+ Notes
+ -----
+ For real arguments greater than the order, the function is computed
+ using the ascending recurrence [2]_. For small real or complex
+ arguments, the definitional relation to the cylindrical Bessel function
+ of the first kind is used.
+
+ The derivative is computed using the relations [3]_,
+
+ .. math::
+ j_n'(z) = j_{n-1}(z) - \frac{n + 1}{z} j_n(z).
+
+ j_0'(z) = -j_1(z)
+
+
+ .. versionadded:: 0.18.0
+
+ References
+ ----------
+ .. [1] https://dlmf.nist.gov/10.47.E3
+ .. [2] https://dlmf.nist.gov/10.51.E1
+ .. [3] https://dlmf.nist.gov/10.51.E2
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The spherical Bessel functions of the first kind :math:`j_n` accept
+ both real and complex second argument. They can return a complex type:
+
+ >>> from scipy.special import spherical_jn
+ >>> spherical_jn(0, 3+5j)
+ (-9.878987731663194-8.021894345786002j)
+ >>> type(spherical_jn(0, 3+5j))
+
+
+ We can verify the relation for the derivative from the Notes
+ for :math:`n=3` in the interval :math:`[1, 2]`:
+
+ >>> import numpy as np
+ >>> x = np.arange(1.0, 2.0, 0.01)
+ >>> np.allclose(spherical_jn(3, x, True),
+ ... spherical_jn(2, x) - 4/x * spherical_jn(3, x))
+ True
+
+ The first few :math:`j_n` with real argument:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(0.0, 10.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-0.5, 1.5)
+ >>> ax.set_title(r'Spherical Bessel functions $j_n$')
+ >>> for n in np.arange(0, 4):
+ ... ax.plot(x, spherical_jn(n, x), label=rf'$j_{n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ n = np.asarray(n, dtype=np.dtype("long"))
+ if derivative:
+ return _spherical_jn_d(n, z)
+ else:
+ return _spherical_jn(n, z)
+
+
+@use_reflection(-1) # See DLMF 10.47(v) https://dlmf.nist.gov/10.47
+def spherical_yn(n, z, derivative=False):
+ r"""Spherical Bessel function of the second kind or its derivative.
+
+ Defined as [1]_,
+
+ .. math:: y_n(z) = \sqrt{\frac{\pi}{2z}} Y_{n + 1/2}(z),
+
+ where :math:`Y_n` is the Bessel function of the second kind.
+
+ Parameters
+ ----------
+ n : int, array_like
+ Order of the Bessel function (n >= 0).
+ z : complex or float, array_like
+ Argument of the Bessel function.
+ derivative : bool, optional
+ If True, the value of the derivative (rather than the function
+ itself) is returned.
+
+ Returns
+ -------
+ yn : ndarray
+
+ Notes
+ -----
+ For real arguments, the function is computed using the ascending
+ recurrence [2]_. For complex arguments, the definitional relation to
+ the cylindrical Bessel function of the second kind is used.
+
+ The derivative is computed using the relations [3]_,
+
+ .. math::
+ y_n' = y_{n-1} - \frac{n + 1}{z} y_n.
+
+ y_0' = -y_1
+
+
+ .. versionadded:: 0.18.0
+
+ References
+ ----------
+ .. [1] https://dlmf.nist.gov/10.47.E4
+ .. [2] https://dlmf.nist.gov/10.51.E1
+ .. [3] https://dlmf.nist.gov/10.51.E2
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The spherical Bessel functions of the second kind :math:`y_n` accept
+ both real and complex second argument. They can return a complex type:
+
+ >>> from scipy.special import spherical_yn
+ >>> spherical_yn(0, 3+5j)
+ (8.022343088587197-9.880052589376795j)
+ >>> type(spherical_yn(0, 3+5j))
+
+
+ We can verify the relation for the derivative from the Notes
+ for :math:`n=3` in the interval :math:`[1, 2]`:
+
+ >>> import numpy as np
+ >>> x = np.arange(1.0, 2.0, 0.01)
+ >>> np.allclose(spherical_yn(3, x, True),
+ ... spherical_yn(2, x) - 4/x * spherical_yn(3, x))
+ True
+
+ The first few :math:`y_n` with real argument:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(0.0, 10.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-2.0, 1.0)
+ >>> ax.set_title(r'Spherical Bessel functions $y_n$')
+ >>> for n in np.arange(0, 4):
+ ... ax.plot(x, spherical_yn(n, x), label=rf'$y_{n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ n = np.asarray(n, dtype=np.dtype("long"))
+ if derivative:
+ return _spherical_yn_d(n, z)
+ else:
+ return _spherical_yn(n, z)
+
+
+@use_reflection(+1) # See DLMF 10.47(v) https://dlmf.nist.gov/10.47
+def spherical_in(n, z, derivative=False):
+ r"""Modified spherical Bessel function of the first kind or its derivative.
+
+ Defined as [1]_,
+
+ .. math:: i_n(z) = \sqrt{\frac{\pi}{2z}} I_{n + 1/2}(z),
+
+ where :math:`I_n` is the modified Bessel function of the first kind.
+
+ Parameters
+ ----------
+ n : int, array_like
+ Order of the Bessel function (n >= 0).
+ z : complex or float, array_like
+ Argument of the Bessel function.
+ derivative : bool, optional
+ If True, the value of the derivative (rather than the function
+ itself) is returned.
+
+ Returns
+ -------
+ in : ndarray
+
+ Notes
+ -----
+ The function is computed using its definitional relation to the
+ modified cylindrical Bessel function of the first kind.
+
+ The derivative is computed using the relations [2]_,
+
+ .. math::
+ i_n' = i_{n-1} - \frac{n + 1}{z} i_n.
+
+ i_1' = i_0
+
+
+ .. versionadded:: 0.18.0
+
+ References
+ ----------
+ .. [1] https://dlmf.nist.gov/10.47.E7
+ .. [2] https://dlmf.nist.gov/10.51.E5
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The modified spherical Bessel functions of the first kind :math:`i_n`
+ accept both real and complex second argument.
+ They can return a complex type:
+
+ >>> from scipy.special import spherical_in
+ >>> spherical_in(0, 3+5j)
+ (-1.1689867793369182-1.2697305267234222j)
+ >>> type(spherical_in(0, 3+5j))
+
+
+ We can verify the relation for the derivative from the Notes
+ for :math:`n=3` in the interval :math:`[1, 2]`:
+
+ >>> import numpy as np
+ >>> x = np.arange(1.0, 2.0, 0.01)
+ >>> np.allclose(spherical_in(3, x, True),
+ ... spherical_in(2, x) - 4/x * spherical_in(3, x))
+ True
+
+ The first few :math:`i_n` with real argument:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(0.0, 6.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(-0.5, 5.0)
+ >>> ax.set_title(r'Modified spherical Bessel functions $i_n$')
+ >>> for n in np.arange(0, 4):
+ ... ax.plot(x, spherical_in(n, x), label=rf'$i_{n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ n = np.asarray(n, dtype=np.dtype("long"))
+ if derivative:
+ return _spherical_in_d(n, z)
+ else:
+ return _spherical_in(n, z)
+
+
+def spherical_kn_reflection(n, z, derivative=False):
+ # More complex than the other cases, and this will likely be re-implemented
+ # in C++ anyway. Would require multiple function evaluations. Probably about
+ # as fast to just resort to complex math, and much simpler.
+ return spherical_kn(n, z + 0j, derivative=derivative).real
+
+
+@use_reflection(reflection_fun=spherical_kn_reflection)
+def spherical_kn(n, z, derivative=False):
+ r"""Modified spherical Bessel function of the second kind or its derivative.
+
+ Defined as [1]_,
+
+ .. math:: k_n(z) = \sqrt{\frac{\pi}{2z}} K_{n + 1/2}(z),
+
+ where :math:`K_n` is the modified Bessel function of the second kind.
+
+ Parameters
+ ----------
+ n : int, array_like
+ Order of the Bessel function (n >= 0).
+ z : complex or float, array_like
+ Argument of the Bessel function.
+ derivative : bool, optional
+ If True, the value of the derivative (rather than the function
+ itself) is returned.
+
+ Returns
+ -------
+ kn : ndarray
+
+ Notes
+ -----
+ The function is computed using its definitional relation to the
+ modified cylindrical Bessel function of the second kind.
+
+ The derivative is computed using the relations [2]_,
+
+ .. math::
+ k_n' = -k_{n-1} - \frac{n + 1}{z} k_n.
+
+ k_0' = -k_1
+
+
+ .. versionadded:: 0.18.0
+
+ References
+ ----------
+ .. [1] https://dlmf.nist.gov/10.47.E9
+ .. [2] https://dlmf.nist.gov/10.51.E5
+ .. [AS] Milton Abramowitz and Irene A. Stegun, eds.
+ Handbook of Mathematical Functions with Formulas,
+ Graphs, and Mathematical Tables. New York: Dover, 1972.
+
+ Examples
+ --------
+ The modified spherical Bessel functions of the second kind :math:`k_n`
+ accept both real and complex second argument.
+ They can return a complex type:
+
+ >>> from scipy.special import spherical_kn
+ >>> spherical_kn(0, 3+5j)
+ (0.012985785614001561+0.003354691603137546j)
+ >>> type(spherical_kn(0, 3+5j))
+
+
+ We can verify the relation for the derivative from the Notes
+ for :math:`n=3` in the interval :math:`[1, 2]`:
+
+ >>> import numpy as np
+ >>> x = np.arange(1.0, 2.0, 0.01)
+ >>> np.allclose(spherical_kn(3, x, True),
+ ... - 4/x * spherical_kn(3, x) - spherical_kn(2, x))
+ True
+
+ The first few :math:`k_n` with real argument:
+
+ >>> import matplotlib.pyplot as plt
+ >>> x = np.arange(0.0, 4.0, 0.01)
+ >>> fig, ax = plt.subplots()
+ >>> ax.set_ylim(0.0, 5.0)
+ >>> ax.set_title(r'Modified spherical Bessel functions $k_n$')
+ >>> for n in np.arange(0, 4):
+ ... ax.plot(x, spherical_kn(n, x), label=rf'$k_{n}$')
+ >>> plt.legend(loc='best')
+ >>> plt.show()
+
+ """
+ n = np.asarray(n, dtype=np.dtype("long"))
+ if derivative:
+ return _spherical_kn_d(n, z)
+ else:
+ return _spherical_kn(n, z)
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_support_alternative_backends.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_support_alternative_backends.py
new file mode 100644
index 0000000000000000000000000000000000000000..b220abea4990a70549991dc411ad3ea11fd2cfdb
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_support_alternative_backends.py
@@ -0,0 +1,876 @@
+import functools
+import operator
+from collections.abc import Callable
+from dataclasses import dataclass
+from types import ModuleType
+
+import numpy as np
+from scipy._lib._array_api import (
+ array_namespace, scipy_namespace_for, is_numpy, is_dask, is_marray,
+ xp_promote, xp_capabilities, SCIPY_ARRAY_API, get_native_namespace_name
+)
+import scipy._lib.array_api_extra as xpx
+from . import _basic
+from . import _spfun_stats
+from . import _ufuncs
+
+
+@dataclass
+class _FuncInfo:
+ # NumPy-only function. IT MUST BE ELEMENTWISE.
+ func: Callable
+ # Number of arguments, not counting out=
+ # This is for testing purposes only, due to the fact that
+ # inspect.signature() just returns *args for ufuncs.
+ n_args: int
+ # @xp_capabilities decorator, for the purpose of
+ # documentation and unit testing. Omit to indicate
+ # full support for all backends.
+ xp_capabilities: Callable[[Callable], Callable] | None = None
+ # Generic implementation to fall back on if there is no native dispatch
+ # available. This is a function that accepts (main namespace, scipy namespace)
+ # and returns the final callable, or None if not available.
+ generic_impl: Callable[
+ [ModuleType, ModuleType | None], Callable | None
+ ] | None = None
+ # Handle case where a backend uses an alternative name for a function.
+ # Should map backend names to alternative function names.
+ alt_names_map: dict[str, str] | None = None
+ # Some functions only take integer arrays for some arguments.
+ int_only: tuple[bool] | None = None
+ # For testing purposes, whether tests should only use positive values
+ # for some arguments. If bool and equal to True, restrict to positive
+ # values for all arguments. To restrict only some arguments to positive
+ # values, pass a tuple of bool of the same length as the number of
+ # arguments, the ith entry in the tuple controls positive_only for
+ # the ith argument. To make backend specific choices for positive_only,
+ # pass in a dict mapping backend names to bool or tuple[bool].
+ positive_only: bool | tuple[bool] | dict[str, tuple[bool]] = False
+ # Some special functions are not ufuncs and ufunc-specific tests
+ # should not be applied to these.
+ is_ufunc: bool = True
+ # Some non-ufunc special functions take only Python ints for some arguments.
+ # If so, python_int_only should be a tuple of the same length as the number
+ # of arguments,with value True if the corresponding argument needs to be a
+ # Python int.
+ # Can also take a dict mapping backends to such tuples if an argument being
+ # Python int only is backend specific.
+ python_int_only: dict[str, tuple[bool]] | tuple[bool] | None = None
+ # Some functions which seem to be scalar also accept 0d arrays.
+ scalar_or_0d_only: dict[str, tuple[bool]] | tuple[bool] | None = None
+ # Some functions may not work well with very large integer valued arguments.
+ test_large_ints: bool = True
+ # Some non-ufunc special functions don't decay 0d arrays to scalar.
+ produces_0d: bool = False
+ # Whether or not uses native PyTorch or falls back to NumPy/SciPy. This
+ # is needed because in PyTorch, the default dtype affects promotion
+ # rules when mixing integer and floating dtypes, so relying on a
+ # NumPy/SciPy fallback when the default dtype is other than float64 can lead
+ # to float64 output when native PyTorch would have e.g. float32 output. This
+ # must be accounted for in tests. Not putting this in xp_capabilities for now,
+ # but in the future I think it's likely we may want to add a warning to
+ # xp_capabilities when not using native PyTorch on CPU.
+ torch_native: bool = True
+
+ @property
+ def name(self):
+ return self.func.__name__
+
+ # These are needed by @lru_cache below
+ def __hash__(self):
+ return hash(self.func)
+
+ def __eq__(self, other):
+ return isinstance(other, _FuncInfo) and self.func == other.func
+
+ @property
+ def wrapper(self):
+ if self.name in globals():
+ # Already initialised. We are likely in a unit test.
+ # Return function potentially overridden by xpx.testing.lazy_xp_function.
+ import scipy.special
+ return getattr(scipy.special, self.name)
+
+ if SCIPY_ARRAY_API:
+ @functools.wraps(self.func)
+ def wrapped(*args, **kwargs):
+ xp = array_namespace(*args)
+ return self._wrapper_for(xp)(*args, **kwargs)
+
+ # Allow pickling the function. Normally this is done by @wraps,
+ # but in this case it doesn't work because self.func is a ufunc.
+ wrapped.__module__ = "scipy.special"
+ wrapped.__qualname__ = self.name
+ func = wrapped
+ else:
+ func = self.func
+
+ capabilities = self.xp_capabilities or xp_capabilities()
+ # In order to retain a naked ufunc when SCIPY_ARRAY_API is
+ # disabled, xp_capabilities must apply its changes in place.
+ cap_func = capabilities(func)
+ assert cap_func is func
+ return func
+
+ @functools.lru_cache(1000)
+ def _wrapper_for(self, xp):
+ if is_numpy(xp):
+ return self.func
+
+ # If a native implementation is available, use that
+ spx = scipy_namespace_for(xp)
+ f = _get_native_func(xp, spx, self.name, alt_names_map=self.alt_names_map)
+ if f is not None:
+ return f
+
+ # If generic Array API implementation is available, use that
+ if self.generic_impl is not None:
+ f = self.generic_impl(xp, spx)
+ if f is not None:
+ return f
+
+ if is_marray(xp):
+ # Unwrap the array, apply the function on the wrapped namespace,
+ # and then re-wrap it.
+ # IMPORTANT: this only works because all functions in this module
+ # are elementwise. Otherwise, we would not be able to define a
+ # general rule for mask propagation.
+
+ _f = globals()[self.name] # Allow nested wrapping
+ def f(*args, _f=_f, xp=xp, **kwargs):
+ data_args = [getattr(arg, 'data', arg) for arg in args]
+ out = _f(*data_args, **kwargs)
+ mask = functools.reduce(operator.or_,
+ (getattr(arg, 'mask', False) for arg in args))
+ return xp.asarray(out, mask=mask)
+
+ return f
+
+ if is_dask(xp):
+ # Apply the function to each block of the Dask array.
+ # IMPORTANT: map_blocks works only because all functions in this module
+ # are elementwise. It would be a grave mistake to apply this to gufuncs
+ # or any other function with reductions, as they would change their
+ # output depending on chunking!
+
+ _f = globals()[self.name] # Allow nested wrapping
+ def f(*args, _f=_f, xp=xp, **kwargs):
+ # Hide dtype kwarg from map_blocks
+ return xp.map_blocks(functools.partial(_f, **kwargs), *args)
+
+ return f
+
+ # As a final resort, use the NumPy/SciPy implementation
+ _f = self.func
+ def f(*args, _f=_f, xp=xp, **kwargs):
+ # TODO use xpx.lazy_apply to add jax.jit support
+ # (but dtype propagation can be non-trivial)
+ args = [np.asarray(arg) for arg in args]
+ out = _f(*args, **kwargs)
+ return xp.asarray(out)
+
+ return f
+
+
+def _get_native_func(xp, spx, f_name, *, alt_names_map=None):
+ if alt_names_map is None:
+ alt_names_map = {}
+ f_name = alt_names_map.get(get_native_namespace_name(xp), f_name)
+ f = getattr(spx.special, f_name, None) if spx else None
+ if f is None and hasattr(xp, 'special'):
+ # Currently dead branch, in anticipation of 'special' Array API extension
+ # https://github.com/data-apis/array-api/issues/725
+ f = getattr(xp.special, f_name, None)
+ return f
+
+
+def _rel_entr(xp, spx):
+ def __rel_entr(x, y, *, xp=xp):
+ # https://github.com/data-apis/array-api-extra/issues/160
+ mxp = array_namespace(x._meta, y._meta) if is_dask(xp) else xp
+ x, y = xp_promote(x, y, broadcast=True, force_floating=True, xp=xp)
+ xy_pos = (x > 0) & (y > 0)
+ xy_inf = xp.isinf(x) & xp.isinf(y)
+ res = xpx.apply_where(
+ xy_pos & ~xy_inf,
+ (x, y),
+ # Note: for very large x, this can overflow.
+ lambda x, y: x * (mxp.log(x) - mxp.log(y)),
+ fill_value=xp.inf
+ )
+ res = xpx.at(res)[(x == 0) & (y >= 0)].set(0)
+ res = xpx.at(res)[xp.isnan(x) | xp.isnan(y) | (xy_pos & xy_inf)].set(xp.nan)
+ return res
+
+ return __rel_entr
+
+
+def _xlogy(xp, spx):
+ def __xlogy(x, y, *, xp=xp):
+ x, y = xp_promote(x, y, force_floating=True, xp=xp)
+ with np.errstate(divide='ignore', invalid='ignore'):
+ temp = x * xp.log(y)
+ return xp.where(x == 0., 0., temp)
+ return __xlogy
+
+
+
+def _chdtr(xp, spx):
+ # The difference between this and just using `gammainc`
+ # defined by `get_array_special_func` is that if `gammainc`
+ # isn't found, we don't want to use the SciPy version; we'll
+ # return None here and use the SciPy version of `chdtr`.
+ gammainc = _get_native_func(xp, spx, 'gammainc')
+ if gammainc is None:
+ return None
+
+ def __chdtr(v, x):
+ res = gammainc(v / 2, x / 2) # this is almost all we need
+ # The rest can be removed when google/jax#20507 is resolved
+ mask = (v == 0) & (x > 0) # JAX returns NaN
+ res = xp.where(mask, 1., res)
+ mask = xp.isinf(v) & xp.isinf(x) # JAX returns 1.0
+ return xp.where(mask, xp.nan, res)
+ return __chdtr
+
+
+def _chdtrc(xp, spx):
+ # The difference between this and just using `gammaincc`
+ # defined by `get_array_special_func` is that if `gammaincc`
+ # isn't found, we don't want to use the SciPy version; we'll
+ # return None here and use the SciPy version of `chdtrc`.
+ gammaincc = _get_native_func(xp, spx, 'gammaincc')
+ if gammaincc is None:
+ return None
+
+ def __chdtrc(v, x):
+ res = xp.where(x >= 0, gammaincc(v/2, x/2), 1)
+ i_nan = ((x == 0) & (v == 0)) | xp.isnan(x) | xp.isnan(v) | (v <= 0)
+ res = xp.where(i_nan, xp.nan, res)
+ return res
+ return __chdtrc
+
+
+def _betaincc(xp, spx):
+ betainc = _get_native_func(xp, spx, 'betainc')
+ if betainc is None:
+ return None
+
+ def __betaincc(a, b, x):
+ # not perfect; might want to just rely on SciPy
+ return betainc(b, a, 1-x)
+ return __betaincc
+
+
+def _stdtr(xp, spx):
+ betainc = _get_native_func(xp, spx, 'betainc')
+ if betainc is None:
+ return None
+
+ def __stdtr(df, t):
+ x = df / (t ** 2 + df)
+ tail = betainc(df / 2, 0.5, x) / 2
+ return xp.where(t < 0, tail, 1 - tail)
+
+ return __stdtr
+
+
+def _stdtrit(xp, spx):
+ # Need either native stdtr or native betainc
+ stdtr = _get_native_func(xp, spx, 'stdtr') or _stdtr(xp, spx)
+ # If betainc is not defined, the root-finding would be done with `xp`
+ # despite `stdtr` being evaluated with SciPy/NumPy `stdtr`. Save the
+ # conversions: in this case, just evaluate `stdtrit` with SciPy/NumPy.
+ if stdtr is None:
+ return None
+
+ from scipy.optimize.elementwise import bracket_root, find_root
+
+ def __stdtrit(df, p):
+ def fun(t, df, p): return stdtr(df, t) - p
+ res_bracket = bracket_root(fun, xp.zeros_like(p), args=(df, p))
+ res_root = find_root(fun, res_bracket.bracket, args=(df, p))
+ return res_root.x
+
+ return __stdtrit
+
+
+# Inventory of automatically dispatched functions
+# IMPORTANT: these must all be **elementwise** functions!
+
+# PyTorch doesn't implement `betainc`.
+# On torch CPU we can fall back to NumPy, but on GPU it won't work.
+_needs_betainc = xp_capabilities(cpu_only=True, exceptions=["jax.numpy", "cupy"])
+
+_special_funcs = (
+ _FuncInfo(
+ _ufuncs.bdtr, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(False, True, False), torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.bdtrc, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(False, True, False), torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.bdtri, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(False, True, False), torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.betainc, 3, _needs_betainc, torch_native=False),
+ _FuncInfo(_ufuncs.betaincc, 3, _needs_betainc, generic_impl=_betaincc,
+ torch_native=False),
+ _FuncInfo(
+ _ufuncs.betaincinv, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ test_large_ints=False, positive_only=True, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.betaln, 2,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ # For betaln, nan mismatches can occur at negative integer a or b of
+ # sufficiently large magnitude.
+ positive_only={"jax.numpy": True}, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.binom, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.boxcox, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.boxcox1p, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.cbrt, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.chdtr, 2, generic_impl=_chdtr),
+ _FuncInfo(_ufuncs.chdtrc, 2, generic_impl=_chdtrc,
+ # scipy/scipy#20972
+ positive_only={"cupy": True, "jax.numpy": True, "torch": True}),
+ _FuncInfo(
+ _ufuncs.chdtri, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.cosdg, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ test_large_ints=False, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.cosm1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.cotdg, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.ellipk, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.ellipkm1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.entr, 1),
+ _FuncInfo(_ufuncs.erf, 1),
+ _FuncInfo(_ufuncs.erfc, 1),
+ _FuncInfo(
+ _ufuncs.erfcx, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.erfinv, 1),
+ _FuncInfo(
+ _ufuncs.exp1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.exp10, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.exp2, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.exprel, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.expi, 1,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.expit, 1),
+ _FuncInfo(
+ _ufuncs.expn, 2,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ # Inconsistent behavior for negative n. expn is not defined here without
+ # taking analytic continuation.
+ positive_only=True,
+ int_only=(True, False), test_large_ints=False,
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.fdtr, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.fdtrc, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.fdtri, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.gamma, 1,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.gammainc, 2),
+ _FuncInfo(
+ _ufuncs.gammaincc, 2,
+ # google/jax#20699
+ positive_only={"jax.numpy": True},
+ ),
+ _FuncInfo(
+ _ufuncs.gammainccinv, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.gammaincinv, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.gammaln, 1),
+ _FuncInfo(
+ _ufuncs.gammasgn, 1,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.gdtr, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.gdtrc, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.huber, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.hyp1f1, 3,
+ xp_capabilities(cpu_only=True, exceptions=["jax.numpy"]),
+ positive_only={"jax.numpy": True}, test_large_ints=False,
+ torch_native=False,
+ ),
+ # Comment out when jax>=0.6.1 is available in Conda for CI.
+ # (or add version requirements to xp_capabilities).
+ # _FuncInfo(
+ # _ufuncs.hyp2f1, 4,
+ # xp_capabilities(cpu_only=True, exceptions=["jax.numpy"]),
+ # positive_only={"jax.numpy": True}, test_large_ints=False,
+ # torch_native=False,
+ # ),
+ _FuncInfo(
+ _ufuncs.inv_boxcox, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.inv_boxcox1p, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.i0, 1),
+ _FuncInfo(_ufuncs.i0e, 1),
+ _FuncInfo(_ufuncs.i1, 1),
+ _FuncInfo(_ufuncs.i1e, 1),
+ _FuncInfo(
+ _ufuncs.j0, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "bessel_j0"}, test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.j1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "bessel_j1"}, test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.k0, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "modified_bessel_k0"},
+ ),
+ _FuncInfo(
+ _ufuncs.k0e, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "scaled_modified_bessel_k0"},
+ test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.k1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "modified_bessel_k1"},
+ ),
+ _FuncInfo(
+ _ufuncs.k1e, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "scaled_modified_bessel_k1"},
+ test_large_ints=False),
+ _FuncInfo(
+ _ufuncs.kl_div, 2,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.log_ndtr, 1),
+ _FuncInfo(
+ _ufuncs.loggamma, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.logit, 1),
+ _FuncInfo(
+ _ufuncs.lpmv, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ test_large_ints=False,
+ ),
+ _FuncInfo(
+ _spfun_stats.multigammaln, 2,
+ is_ufunc=False,
+ python_int_only={
+ "cupy": [False, True],
+ "jax.numpy": [False, True],
+ "torch": [False, True],
+ },
+ scalar_or_0d_only={
+ "array_api_strict": [False, True],
+ "numpy": [False, True],
+ "dask.array": [False, True],
+ "marray": [False, True],
+ },
+ int_only=(False, True), test_large_ints=False,
+ positive_only=True, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.nbdtr, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(True, True, False), positive_only=True,
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.nbdtrc, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(True, True, False), positive_only=True,
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.nbdtri, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(True, True, False), positive_only=True,
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.ndtr, 1),
+ _FuncInfo(_ufuncs.ndtri, 1),
+ _FuncInfo(
+ _ufuncs.pdtr, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ positive_only=True, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.pdtrc, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ positive_only=True, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.pdtri, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ int_only=(True, False), positive_only=True,
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.poch, 2,
+ xp_capabilities(cpu_only=True, exceptions=["cupy", "jax.numpy"]),
+ test_large_ints=False, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.pseudo_huber, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _basic.polygamma, 2, int_only=(True, False), is_ufunc=False,
+ scalar_or_0d_only={"torch": (True, False)}, produces_0d=True,
+ positive_only={"torch": (True, False), "jax.numpy": True},
+ test_large_ints=False,
+ ),
+ _FuncInfo(_ufuncs.psi, 1, alt_names_map={"jax.numpy": "digamma"}),
+ _FuncInfo(
+ _ufuncs.radian, 3,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.rel_entr, 2, generic_impl=_rel_entr),
+ _FuncInfo(
+ _ufuncs.rgamma, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+ _FuncInfo(
+ _basic.sinc, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ is_ufunc=False,
+ ),
+ _FuncInfo(
+ _ufuncs.sindg, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ test_large_ints=False, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.spence, 1,
+ xp_capabilities(cpu_only=True, exceptions=["jax.numpy"]),
+ torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.stdtr, 2, _needs_betainc, generic_impl=_stdtr,
+ torch_native=False),
+ _FuncInfo(
+ _ufuncs.stdtrit, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"], # needs betainc
+ skip_backends=[("jax.numpy", "no scipy.optimize support")],
+ ),
+ generic_impl=_stdtrit, torch_native=False,
+ ),
+ _FuncInfo(
+ _ufuncs.tandg, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ test_large_ints=False, torch_native=False,
+ ),
+ _FuncInfo(_ufuncs.xlog1py, 2),
+ _FuncInfo(_ufuncs.xlogy, 2, generic_impl=_xlogy),
+ _FuncInfo(
+ _ufuncs.y0, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "bessel_y0"}, test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.y1, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy", "torch"],
+ jax_jit=False,
+ ),
+ alt_names_map={"torch": "bessel_y1"}, test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.yn, 2,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ positive_only={"cupy": (True, False)}, int_only=(True, False),
+ test_large_ints=False, torch_native=False,
+ ),
+ _FuncInfo(
+ _basic.zeta, 2, is_ufunc=False,
+ positive_only={"jax.numpy": True, "torch": (True, False)},
+ test_large_ints=False,
+ ),
+ _FuncInfo(
+ _ufuncs.zetac, 1,
+ xp_capabilities(
+ cpu_only=True, exceptions=["cupy"],
+ jax_jit=False,
+ ),
+ torch_native=False,
+ ),
+)
+
+# Override ufuncs.
+# When SCIPY_ARRAY_API is disabled, this exclusively updates the docstrings in place
+# and populates the xp_capabilities table, while retaining the original ufuncs.
+globals().update({nfo.func.__name__: nfo.wrapper for nfo in _special_funcs})
+# digamma is an alias for psi. Define here so it also has alternative backend
+# support. Add noqa because the linter gets confused by the sneaky way psi
+# is inserted into globals above.
+digamma = psi # noqa: F821
+__all__ = [nfo.func.__name__ for nfo in _special_funcs] + ["digamma"]
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..2efdcdd17d2fd6e21693274e8fec8a5e4fca49a5
Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.cpython-312-darwin.so differ
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1e6c272f16fa2bd3ae75af412bc6ae3270158ce4
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_test_internal.pyi
@@ -0,0 +1,9 @@
+import numpy as np
+
+def have_fenv() -> bool: ...
+def random_double(size: int, rng: np.random.RandomState) -> np.float64: ...
+def test_add_round(size: int, mode: str, rng: np.random.RandomState): ...
+
+def _dd_exp(xhi: float, xlo: float) -> tuple[float, float]: ...
+def _dd_log(xhi: float, xlo: float) -> tuple[float, float]: ...
+def _dd_expm1(xhi: float, xlo: float) -> tuple[float, float]: ...
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_testutils.py b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_testutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..0fd1951bb415d72c55efdb0f884d56dc617d818b
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_testutils.py
@@ -0,0 +1,321 @@
+import os
+import functools
+import operator
+from scipy._lib import _pep440
+
+import numpy as np
+from numpy.testing import assert_
+import pytest
+
+import scipy.special as sc
+
+__all__ = ['with_special_errors', 'assert_func_equal', 'FuncData']
+
+
+#------------------------------------------------------------------------------
+# Check if a module is present to be used in tests
+#------------------------------------------------------------------------------
+
+class MissingModule:
+ def __init__(self, name):
+ self.name = name
+
+
+def check_version(module, min_ver):
+ if type(module) is MissingModule:
+ return pytest.mark.skip(reason=f"{module.name} is not installed")
+ return pytest.mark.skipif(
+ _pep440.parse(module.__version__) < _pep440.Version(min_ver),
+ reason=f"{module.__name__} version >= {min_ver} required"
+ )
+
+
+#------------------------------------------------------------------------------
+# Enable convergence and loss of precision warnings -- turn off one by one
+#------------------------------------------------------------------------------
+
+def with_special_errors(func):
+ """
+ Enable special function errors (such as underflow, overflow,
+ loss of precision, etc.)
+ """
+ @functools.wraps(func)
+ def wrapper(*a, **kw):
+ with sc.errstate(all='raise'):
+ res = func(*a, **kw)
+ return res
+ return wrapper
+
+
+#------------------------------------------------------------------------------
+# Comparing function values at many data points at once, with helpful
+# error reports
+#------------------------------------------------------------------------------
+
+def assert_func_equal(func, results, points, rtol=None, atol=None,
+ param_filter=None, knownfailure=None,
+ vectorized=True, dtype=None, nan_ok=False,
+ ignore_inf_sign=False, distinguish_nan_and_inf=True):
+ if hasattr(points, 'next'):
+ # it's a generator
+ points = list(points)
+
+ points = np.asarray(points)
+ if points.ndim == 1:
+ points = points[:,None]
+ nparams = points.shape[1]
+
+ if hasattr(results, '__name__'):
+ # function
+ data = points
+ result_columns = None
+ result_func = results
+ else:
+ # dataset
+ data = np.c_[points, results]
+ result_columns = list(range(nparams, data.shape[1]))
+ result_func = None
+
+ fdata = FuncData(func, data, list(range(nparams)),
+ result_columns=result_columns, result_func=result_func,
+ rtol=rtol, atol=atol, param_filter=param_filter,
+ knownfailure=knownfailure, nan_ok=nan_ok, vectorized=vectorized,
+ ignore_inf_sign=ignore_inf_sign,
+ distinguish_nan_and_inf=distinguish_nan_and_inf)
+ fdata.check()
+
+
+class FuncData:
+ """
+ Data set for checking a special function.
+
+ Parameters
+ ----------
+ func : function
+ Function to test
+ data : numpy array
+ columnar data to use for testing
+ param_columns : int or tuple of ints
+ Columns indices in which the parameters to `func` lie.
+ Can be imaginary integers to indicate that the parameter
+ should be cast to complex.
+ result_columns : int or tuple of ints, optional
+ Column indices for expected results from `func`.
+ result_func : callable, optional
+ Function to call to obtain results.
+ rtol : float, optional
+ Required relative tolerance. Default is 5*eps.
+ atol : float, optional
+ Required absolute tolerance. Default is 5*tiny.
+ param_filter : function, or tuple of functions/Nones, optional
+ Filter functions to exclude some parameter ranges.
+ If omitted, no filtering is done.
+ knownfailure : str, optional
+ Known failure error message to raise when the test is run.
+ If omitted, no exception is raised.
+ nan_ok : bool, optional
+ If nan is always an accepted result.
+ vectorized : bool, optional
+ Whether all functions passed in are vectorized.
+ ignore_inf_sign : bool, optional
+ Whether to ignore signs of infinities.
+ (Doesn't matter for complex-valued functions.)
+ distinguish_nan_and_inf : bool, optional
+ If True, treat numbers which contain nans or infs as
+ equal. Sets ignore_inf_sign to be True.
+
+ """
+
+ def __init__(self, func, data, param_columns, result_columns=None,
+ result_func=None, rtol=None, atol=None, param_filter=None,
+ knownfailure=None, dataname=None, nan_ok=False, vectorized=True,
+ ignore_inf_sign=False, distinguish_nan_and_inf=True):
+ self.func = func
+ self.data = data
+ self.dataname = dataname
+ if not hasattr(param_columns, '__len__'):
+ param_columns = (param_columns,)
+ self.param_columns = tuple(param_columns)
+ if result_columns is not None:
+ if not hasattr(result_columns, '__len__'):
+ result_columns = (result_columns,)
+ self.result_columns = tuple(result_columns)
+ if result_func is not None:
+ message = "Only result_func or result_columns should be provided"
+ raise ValueError(message)
+ elif result_func is not None:
+ self.result_columns = None
+ else:
+ raise ValueError("Either result_func or result_columns should be provided")
+ self.result_func = result_func
+ self.rtol = rtol
+ self.atol = atol
+ if not hasattr(param_filter, '__len__'):
+ param_filter = (param_filter,)
+ self.param_filter = param_filter
+ self.knownfailure = knownfailure
+ self.nan_ok = nan_ok
+ self.vectorized = vectorized
+ self.ignore_inf_sign = ignore_inf_sign
+ self.distinguish_nan_and_inf = distinguish_nan_and_inf
+ if not self.distinguish_nan_and_inf:
+ self.ignore_inf_sign = True
+
+ def get_tolerances(self, dtype):
+ if not np.issubdtype(dtype, np.inexact):
+ dtype = np.dtype(float)
+ info = np.finfo(dtype)
+ rtol, atol = self.rtol, self.atol
+ if rtol is None:
+ rtol = 5*info.eps
+ if atol is None:
+ atol = 5*info.tiny
+ return rtol, atol
+
+ def check(self, data=None, dtype=None, dtypes=None):
+ """Check the special function against the data."""
+ __tracebackhide__ = operator.methodcaller(
+ 'errisinstance', AssertionError
+ )
+
+ if self.knownfailure:
+ pytest.xfail(reason=self.knownfailure)
+
+ if data is None:
+ data = self.data
+
+ if dtype is None:
+ dtype = data.dtype
+ else:
+ data = data.astype(dtype)
+
+ rtol, atol = self.get_tolerances(dtype)
+
+ # Apply given filter functions
+ if self.param_filter:
+ param_mask = np.ones((data.shape[0],), np.bool_)
+ for j, filter in zip(self.param_columns, self.param_filter):
+ if filter:
+ param_mask &= list(filter(data[:,j]))
+ data = data[param_mask]
+
+ # Pick parameters from the correct columns
+ params = []
+ for idx, j in enumerate(self.param_columns):
+ if np.iscomplexobj(j):
+ j = int(j.imag)
+ params.append(data[:,j].astype(complex))
+ elif dtypes and idx < len(dtypes):
+ params.append(data[:, j].astype(dtypes[idx]))
+ else:
+ params.append(data[:,j])
+
+ # Helper for evaluating results
+ def eval_func_at_params(func, skip_mask=None):
+ if self.vectorized:
+ got = func(*params)
+ else:
+ got = []
+ for j in range(len(params[0])):
+ if skip_mask is not None and skip_mask[j]:
+ got.append(np.nan)
+ continue
+ got.append(func(*tuple([params[i][j] for i in range(len(params))])))
+ got = np.asarray(got)
+ if not isinstance(got, tuple):
+ got = (got,)
+ return got
+
+ # Evaluate function to be tested
+ got = eval_func_at_params(self.func)
+
+ # Grab the correct results
+ if self.result_columns is not None:
+ # Correct results passed in with the data
+ wanted = tuple([data[:,icol] for icol in self.result_columns])
+ else:
+ # Function producing correct results passed in
+ skip_mask = None
+ if self.nan_ok and len(got) == 1:
+ # Don't spend time evaluating what doesn't need to be evaluated
+ skip_mask = np.isnan(got[0])
+ wanted = eval_func_at_params(self.result_func, skip_mask=skip_mask)
+
+ # Check the validity of each output returned
+ assert_(len(got) == len(wanted))
+
+ for output_num, (x, y) in enumerate(zip(got, wanted)):
+ if np.issubdtype(x.dtype, np.complexfloating) or self.ignore_inf_sign:
+ pinf_x = np.isinf(x)
+ pinf_y = np.isinf(y)
+ minf_x = np.isinf(x)
+ minf_y = np.isinf(y)
+ else:
+ pinf_x = np.isposinf(x)
+ pinf_y = np.isposinf(y)
+ minf_x = np.isneginf(x)
+ minf_y = np.isneginf(y)
+ nan_x = np.isnan(x)
+ nan_y = np.isnan(y)
+
+ with np.errstate(all='ignore'):
+ abs_y = np.absolute(y)
+ abs_y[~np.isfinite(abs_y)] = 0
+ diff = np.absolute(x - y)
+ diff[~np.isfinite(diff)] = 0
+
+ rdiff = diff / np.absolute(y)
+ rdiff[~np.isfinite(rdiff)] = 0
+
+ tol_mask = (diff <= atol + rtol*abs_y)
+ pinf_mask = (pinf_x == pinf_y)
+ minf_mask = (minf_x == minf_y)
+
+ nan_mask = (nan_x == nan_y)
+
+ bad_j = ~(tol_mask & pinf_mask & minf_mask & nan_mask)
+
+ point_count = bad_j.size
+ if self.nan_ok:
+ bad_j &= ~nan_x
+ bad_j &= ~nan_y
+ point_count -= (nan_x | nan_y).sum()
+
+ if not self.distinguish_nan_and_inf and not self.nan_ok:
+ # If nan's are okay we've already covered all these cases
+ inf_x = np.isinf(x)
+ inf_y = np.isinf(y)
+ both_nonfinite = (inf_x & nan_y) | (nan_x & inf_y)
+ bad_j &= ~both_nonfinite
+ point_count -= both_nonfinite.sum()
+
+ if np.any(bad_j):
+ # Some bad results: inform what, where, and how bad
+ msg = [""]
+ msg.append(f"Max |adiff|: {diff[bad_j].max():g}")
+ msg.append(f"Max |rdiff|: {rdiff[bad_j].max():g}")
+ msg.append(f"Bad results ({np.sum(bad_j)} out of "
+ f"{point_count}) for the following points "
+ f"(in output {output_num}):")
+ for j in np.nonzero(bad_j)[0]:
+ j = int(j)
+ def fmt(x):
+ return f'{np.array2string(x[j], precision=18):30s}'
+ a = " ".join(map(fmt, params))
+ b = " ".join(map(fmt, got))
+ c = " ".join(map(fmt, wanted))
+ d = fmt(rdiff)
+ msg.append(f"{a} => {b} != {c} (rdiff {d})")
+ assert_(False, "\n".join(msg))
+
+ def __repr__(self):
+ """Pretty-printing"""
+ if np.any(list(map(np.iscomplexobj, self.param_columns))):
+ is_complex = " (complex)"
+ else:
+ is_complex = ""
+ if self.dataname:
+ return (f"")
+ else:
+ return f""
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so
new file mode 100644
index 0000000000000000000000000000000000000000..e2e9a544685a492d0d1f834e13daa204949b2e90
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ff965ce3b560fa7e2f6901b665e42b96554024a5b32a253c7f7f5bc95c2134f
+size 702944
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyi b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..eb90cc8d13a67d2a81631e7d57803d8396dbdb4a
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyi
@@ -0,0 +1,522 @@
+from typing import Any
+
+import numpy as np
+
+__all__ = [
+ 'geterr',
+ 'seterr',
+ 'errstate',
+ 'agm',
+ 'airy',
+ 'airye',
+ 'bdtr',
+ 'bdtrc',
+ 'bdtri',
+ 'bdtrik',
+ 'bdtrin',
+ 'bei',
+ 'beip',
+ 'ber',
+ 'berp',
+ 'besselpoly',
+ 'beta',
+ 'betainc',
+ 'betaincc',
+ 'betainccinv',
+ 'betaincinv',
+ 'betaln',
+ 'binom',
+ 'boxcox',
+ 'boxcox1p',
+ 'btdtria',
+ 'btdtrib',
+ 'cbrt',
+ 'chdtr',
+ 'chdtrc',
+ 'chdtri',
+ 'chdtriv',
+ 'chndtr',
+ 'chndtridf',
+ 'chndtrinc',
+ 'chndtrix',
+ 'cosdg',
+ 'cosm1',
+ 'cotdg',
+ 'dawsn',
+ 'ellipe',
+ 'ellipeinc',
+ 'ellipj',
+ 'ellipk',
+ 'ellipkinc',
+ 'ellipkm1',
+ 'elliprc',
+ 'elliprd',
+ 'elliprf',
+ 'elliprg',
+ 'elliprj',
+ 'entr',
+ 'erf',
+ 'erfc',
+ 'erfcinv',
+ 'erfcx',
+ 'erfi',
+ 'erfinv',
+ 'eval_chebyc',
+ 'eval_chebys',
+ 'eval_chebyt',
+ 'eval_chebyu',
+ 'eval_gegenbauer',
+ 'eval_genlaguerre',
+ 'eval_hermite',
+ 'eval_hermitenorm',
+ 'eval_jacobi',
+ 'eval_laguerre',
+ 'eval_legendre',
+ 'eval_sh_chebyt',
+ 'eval_sh_chebyu',
+ 'eval_sh_jacobi',
+ 'eval_sh_legendre',
+ 'exp1',
+ 'exp10',
+ 'exp2',
+ 'expi',
+ 'expit',
+ 'expm1',
+ 'expn',
+ 'exprel',
+ 'fdtr',
+ 'fdtrc',
+ 'fdtri',
+ 'fdtridfd',
+ 'fresnel',
+ 'gamma',
+ 'gammainc',
+ 'gammaincc',
+ 'gammainccinv',
+ 'gammaincinv',
+ 'gammaln',
+ 'gammasgn',
+ 'gdtr',
+ 'gdtrc',
+ 'gdtria',
+ 'gdtrib',
+ 'gdtrix',
+ 'hankel1',
+ 'hankel1e',
+ 'hankel2',
+ 'hankel2e',
+ 'huber',
+ 'hyp0f1',
+ 'hyp1f1',
+ 'hyp2f1',
+ 'hyperu',
+ 'i0',
+ 'i0e',
+ 'i1',
+ 'i1e',
+ 'inv_boxcox',
+ 'inv_boxcox1p',
+ 'it2i0k0',
+ 'it2j0y0',
+ 'it2struve0',
+ 'itairy',
+ 'iti0k0',
+ 'itj0y0',
+ 'itmodstruve0',
+ 'itstruve0',
+ 'iv',
+ 'ive',
+ 'j0',
+ 'j1',
+ 'jn',
+ 'jv',
+ 'jve',
+ 'k0',
+ 'k0e',
+ 'k1',
+ 'k1e',
+ 'kei',
+ 'keip',
+ 'kelvin',
+ 'ker',
+ 'kerp',
+ 'kl_div',
+ 'kn',
+ 'kolmogi',
+ 'kolmogorov',
+ 'kv',
+ 'kve',
+ 'log1p',
+ 'log_expit',
+ 'log_ndtr',
+ 'log_wright_bessel',
+ 'loggamma',
+ 'logit',
+ 'lpmv',
+ 'mathieu_a',
+ 'mathieu_b',
+ 'mathieu_cem',
+ 'mathieu_modcem1',
+ 'mathieu_modcem2',
+ 'mathieu_modsem1',
+ 'mathieu_modsem2',
+ 'mathieu_sem',
+ 'modfresnelm',
+ 'modfresnelp',
+ 'modstruve',
+ 'nbdtr',
+ 'nbdtrc',
+ 'nbdtri',
+ 'nbdtrik',
+ 'nbdtrin',
+ 'ncfdtr',
+ 'ncfdtri',
+ 'ncfdtridfd',
+ 'ncfdtridfn',
+ 'ncfdtrinc',
+ 'nctdtr',
+ 'nctdtridf',
+ 'nctdtrinc',
+ 'nctdtrit',
+ 'ndtr',
+ 'ndtri',
+ 'ndtri_exp',
+ 'nrdtrimn',
+ 'nrdtrisd',
+ 'obl_ang1',
+ 'obl_ang1_cv',
+ 'obl_cv',
+ 'obl_rad1',
+ 'obl_rad1_cv',
+ 'obl_rad2',
+ 'obl_rad2_cv',
+ 'owens_t',
+ 'pbdv',
+ 'pbvv',
+ 'pbwa',
+ 'pdtr',
+ 'pdtrc',
+ 'pdtri',
+ 'pdtrik',
+ 'poch',
+ 'powm1',
+ 'pro_ang1',
+ 'pro_ang1_cv',
+ 'pro_cv',
+ 'pro_rad1',
+ 'pro_rad1_cv',
+ 'pro_rad2',
+ 'pro_rad2_cv',
+ 'pseudo_huber',
+ 'psi',
+ 'radian',
+ 'rel_entr',
+ 'rgamma',
+ 'round',
+ 'shichi',
+ 'sici',
+ 'sindg',
+ 'smirnov',
+ 'smirnovi',
+ 'spence',
+ 'stdtr',
+ 'stdtridf',
+ 'stdtrit',
+ 'struve',
+ 'tandg',
+ 'tklmbda',
+ 'voigt_profile',
+ 'wofz',
+ 'wright_bessel',
+ 'wrightomega',
+ 'xlog1py',
+ 'xlogy',
+ 'y0',
+ 'y1',
+ 'yn',
+ 'yv',
+ 'yve',
+ 'zetac'
+]
+
+def geterr() -> dict[str, str]: ...
+def seterr(**kwargs: str) -> dict[str, str]: ...
+
+class errstate:
+ def __init__(self, **kargs: str) -> None: ...
+ def __enter__(self) -> None: ...
+ def __exit__(
+ self,
+ exc_type: Any, # Unused
+ exc_value: Any, # Unused
+ traceback: Any, # Unused
+ ) -> None: ...
+
+_cosine_cdf: np.ufunc
+_cosine_invcdf: np.ufunc
+_cospi: np.ufunc
+_ellip_harm: np.ufunc
+_factorial: np.ufunc
+_gen_harmonic: np.ufunc
+_igam_fac: np.ufunc
+_kolmogc: np.ufunc
+_kolmogci: np.ufunc
+_kolmogp: np.ufunc
+_lambertw: np.ufunc
+_lanczos_sum_expg_scaled: np.ufunc
+_lgam1p: np.ufunc
+_log1mexp: np.ufunc
+_log1pmx: np.ufunc
+_normalized_gen_harmonic: np.ufunc
+_riemann_zeta: np.ufunc
+_scaled_exp1: np.ufunc
+_sf_error_test_function: np.ufunc
+_sinpi: np.ufunc
+_smirnovc: np.ufunc
+_smirnovci: np.ufunc
+_smirnovp: np.ufunc
+_spherical_in: np.ufunc
+_spherical_in_d: np.ufunc
+_spherical_jn: np.ufunc
+_spherical_jn_d: np.ufunc
+_spherical_kn: np.ufunc
+_spherical_kn_d: np.ufunc
+_spherical_yn: np.ufunc
+_spherical_yn_d: np.ufunc
+_stirling2_inexact: np.ufunc
+_struve_asymp_large_z: np.ufunc
+_struve_bessel_series: np.ufunc
+_struve_power_series: np.ufunc
+_zeta: np.ufunc
+agm: np.ufunc
+airy: np.ufunc
+airye: np.ufunc
+bdtr: np.ufunc
+bdtrc: np.ufunc
+bdtri: np.ufunc
+bdtrik: np.ufunc
+bdtrin: np.ufunc
+bei: np.ufunc
+beip: np.ufunc
+ber: np.ufunc
+berp: np.ufunc
+besselpoly: np.ufunc
+beta: np.ufunc
+betainc: np.ufunc
+betaincc: np.ufunc
+betainccinv: np.ufunc
+betaincinv: np.ufunc
+betaln: np.ufunc
+binom: np.ufunc
+boxcox1p: np.ufunc
+boxcox: np.ufunc
+btdtria: np.ufunc
+btdtrib: np.ufunc
+cbrt: np.ufunc
+chdtr: np.ufunc
+chdtrc: np.ufunc
+chdtri: np.ufunc
+chdtriv: np.ufunc
+chndtr: np.ufunc
+chndtridf: np.ufunc
+chndtrinc: np.ufunc
+chndtrix: np.ufunc
+cosdg: np.ufunc
+cosm1: np.ufunc
+cotdg: np.ufunc
+dawsn: np.ufunc
+ellipe: np.ufunc
+ellipeinc: np.ufunc
+ellipj: np.ufunc
+ellipk: np.ufunc
+ellipkinc: np.ufunc
+ellipkm1: np.ufunc
+elliprc: np.ufunc
+elliprd: np.ufunc
+elliprf: np.ufunc
+elliprg: np.ufunc
+elliprj: np.ufunc
+entr: np.ufunc
+erf: np.ufunc
+erfc: np.ufunc
+erfcinv: np.ufunc
+erfcx: np.ufunc
+erfi: np.ufunc
+erfinv: np.ufunc
+eval_chebyc: np.ufunc
+eval_chebys: np.ufunc
+eval_chebyt: np.ufunc
+eval_chebyu: np.ufunc
+eval_gegenbauer: np.ufunc
+eval_genlaguerre: np.ufunc
+eval_hermite: np.ufunc
+eval_hermitenorm: np.ufunc
+eval_jacobi: np.ufunc
+eval_laguerre: np.ufunc
+eval_legendre: np.ufunc
+eval_sh_chebyt: np.ufunc
+eval_sh_chebyu: np.ufunc
+eval_sh_jacobi: np.ufunc
+eval_sh_legendre: np.ufunc
+exp10: np.ufunc
+exp1: np.ufunc
+exp2: np.ufunc
+expi: np.ufunc
+expit: np.ufunc
+expm1: np.ufunc
+expn: np.ufunc
+exprel: np.ufunc
+fdtr: np.ufunc
+fdtrc: np.ufunc
+fdtri: np.ufunc
+fdtridfd: np.ufunc
+fresnel: np.ufunc
+gamma: np.ufunc
+gammainc: np.ufunc
+gammaincc: np.ufunc
+gammainccinv: np.ufunc
+gammaincinv: np.ufunc
+gammaln: np.ufunc
+gammasgn: np.ufunc
+gdtr: np.ufunc
+gdtrc: np.ufunc
+gdtria: np.ufunc
+gdtrib: np.ufunc
+gdtrix: np.ufunc
+hankel1: np.ufunc
+hankel1e: np.ufunc
+hankel2: np.ufunc
+hankel2e: np.ufunc
+huber: np.ufunc
+hyp0f1: np.ufunc
+hyp1f1: np.ufunc
+hyp2f1: np.ufunc
+hyperu: np.ufunc
+i0: np.ufunc
+i0e: np.ufunc
+i1: np.ufunc
+i1e: np.ufunc
+inv_boxcox1p: np.ufunc
+inv_boxcox: np.ufunc
+it2i0k0: np.ufunc
+it2j0y0: np.ufunc
+it2struve0: np.ufunc
+itairy: np.ufunc
+iti0k0: np.ufunc
+itj0y0: np.ufunc
+itmodstruve0: np.ufunc
+itstruve0: np.ufunc
+iv: np.ufunc
+ive: np.ufunc
+j0: np.ufunc
+j1: np.ufunc
+jn: np.ufunc
+jv: np.ufunc
+jve: np.ufunc
+k0: np.ufunc
+k0e: np.ufunc
+k1: np.ufunc
+k1e: np.ufunc
+kei: np.ufunc
+keip: np.ufunc
+kelvin: np.ufunc
+ker: np.ufunc
+kerp: np.ufunc
+kl_div: np.ufunc
+kn: np.ufunc
+kolmogi: np.ufunc
+kolmogorov: np.ufunc
+kv: np.ufunc
+kve: np.ufunc
+log1p: np.ufunc
+log_expit: np.ufunc
+log_ndtr: np.ufunc
+log_wright_bessel: np.ufunc
+loggamma: np.ufunc
+logit: np.ufunc
+lpmv: np.ufunc
+mathieu_a: np.ufunc
+mathieu_b: np.ufunc
+mathieu_cem: np.ufunc
+mathieu_modcem1: np.ufunc
+mathieu_modcem2: np.ufunc
+mathieu_modsem1: np.ufunc
+mathieu_modsem2: np.ufunc
+mathieu_sem: np.ufunc
+modfresnelm: np.ufunc
+modfresnelp: np.ufunc
+modstruve: np.ufunc
+nbdtr: np.ufunc
+nbdtrc: np.ufunc
+nbdtri: np.ufunc
+nbdtrik: np.ufunc
+nbdtrin: np.ufunc
+ncfdtr: np.ufunc
+ncfdtri: np.ufunc
+ncfdtridfd: np.ufunc
+ncfdtridfn: np.ufunc
+ncfdtrinc: np.ufunc
+nctdtr: np.ufunc
+nctdtridf: np.ufunc
+nctdtrinc: np.ufunc
+nctdtrit: np.ufunc
+ndtr: np.ufunc
+ndtri: np.ufunc
+ndtri_exp: np.ufunc
+nrdtrimn: np.ufunc
+nrdtrisd: np.ufunc
+obl_ang1: np.ufunc
+obl_ang1_cv: np.ufunc
+obl_cv: np.ufunc
+obl_rad1: np.ufunc
+obl_rad1_cv: np.ufunc
+obl_rad2: np.ufunc
+obl_rad2_cv: np.ufunc
+owens_t: np.ufunc
+pbdv: np.ufunc
+pbvv: np.ufunc
+pbwa: np.ufunc
+pdtr: np.ufunc
+pdtrc: np.ufunc
+pdtri: np.ufunc
+pdtrik: np.ufunc
+poch: np.ufunc
+powm1: np.ufunc
+pro_ang1: np.ufunc
+pro_ang1_cv: np.ufunc
+pro_cv: np.ufunc
+pro_rad1: np.ufunc
+pro_rad1_cv: np.ufunc
+pro_rad2: np.ufunc
+pro_rad2_cv: np.ufunc
+pseudo_huber: np.ufunc
+psi: np.ufunc
+radian: np.ufunc
+rel_entr: np.ufunc
+rgamma: np.ufunc
+round: np.ufunc
+shichi: np.ufunc
+sici: np.ufunc
+sindg: np.ufunc
+smirnov: np.ufunc
+smirnovi: np.ufunc
+spence: np.ufunc
+stdtr: np.ufunc
+stdtridf: np.ufunc
+stdtrit: np.ufunc
+struve: np.ufunc
+tandg: np.ufunc
+tklmbda: np.ufunc
+voigt_profile: np.ufunc
+wofz: np.ufunc
+wright_bessel: np.ufunc
+wrightomega: np.ufunc
+xlog1py: np.ufunc
+xlogy: np.ufunc
+y0: np.ufunc
+y1: np.ufunc
+yn: np.ufunc
+yv: np.ufunc
+yve: np.ufunc
+zetac: np.ufunc
+
diff --git a/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyx b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..77cdf192bde3d5e750307603c1c9d7c717f9b139
--- /dev/null
+++ b/.venv_haddock/lib/python3.12/site-packages/scipy/special/_ufuncs.pyx
@@ -0,0 +1,13240 @@
+# This file is automatically generated by _generate_pyx.py.
+# Do not edit manually!
+
+from libc.math cimport NAN
+
+include "_ufuncs_extra_code_common.pxi"
+include "_ufuncs_extra_code.pxi"
+__all__ = ['agm', 'bdtr', 'bdtrc', 'bdtri', 'bdtrik', 'bdtrin', 'betainc', 'betaincc', 'betainccinv', 'betaincinv', 'boxcox', 'boxcox1p', 'btdtria', 'btdtrib', 'chdtr', 'chdtrc', 'chdtri', 'chdtriv', 'chndtr', 'chndtridf', 'chndtrinc', 'chndtrix', 'elliprc', 'elliprd', 'elliprf', 'elliprg', 'elliprj', 'entr', 'erfcinv', 'erfinv', 'eval_chebyc', 'eval_chebys', 'eval_chebyt', 'eval_chebyu', 'eval_gegenbauer', 'eval_genlaguerre', 'eval_hermite', 'eval_hermitenorm', 'eval_jacobi', 'eval_laguerre', 'eval_legendre', 'eval_sh_chebyt', 'eval_sh_chebyu', 'eval_sh_jacobi', 'eval_sh_legendre', 'expn', 'fdtr', 'fdtrc', 'fdtri', 'fdtridfd', 'gdtr', 'gdtrc', 'gdtria', 'gdtrib', 'gdtrix', 'huber', 'hyp0f1', 'hyp1f1', 'hyperu', 'inv_boxcox', 'inv_boxcox1p', 'kl_div', 'kn', 'kolmogi', 'kolmogorov', 'lpmv', 'nbdtr', 'nbdtrc', 'nbdtri', 'nbdtrik', 'nbdtrin', 'ncfdtr', 'ncfdtri', 'ncfdtridfd', 'ncfdtridfn', 'ncfdtrinc', 'nctdtr', 'nctdtridf', 'nctdtrinc', 'nctdtrit', 'ndtri', 'ndtri_exp', 'nrdtrimn', 'nrdtrisd', 'owens_t', 'pdtr', 'pdtrc', 'pdtri', 'pdtrik', 'poch', 'powm1', 'pseudo_huber', 'rel_entr', 'round', 'shichi', 'sici', 'smirnov', 'smirnovi', 'spence', 'stdtr', 'stdtridf', 'stdtrit', 'tklmbda', 'wrightomega', 'yn', 'geterr', 'seterr', 'errstate', 'jn', 'airy', 'airye', 'bei', 'beip', 'ber', 'berp', 'binom', 'exp1', 'expi', 'expit', 'exprel', 'gamma', 'gammaln', 'hankel1', 'hankel1e', 'hankel2', 'hankel2e', 'hyp2f1', 'it2i0k0', 'it2j0y0', 'it2struve0', 'itairy', 'iti0k0', 'itj0y0', 'itmodstruve0', 'itstruve0', 'iv', 'ive', 'jv', 'jve', 'kei', 'keip', 'kelvin', 'ker', 'kerp', 'kv', 'kve', 'log_expit', 'log_wright_bessel', 'loggamma', 'logit', 'mathieu_a', 'mathieu_b', 'mathieu_cem', 'mathieu_modcem1', 'mathieu_modcem2', 'mathieu_modsem1', 'mathieu_modsem2', 'mathieu_sem', 'modfresnelm', 'modfresnelp', 'obl_ang1', 'obl_ang1_cv', 'obl_cv', 'obl_rad1', 'obl_rad1_cv', 'obl_rad2', 'obl_rad2_cv', 'pbdv', 'pbvv', 'pbwa', 'pro_ang1', 'pro_ang1_cv', 'pro_cv', 'pro_rad1', 'pro_rad1_cv', 'pro_rad2', 'pro_rad2_cv', 'psi', 'rgamma', 'wright_bessel', 'yv', 'yve', 'zetac', 'sindg', 'cosdg', 'tandg', 'cotdg', 'i0', 'i0e', 'i1', 'i1e', 'k0', 'k0e', 'k1', 'k1e', 'y0', 'y1', 'j0', 'j1', 'struve', 'modstruve', 'beta', 'betaln', 'besselpoly', 'gammaln', 'gammasgn', 'cbrt', 'radian', 'cosm1', 'gammainc', 'gammaincinv', 'gammaincc', 'gammainccinv', 'fresnel', 'ellipe', 'ellipeinc', 'ellipk', 'ellipkinc', 'ellipkm1', 'ellipj', 'erf', 'erfc', 'erfcx', 'erfi', 'voigt_profile', 'wofz', 'dawsn', 'ndtr', 'log_ndtr', 'exp2', 'exp10', 'expm1', 'log1p', 'xlogy', 'xlog1py']
+cdef void loop_D_DDDD__As_DDDD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *ip3 = args[3]
+ cdef char *op0 = args[4]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0], (ip3)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ ip3 += steps[3]
+ op0 += steps[4]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_DDDD__As_FFFF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *ip3 = args[3]
+ cdef char *op0 = args[4]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0], (ip3)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ ip3 += steps[3]
+ op0 += steps[4]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_DDD__As_DDD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_DDD__As_FFF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_DD__As_DD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_DD__As_FF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_D__As_D_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *op0 = args[1]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ op0 += steps[1]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_D__As_F_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *op0 = args[1]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ op0 += steps[1]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_dD__As_dD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_dD__As_fF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_ddD__As_ddD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_ddD__As_ffF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_dddD__As_dddD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *ip3 = args[3]
+ cdef char *op0 = args[4]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0], (ip3)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ ip3 += steps[3]
+ op0 += steps[4]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_D_dddD__As_fffF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *ip3 = args[3]
+ cdef char *op0 = args[4]
+ cdef double complex ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0], (ip3)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ ip3 += steps[3]
+ op0 += steps[4]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_d__As_d_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *op0 = args[1]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ op0 += steps[1]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_d__As_f_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *op0 = args[1]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ op0 += steps[1]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_dd__As_dd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_dd__As_ff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *op0 = args[2]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ op0 += steps[2]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_ddd__As_ddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_ddd__As_fff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (data)[1]
+ cdef char *ip0 = args[0]
+ cdef char *ip1 = args[1]
+ cdef char *ip2 = args[2]
+ cdef char *op0 = args[3]
+ cdef double ov0
+ for i in range(n):
+ ov0 = (func)((ip0)[0], (ip1)[0], (ip2)[0])
+ (op0)[0] = ov0
+ ip0 += steps[0]
+ ip1 += steps[1]
+ ip2 += steps[2]
+ op0 += steps[3]
+ sf_error.check_fpe(func_name)
+
+cdef void loop_d_dddd__As_dddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) noexcept nogil:
+ cdef np.npy_intp i, n = dims[0]
+ cdef void *func = (data)[0]
+ cdef char *func_name = (