U
    md                     @   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
rddlmZ n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 r|  |  }d|d   }|| }|| krl|S ||k rx|}|d9 }|| kr4|S q4||k r|}|d9 }|| kr(|S q(||k r|}|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quotientp2N r   Q/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/statsmodels/compat/scipy.py_next_regular   s6    	r   c                 C   s>   t j| td| }|dk	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   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   
-