관리-도구
편집 파일: test_polyutils.cpython-311.pyc
� �܋f� � �p � d Z ddlZddlmc mZ ddlmZm Z m Z mZ G d� d� � Z G d� d� � Z dS )zTests for polyutils module. � N)�assert_almost_equal� assert_raises�assert_equal�assert_c �2 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�TestMiscc � � t d� � D ]1}dg}t j dgdgdz z � � }t ||� � �2d S )N� � r )�range�pu�trimseqr )�self�i�tgt�ress �x/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/polynomial/tests/test_polyutils.py�test_trimseqzTestMisc.test_trimseq sV � ��q��� #� #�A��#�C��*�a�S�A�3�q�5�[�)�)�C���c�"�"�"�"� #� #� c �t � t t t j g g� � t t t j ddggg� � t t t j dgdgg� � g d�}t t |� � � � D ]�}t |� � D ]�}t j d|| � � }t j d|| � � }t j ||g� � \ }}t |j j |j j k � � t |j j || k � � ����d S )Nr � �a)r �d�O)r � ValueErrorr � as_seriesr �len�np�onesr �dtype�char)r �typesr �j�ci�cj�resi�resjs r �test_as_serieszTestMisc.test_as_series s � ��j�"�,���5�5�5��j�"�,�1�a�&�� �;�;�;��j�"�,�!��s�e��=�=�=������s�5�z�z�"�"� 5� 5�A��1�X�X� 5� 5���W�Q��a��)�)���W�Q��a��)�)��!�|�R��H�5�5���t��� ��4�:�?�:�;�;�;��� ��5��8�3�4�4�4�4� 5� 5� 5r c �B � g d�}t t t j |d� � t t j |� � |d d� � � t t j |d� � |d d� � � t t j |d� � dg� � d S )N)r ���r r r* r ���r r )r r r �trimcoefr )r �coefs r � test_trimcoefzTestMisc.test_trimcoef"