

'''simple docstring'''

import warnings
from collections.abc import Callable
from typing import Any

import numpy
from matplotlib import pyplot

UpperCAmelCase							=					0.25 + 0.0j
UpperCAmelCase							=					-0.4 + 0.6j
UpperCAmelCase							=					-0.1 + 0.651j
UpperCAmelCase							=					-2.0
UpperCAmelCase							=					56
UpperCAmelCase							=					2.0
UpperCAmelCase							=					666

def 			__UpperCamelCase							(		lowercase__  :					complex,   lowercase__  :					numpy.ndarray	):






     '''simple docstring'''





     return numpy.exp(lowercase__	) + c_parameter

def 			__UpperCamelCase							(		lowercase__  :					complex,   lowercase__  :					numpy.ndarray	):






     '''simple docstring'''





     return z_values * z_values + c_parameter

def 			__UpperCamelCase							(		lowercase__  :					float,   lowercase__  :					int	):






     '''simple docstring'''





     __lowercase     						=numpy.linspace(-window_size,   lowercase__,   lowercase__	)
     __lowercase     						=x.reshape((nb_pixels, 1)	)
     __lowercase     						=numpy.linspace(-window_size,   lowercase__,   lowercase__	)
     __lowercase     						=y.reshape((1, nb_pixels)	)
     return x + 1.0J * y

def 			__UpperCamelCase							(		lowercase__  :					Callable[[Any, numpy.ndarray], numpy.ndarray],   lowercase__  :					Any,   lowercase__  :					int,   lowercase__  :					numpy.ndarray,   lowercase__  :					float | None = None,   ):






     '''simple docstring'''





     __lowercase     						=z_a.astype('complex64'	)
     for _ in range(lowercase__	):
          __lowercase     						=eval_function(lowercase__,   lowercase__	)
          if infinity is not None:
               numpy.nan_to_num(lowercase__,   copy=lowercase__,   nan=lowercase__	)
               __lowercase     						=infinity
     return z_n

def 			__UpperCamelCase							(		lowercase__  :					str,   lowercase__  :					Any,   lowercase__  :					float,   lowercase__  :					numpy.ndarray,   ):






     '''simple docstring'''





     __lowercase     						=(abs(lowercase__	)).transpose()
     __lowercase     						=abs_z_final[::-1, :]
     pyplot.matshow(abs_z_final < escape_radius	)
     pyplot.title(F'''Julia set of ${function_label}$, $c={function_params}$'''	)
     pyplot.show()

def 			__UpperCamelCase							(		):






     '''simple docstring'''





     warnings.filterwarnings(
         'ignore',   category=lowercase__,   message='overflow encountered in multiply'	)
     warnings.filterwarnings(
         'ignore',   category=lowercase__,   message='invalid value encountered in multiply',   )
     warnings.filterwarnings(
         'ignore',   category=lowercase__,   message='overflow encountered in absolute'	)
     warnings.filterwarnings(
         'ignore',   category=lowercase__,   message='overflow encountered in exp'	)


if __name__ == "__main__":
       UpperCAmelCase							=					prepare_grid(window_size, nb_pixels)

       ignore_overflow_warnings()  # See file header for explanations

       UpperCAmelCase							=					24
       UpperCAmelCase							=					2 * abs(c_cauliflower) + 1
       UpperCAmelCase							=					iterate_function(
           eval_quadratic_polynomial,
           c_cauliflower,
           nb_iterations,
           z_a,
           infinity=1.1 * escape_radius,
       )
       show_results('''z^2+c''', c_cauliflower, escape_radius, z_final)

       UpperCAmelCase							=					64
       UpperCAmelCase							=					2 * abs(c_polynomial_a) + 1
       UpperCAmelCase							=					iterate_function(
           eval_quadratic_polynomial,
           c_polynomial_a,
           nb_iterations,
           z_a,
           infinity=1.1 * escape_radius,
       )
       show_results('''z^2+c''', c_polynomial_a, escape_radius, z_final)

       UpperCAmelCase							=					161
       UpperCAmelCase							=					2 * abs(c_polynomial_a) + 1
       UpperCAmelCase							=					iterate_function(
           eval_quadratic_polynomial,
           c_polynomial_a,
           nb_iterations,
           z_a,
           infinity=1.1 * escape_radius,
       )
       show_results('''z^2+c''', c_polynomial_a, escape_radius, z_final)

       UpperCAmelCase							=					12
       UpperCAmelCase							=					10000.0
       UpperCAmelCase							=					iterate_function(
           eval_exponential,
           c_exponential,
           nb_iterations,
           z_a + 2,
           infinity=1.0E1_0,
       )
       show_results('''e^z+c''', c_exponential, escape_radius, z_final)





'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCAmelCase							=					{
    '''configuration_videomae''': ['''VIDEOMAE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VideoMAEConfig'''],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase							=					[
           '''VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''VideoMAEForPreTraining''',
           '''VideoMAEModel''',
           '''VideoMAEPreTrainedModel''',
           '''VideoMAEForVideoClassification''',
       ]

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase							=					['''VideoMAEFeatureExtractor''']
       UpperCAmelCase							=					['''VideoMAEImageProcessor''']

if TYPE_CHECKING:
       from .configuration_videomae import VIDEOMAE_PRETRAINED_CONFIG_ARCHIVE_MAP, VideoMAEConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_videomae import (
                  VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST,
                  VideoMAEForPreTraining,
                  VideoMAEForVideoClassification,
                  VideoMAEModel,
                  VideoMAEPreTrainedModel,
              )

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_videomae import VideoMAEFeatureExtractor
              from .image_processing_videomae import VideoMAEImageProcessor

else:
       import sys

       UpperCAmelCase							=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


