← Back
Editing: _fitpack_impl.cpython-311.pyc
� d�cض � � � d Z g d�ZddlZddlZddlmZ ddlmZmZm Z m Z mZmZm Z mZmZmZ ddlmZ ej j j Zd,d�Zd dgd dgddgdegd egdegdegdegd�Zd dgd dgddgddgdegdegdegdegdegdegdegdegd�Z eg e� � eg e� � eg e� � eg e� � ddd�Z d-d�Z eg e� � eg e� � eg e� � d�Z d.d�Zd/d�Z d0d �Z!d1d"�Z"d#� Z# eg e� � eg e� � eg e� � eg e� � d$�Z$ d2d&�Z%d/d'�Z&d(� Z'd3d)�Z(d4d*�Z)d4d+�Z*dS )5an fitpack (dierckx in netlib) --- A Python-C wrapper to FITPACK (by P. Dierckx). FITPACK is a collection of FORTRAN programs for curve and surface fitting with splines and tensor product splines. See https://web.archive.org/web/20010524124604/http://www.cs.kuleuven.ac.be:80/cwis/research/nalag/research/topics/fitpack.html or http://www.netlib.org/dierckx/ Copyright 2002 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the SciPy (BSD style) license. See LICENSE.txt that came with this distribution for specifics. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. TODO: Make interfaces to the following fitpack functions: For univariate splines: cocosp, concon, fourco, insert For bivariate splines: profil, regrid, parsur, surev )�splrep�splprep�splev�splint�sproot�spalde�bisplrep�bisplev�insert�splder� splantider� N� )�_fitpack) � atleast_1d�array�ones�zeros�sqrt�ravel� transpose�empty�iinfo�asarray)�dfitpackc � � | t t � � j k r|�| �dt ��}t |� � �t � | � � S )z^Cast the value to an dfitpack_int and raise an OverflowError if the value cannot fit. Nz cannot fit into an )r �dfitpack_int�max� OverflowError�type)�x�msgs �A/usr/lib/python3/dist-packages/scipy/interpolate/_fitpack_impl.py� _int_overflowr# ) sQ � � �5����"�"�"��;�01���<�<�@�C��C� � � ����Q���� zHThe spline has a residual sum of squares fp such that abs(fp-s)/s<=0.001z,The spline is an interpolating spline (fp=0)ztThe spline is weighted least-squares polynomial of degree k. fp gives the upper bound fp0 for the smoothing factor sz�The required storage space exceeds the available storage space. Probable causes: data (x,y) size is too small or smoothing parameter s is too small (fp>s).zA theoretically impossible result when finding a smoothing spline with fp = s. Probable cause: s too small. (abs(fp-s)/s>0.001)z�The maximal number of iterations (20) allowed for finding smoothing spline with fp=s has been reached. Probable cause: s too small. (abs(fp-s)/s>0.001)zError on input data�An error occurred)r ������r � � � �unknownz|The spline is weighted least-squares polynomial of degree kx and ky. fp gives the upper bound fp0 for the smoothing factor sz�Warning. The coefficients of the spline have been computed as the minimal norm least-squares solution of a rank deficient system.z�The required storage space exceeds the available storage space. Probable causes: nxest or nyest too small or s is too small. (fp>s)z�A theoretically impossible result when finding a smoothing spline with fp = s. Probable causes: s too small or badly chosen eps. (abs(fp-s)/s>0.001)z�No more knots can be added because the number of B-spline coefficients already exceeds the number of data points m. Probable causes: either s or m too small. (fp>s)z�No more knots can be added because the additional knot would coincide with an old one. Probable cause: s too small or too large a weight to an inaccurate data point. (fp>s)z�rwrk2 too small, i.e., there is not enough workspace for computing the minimal least-squares solution of a rank deficient system of linear equations.)r r&