← Back
Editing: _interpolative_backend.cpython-311.pyc
� d�c�� � � � d Z ddlmc mZ ddlZ ed� � Zd� Z d� Z d� Zd� Zd� Z d � Zd � Zd� Zd� Zd � Zd� Zd� Zd� Zd� Zd;d�Zd;d�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d� Z"d� Z#d � Z$d!� Z%d"� Z&d#� Z'd$� Z(d%� Z)d&� Z*d'� Z+d(� Z,d)� Z-d*� Z.d+� Z/d;d,�Z0d;d-�Z1d.� Z2d/� Z3d0� Z4d1� Z5d2� Z6d3� Z7d4� Z8d5� Z9d6� Z:d7� Z;d8� Z<d9� Z=d:� Z>dS )<z0 Direct wrappers for Fortran `id_dist` backend. � Nznonzero return codec � � t j | � � } | j j r| � d�� � } nt j | � � } | S )z6 Same as np.asfortranarray, but ensure a copy �F��order)�np�asarray�flags�f_contiguous�copy�asfortranarray)�As �E/usr/lib/python3/dist-packages/scipy/linalg/_interpolative_backend.py�_asfortranarray_copyr ( sH � � � �1� � �A��w�� !� �F�F��F�������a� � ���H� c �* � t j | � � S )a Generate standard uniform pseudorandom numbers via a very efficient lagged Fibonacci method. :param n: Number of pseudorandom numbers to generate. :type n: int :return: Pseudorandom numbers. :rtype: :class:`numpy.ndarray` )�_id�id_srand)�ns r r r 8 s � � �<��?�?�r c �V � t j | � � } t j | � � dS )z� Initialize seed values for :func:`id_srand` (any appropriately random numbers will do). :param t: Array of 55 seed values. :type t: :class:`numpy.ndarray` N)r r r � id_srandi)�ts r r r H s* � � ��!���A��M�!�����r c �, � t j � � dS )z5 Reset seed values to their original values. N)r � id_srando� r r r r U s � � �M�O�O�O�O�Or c �. � t j | ||� � S )a| Transform real vector via a composition of Rokhlin's random transform, random subselection, and an FFT. In contrast to :func:`idd_sfrm`, this routine works best when the length of the transformed vector is the power-of-two integer output by :func:`idd_frmi`, or when the length is not specified but instead determined a posteriori from the output. The returned transformed vector is randomly permuted. :param n: Greatest power-of-two integer satisfying `n <= x.size` as obtained from :func:`idd_frmi`; `n` is also the length of the output vector. :type n: int :param w: Initialization array constructed by :func:`idd_frmi`. :type w: :class:`numpy.ndarray` :param x: Vector to be transformed. :type x: :class:`numpy.ndarray` :return: Transformed vector. :rtype: :class:`numpy.ndarray` )r �idd_frm�r �w�xs r r r ` � � �4 �;�q�!�Q���r c �0 � t j | |||� � S )a� Transform real vector via a composition of Rokhlin's random transform, random subselection, and an FFT. In contrast to :func:`idd_frm`, this routine works best when the length of the transformed vector is known a priori. :param l: Length of transformed vector, satisfying `l <= n`. :type l: int :param n: Greatest power-of-two integer satisfying `n <= x.size` as obtained from :func:`idd_sfrmi`. :type n: int :param w: Initialization array constructed by :func:`idd_sfrmi`. :type w: :class:`numpy.ndarray` :param x: Vector to be transformed. :type x: :class:`numpy.ndarray` :return: Transformed vector. :rtype: :class:`numpy.ndarray` )r �idd_sfrm��lr r r s r r"