← Back
Editing: _polyint.cpython-311.pyc
� d�c�e � �� � d dl Z d dlZd dlmZ d dlmZmZ g d�Zd� Z G d� d� � Z G d� d e � � Z G d � de� � Zdd�Z dd �Z G d� de � � Zdd�ZdS )� N)� factorial)�_asarray_validated�float_factorial)�KroghInterpolator�krogh_interpolate�BarycentricInterpolator�barycentric_interpolate�approximate_taylor_polynomialc �` � t j | � � pt | d� � o | j dk S )z-Check whether x is if a scalar type, or 0-dim�shape� )�np�isscalar�hasattrr )�xs �</usr/lib/python3/dist-packages/scipy/interpolate/_polyint.py� _isscalarr s* � � �;�q�>�>�B�W�Q��0�0�B�Q�W��]�B� c �N � e Zd ZdZdZd d�Zd� Zd� Zd� Zd� Z dd �Z dd�Zdd�ZdS )�_Interpolator1Da Common features in univariate interpolation Deal with input data type and interpolation axis rolling. The actual interpolator can assume the y-data is of shape (n, r) where `n` is the number of x-points, and `r` the number of variables, and use self.dtype as the y-data type. Attributes ---------- _y_axis Axis along which the interpolation goes in the original array _y_extra_shape Additional trailing shape of the input arrays, excluding the interpolation axis. dtype Dtype of the y-data arrays. Can be set via _set_dtype, which forces it to be float or complex. Methods ------- __call__ _prepare_x _finish_y _reshape_yi _set_yi _set_dtype _evaluate )�_y_axis�_y_extra_shape�dtypeNc �h � || _ d | _ d | _ |�| � |||�� � d S d S )N��xi�axis)r r r �_set_yi)�selfr �yir s r �__init__z_Interpolator1D.__init__3 sB � ����"����� � �>��L�L����L�.�.�.�.�.� �>r c � � | � |� � \ }}| � |� � }| � ||� � S )a� Evaluate the interpolant Parameters ---------- x : array_like Points to evaluate the interpolant at. Returns ------- y : array_like Interpolated values. Shape is determined by replacing the interpolation axis in the original array with the shape of x. Notes ----- Input values `x` must be convertible to `float` values like `int` or `float`. )� _prepare_x� _evaluate� _finish_y)r r �x_shape�ys r �__call__z_Interpolator1D.__call__: s>