← Back
Editing: test_minpack.cpython-311.pyc
� d�c�� � � � d Z ddlZddlZddlmZmZmZmZmZm Z m Z ddlmZ ddl Zddl mZmZ ddlmZ ddlmZmZ ddlmZ dd lmZmZmZ dd lmZ ddlmZ G d� d � � Z d� Z!d� Z"d� Z#d� Z$d� Z% G d� d� � Z& G d� d� � Z' G d� d� � Z( G d� d� � Z) G d� d� � Z* G d� d� � Z+dS )z7 Unit tests for optimization routines from minpack.py. � N)�assert_�assert_almost_equal�assert_array_equal�assert_array_almost_equal�assert_allclose�assert_warns�suppress_warnings)�raises)�array�float64)� ThreadPool)�optimize�linalg)�lambertw)�leastsq� curve_fit�fixed_point)�OptimizeWarning)�Boundsc � � e Zd ZdZd� Zd� ZdS )�ReturnShapez�This class exists to create a callable that does not have a '__name__' attribute. __init__ takes the argument 'shape', which should be a tuple of ints. When an instance is called with a single argument 'x', it returns numpy.ones(shape). c � � || _ d S �N)�shape)�selfr s �C/usr/lib/python3/dist-packages/scipy/optimize/tests/test_minpack.py�__init__zReturnShape.__init__ s � ��� � � � c �4 � t j | j � � S r )�np�onesr )r �xs r �__call__zReturnShape.__call__ s � ��w�t�z�"�"�"r N)�__name__� __module__�__qualname__�__doc__r r# � r r r r s<