| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/scipy/integrate/_ivp/__pycache__/ |
Upload File : |
�
d�c�9 � �� � d dl mZ d dlmZ d dlZd dlmZmZ ej e
� � j Zd� Z
d� Zd� Zd� Zd � Zd
� Z G d� d� � Zed
z Zedz Zedz Zdez ZdZdZdd�Zd� Zd� ZdS )� )�groupby)�warnN)�find�
coo_matrixc � � | dk rt d� � �| t j ||z
� � k rt d� � �| S )z.Assert that first_step is valid and return it.r z`first_step` must be positive.z`first_step` exceeds bounds.)�
ValueError�np�abs)�
first_step�t0�t_bounds �=/usr/lib/python3/dist-packages/scipy/integrate/_ivp/common.py�validate_first_stepr
sH � ��Q����9�:�:�:��B�F�7�R�<�(�(�(�(��7�8�8�8��� c �0 � | dk rt d� � �| S )z,Assert that max_Step is valid and return it.r z`max_step` must be positive.)r )�max_steps r �validate_max_stepr s � ��1�}�}��7�8�8�8��Or c � � | rAt d� d� d� | D � � � � � � � � dS dS )ae Display a warning for extraneous keyword arguments.
The initializer of each solver class is expected to collect keyword
arguments that it doesn't understand and warn about them. This function
prints a warning for each key in the supplied dictionary.
Parameters
----------
extraneous : dict
Extraneous keyword arguments
z?The following arguments have no effect for a chosen solver: {}.z, c 3 �@ K � | ]}d � |� � V � �dS )z`{}`N)�format)�.0�xs r � <genexpr>z"warn_extraneous.<locals>.<genexpr>( s. � � � �D�D�A�v�}�}�Q�/�/�D�D�D�D�D�Dr N)r r �join)�
extraneouss r �warn_extraneousr se � � � G��
N��f�T�Y�Y�D�D��D�D�D�D�D�E�E� G� G� G� G� G�G� Gr c �| � t j | dt z k � � r8t ddt z � d�� � t j | dt z � � } t j |� � }|j dk r|j |fk rt d� � �t j |dk � � rt d� � �| |fS )zValidate tolerance values.�d zNAt least one element of `rtol` is too small. Setting `rtol = np.maximum(rtol, z)`.r z`atol` has wrong shape.z`atol` must be positive.) r �any�EPSr �maximum�asarray�ndim�shaper )�rtol�atol�ns r �validate_tolr( + s� � �
�v�d�S�3�Y���� +�� @�14�s��@� @� @� A� A� A��z�$��c� �*�*��
�:�d���D��y�1�}�}����t�+�+��2�3�3�3� �v�d�Q�h��� 5��3�4�4�4���:�r c �V � t j � | � � | j dz z S )zCompute RMS norm.� �?)r �linalg�norm�size)r s r r, r, = s! � �
�9�>�>�!���q�v��}�,�,r c �� � |j dk rt j S |t j |� � |z z }t ||z � � } t ||z � � }
| dk s|
dk rd}nd| z |
z }|||z |z z } | |||z z |� � }
t |
|z
|z � � |z }|
dk r|dk rt d|dz � � }ndt |
|� � z d|dz z z }t
d|z |� � S ) a� Empirically select a good initial step.
The algorithm is described in [1]_.
Parameters
----------
fun : callable
Right-hand side of the system.
t0 : float
Initial value of the independent variable.
y0 : ndarray, shape (n,)
Initial value of the dependent variable.
f0 : ndarray, shape (n,)
Initial value of the derivative, i.e., ``fun(t0, y0)``.
direction : float
Integration direction.
order : float
Error estimator order. It means that the error controlled by the
algorithm is proportional to ``step_size ** (order + 1)`.
rtol : float
Desired relative tolerance.
atol : float
Desired absolute tolerance.
Returns
-------
h_abs : float
Absolute value of the suggested initial step.
References
----------
.. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
Equations I: Nonstiff Problems", Sec. II.4.
r g�h㈵��>g���ư>g{�G�z�?gV瞯�<g����MbP?� r )r- r �infr
r, �max�min)�funr �y0�f0� direction�orderr% r&