o
    0Gf                     @   s   d dl mZmZ d dlZd dlZeejZeedk Ze Z	eedk Z
eedk Zeedk Zdd Zejdfd	d
Ze
rFddlmZ dS d dlmZ dS )    )VersionparseNz1.4.99z1.5.99z1.6.99z1.8.99c                 C   s   | dkr| S | | d @ s| S t d}d}|| k r^|}|| k rJ|  |  }d|d   }|| }|| kr6|S ||k r<|}|d9 }|| krF|S || k s||k rP|}|d9 }|| krZ|S || k s||k rd|}|S )a!  
    Find the next regular number greater than or equal to target.
    Regular numbers are composites of the prime factors 2, 3, and 5.
    Also known as 5-smooth numbers or Hamming numbers, these are the optimal
    size for inputs to FFTPACK.

    Target must be a positive integer.
          inf         )float
bit_length)targetmatchZp5Zp35ZquotientZp2N r   8lib/python3.10/site-packages/statsmodels/compat/scipy.py_next_regular   s:   	r   c                 C   s>   t j| td| }|dur||}t|t jst |}|S )zReturn an array of all value.)ZdtypeN)npZonesboolZastype
isinstanceZndarrayZasarray)shapevaluetypecodeoutr   r   r   	_valarray;   s   

r   r   )multivariate_t)Zpackaging.versionr   r   Znumpyr   Zscipy__version__Z
SP_VERSIONZSP_LT_15ZSCIPY_GT_14ZSP_LT_16ZSP_LT_17ZSP_LT_19r   nanr   Z_scipy_multivariate_tr   Zscipy.statsr   r   r   r   <module>   s    
-