
    J-jG                        d Z ddlZddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddl	mZ ddlmZ ddlmZmZmZ ddlmZ  G d de      Zerd Zej<                  Zddk  r	 ddl mZm!Z"m#Z$ ddZ%d Z&ddZ'y# e$ r dZ ej                  d       Y w xY w#  ddgz  \  ZZ"Z ej                  d       Y KxY w)a/  versatile shortcuts for quick typing in an (i)python shell,

 or even using ``from cma.s import *`` in interactive sessions.

Provides various aliases from within the `cma` package, to be reached like
``cma.s....``

Do not use this module for stable code developments!

This is not actively maintained.
    N)pyplotzRCould not import matplotlib.pyplot, therefore ``cma.plot()`` etc. is not available   )evolution_strategy)fitness_transformations)transformations)constraints_handler)utils)CMAEvolutionStrategy)pprint)Mhtestchisquaretestranksum)figurec                        e Zd Z fdZ xZS )CMAESc                 `    t        j                  dt               t        t        |   |i | y )Nz<Deprecated (renamed). Use `cma.CMA` instead of `cma.s.CMAES`)	_warningswarnFutureWarningsuperr   __init__)selfargskwargs	__class__s      S/Users/jameslopez/projects/TradingBot25/.venv/lib/python3.12/site-packages/cma/s.pyr   zCMAES.__init__   s)    U$	&eT#T4V4    )__name__
__module____qualname__r   __classcell__)r   s   @r   r   r      s    5 5r   r   c                  T    t        j                          t        j                          y)z.`pyplot.show` to make a plotted figure show upN)_pyplotionshow r   r   figshowr'   %   s     	r         )savefigcloser$   znot availablec                     | j                   j                         D ci c]   }|d   j                  |      r|d   |d   " c}S c c}w )zrreturn public attributes of `obj` as a `dict`.

    Pass '__' as second argument to see "private" attributes.
    r   r   )__dict__items
startswithobjexcludeds      r   _cdictr4   7   sF    
  #||113T3!1Q4??7;SAaD1I3TTTs
   AAc                  L    t        j                  dt               t        | i |S )zDeprecated, renamed to `ddir`z3Deprecated (renamed). Use `ddir` instead of `clean`)r   r   r   ddir)r   r   s     r   cleanr7   =   s!    NNH-X   r   c                     t        | t        t        f      r"| D cg c]  }|j                  |      r| c}S t	        | |      S c c}w )aR  return "public" elements of a `list` or `dict` or of ``object.__dict__``.

    Ignore entries starting with `exclude`. Return a 'list` when `obj`
    is a `list` or a `dict`, return a `dict` otherwise. This is versatile
    and could change in future.

    Typical usage: ``clean(dir())`` or ``clean(obj)`` or ``clean(dir(), '__')``.
    )r2   )
isinstancelistdictr/   r4   r0   s      r   r6   r6   A   sD     #d|$<3aall7&;3<<#w'' =s
   AA)_)(__doc__warningsr   
matplotlibr   r#   ImportErrorr    r   esr   ftr   tfr   ch	utilitiesr	   r
   _CMAESutilities.utilsr   utilities.mathr   r   r   r   r   r'   r*   figsavematplotlib.pyplotr+   figcloser$   figionr4   r7   r6   r&   r   r   <module>rN      s   
 - ' + # '  > # : : #5F 5  ooG61ZZU!(g  <GINN ; <<H1%&/):%:"7	 0 	1s   A? )
B ?BBB>