






import inspect
import unittest

from transformers import is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, require_vision, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch

 from transformers import MODEL_MAPPING, GLPNConfig, GLPNForDepthEstimation, GLPNModel
 from transformers.models.glpn.modeling_glpn import GLPN_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
 from PIL import Image

 from transformers import GLPNImageProcessor







class       UpperCAmelCase_						( lowercase			):



      """simple docstring"""
      def    UpperCAmelCase						(    self			)    ->				List[str]:
          UpperCamelCase	:List[str]     							=       self.config_class(**self.inputs_dict			)
          self.parent.assertTrue(hasattr(SCREAMING_SNAKE_CASE_   ,    '''hidden_sizes'''			)			)
          self.parent.assertTrue(hasattr(SCREAMING_SNAKE_CASE_   ,    '''num_attention_heads'''			)			)
          self.parent.assertTrue(hasattr(SCREAMING_SNAKE_CASE_   ,    '''num_encoder_blocks'''			)			)







class       UpperCAmelCase_						:



      """simple docstring"""
      def __init__(    self   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_=13   ,    SCREAMING_SNAKE_CASE_=64   ,    SCREAMING_SNAKE_CASE_=3   ,    SCREAMING_SNAKE_CASE_=4   ,    SCREAMING_SNAKE_CASE_=[2, 2, 2, 2]   ,    SCREAMING_SNAKE_CASE_=[8, 4, 2, 1]   ,    SCREAMING_SNAKE_CASE_=[16, 32, 64, 128]   ,    SCREAMING_SNAKE_CASE_=[1, 4, 8, 16]   ,    SCREAMING_SNAKE_CASE_=[1, 2, 4, 8]   ,    SCREAMING_SNAKE_CASE_=True   ,    SCREAMING_SNAKE_CASE_=True   ,    SCREAMING_SNAKE_CASE_="gelu"   ,    SCREAMING_SNAKE_CASE_=0.1   ,    SCREAMING_SNAKE_CASE_=0.1   ,    SCREAMING_SNAKE_CASE_=0.02   ,    SCREAMING_SNAKE_CASE_=16   ,    SCREAMING_SNAKE_CASE_=3   ,    SCREAMING_SNAKE_CASE_=None   ,    )    ->				Optional[int]:
          UpperCamelCase	:Tuple     							=       parent
          UpperCamelCase	:Dict     							=       batch_size
          UpperCamelCase	:str     							=       image_size
          UpperCamelCase	:List[str]     							=       num_channels
          UpperCamelCase	:int     							=       num_encoder_blocks
          UpperCamelCase	:Any     							=       sr_ratios
          UpperCamelCase	:Optional[Any]     							=       depths
          UpperCamelCase	:Optional[int]     							=       hidden_sizes
          UpperCamelCase	:Union[str, Any]     							=       downsampling_rates
          UpperCamelCase	:Optional[Any]     							=       num_attention_heads
          UpperCamelCase	:Optional[int]     							=       is_training
          UpperCamelCase	:int     							=       use_labels
          UpperCamelCase	:str     							=       hidden_act
          UpperCamelCase	:Dict     							=       hidden_dropout_prob
          UpperCamelCase	:List[Any]     							=       attention_probs_dropout_prob
          UpperCamelCase	:List[str]     							=       initializer_range
          UpperCamelCase	:Dict     							=       decoder_hidden_size
          UpperCamelCase	:int     							=       num_labels
          UpperCamelCase	:Tuple     							=       scope
      def    UpperCAmelCase						(    self			)    ->				List[str]:
          UpperCamelCase	:Optional[Any]     							=       floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]			)

          UpperCamelCase	:Dict     							=       None
          if self.use_labels:
              UpperCamelCase	:int     							=       ids_tensor([self.batch_size, self.image_size, self.image_size]   ,    self.num_labels			)

          UpperCamelCase	:List[Any]     							=       self.get_config()
          return config, pixel_values, labels
      def    UpperCAmelCase						(    self			)    ->				int:
          return GLPNConfig(
              image_size=self.image_size   ,    num_channels=self.num_channels   ,    num_encoder_blocks=self.num_encoder_blocks   ,    depths=self.depths   ,    hidden_sizes=self.hidden_sizes   ,    num_attention_heads=self.num_attention_heads   ,    hidden_act=self.hidden_act   ,    hidden_dropout_prob=self.hidden_dropout_prob   ,    attention_probs_dropout_prob=self.attention_probs_dropout_prob   ,    initializer_range=self.initializer_range   ,    decoder_hidden_size=self.decoder_hidden_size   ,    )
      def    UpperCAmelCase						(    self   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)    ->				Optional[int]:
          UpperCamelCase	:Optional[Any]     							=       GLPNModel(config=SCREAMING_SNAKE_CASE_			)
          model.to(SCREAMING_SNAKE_CASE_			)
          model.eval()
          UpperCamelCase	:Optional[int]     							=       model(SCREAMING_SNAKE_CASE_			)
          UpperCamelCase	:List[Any]     							=       self.image_size // (self.downsampling_rates[-1] * 2)
          self.parent.assertEqual(
              result.last_hidden_state.shape   ,    (self.batch_size, self.hidden_sizes[-1], expected_height, expected_width)			)
      def    UpperCAmelCase						(    self   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)    ->				Union[str, Any]:
          UpperCamelCase	:Optional[Any]     							=       self.num_labels
          UpperCamelCase	:int     							=       GLPNForDepthEstimation(SCREAMING_SNAKE_CASE_			)
          model.to(SCREAMING_SNAKE_CASE_			)
          model.eval()
          UpperCamelCase	:str     							=       model(SCREAMING_SNAKE_CASE_			)
          self.parent.assertEqual(result.predicted_depth.shape   ,    (self.batch_size, self.image_size, self.image_size)			)
          UpperCamelCase	:Tuple     							=       model(SCREAMING_SNAKE_CASE_   ,    labels=SCREAMING_SNAKE_CASE_			)
          self.parent.assertEqual(result.predicted_depth.shape   ,    (self.batch_size, self.image_size, self.image_size)			)




      def    UpperCAmelCase						(    self			)    ->				Optional[int]:
          UpperCamelCase	:Dict     							=       self.prepare_config_and_inputs()
          UpperCamelCase							,       UpperCamelCase							,       UpperCamelCase	:Union[str, Any]     							=       config_and_inputs
          UpperCamelCase	:Union[str, Any]     							=       {'''pixel_values''': pixel_values}
          return config, inputs_dict







@require_torch
class       UpperCAmelCase_						( lowercase,     lowercase,     unittest.TestCase			):



      """simple docstring"""
      UpperCamelCase_    : Dict									=(GLPNModel, GLPNForDepthEstimation) if is_torch_available() else ()
      UpperCamelCase_    : int									=(
          {'depth-estimation': GLPNForDepthEstimation, 'feature-extraction': GLPNModel} if is_torch_available() else {}
      )

      UpperCamelCase_    : List[str]									=False
      UpperCamelCase_    : Dict									=False
      UpperCamelCase_    : Union[str, Any]									=False
      def    UpperCAmelCase						(    self			)    ->				Dict:
          UpperCamelCase	:Tuple     							=       GLPNModelTester(self			)
          UpperCamelCase	:Optional[int]     							=       GLPNConfigTester(self   ,    config_class=SCREAMING_SNAKE_CASE_			)
      def    UpperCAmelCase						(    self			)    ->				int:
          self.config_tester.run_common_tests()
      def    UpperCAmelCase						(    self			)    ->				Union[str, Any]:
          UpperCamelCase	:List[Any]     							=       self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*SCREAMING_SNAKE_CASE_			)
      def    UpperCAmelCase						(    self			)    ->				Tuple:
          UpperCamelCase	:Optional[Any]     							=       self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_depth_estimation(*SCREAMING_SNAKE_CASE_			)
      @unittest.skip('''GLPN does not use inputs_embeds'''			)
      def    UpperCAmelCase						(    self			)    ->				Tuple:
          pass
      @unittest.skip('''GLPN does not have get_input_embeddings method and get_output_embeddings methods'''			)
      def    UpperCAmelCase						(    self			)    ->				Optional[int]:
          pass
      def    UpperCAmelCase						(    self			)    ->				Optional[Any]:
          UpperCamelCase							,       UpperCamelCase	:Optional[Any]     							=       self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
              UpperCamelCase	:Tuple     							=       model_class(SCREAMING_SNAKE_CASE_			)
              UpperCamelCase	:str     							=       inspect.signature(model.forward			)
              # signature.parameters is an OrderedDict => so arg_names order is deterministic
              UpperCamelCase	:int     							=       [*signature.parameters.keys()]

              UpperCamelCase	:Optional[int]     							=       ['''pixel_values''']
              self.assertListEqual(arg_names[:1]   ,    SCREAMING_SNAKE_CASE_			)
      def    UpperCAmelCase						(    self			)    ->				Union[str, Any]:
          UpperCamelCase							,       UpperCamelCase	:int     							=       self.model_tester.prepare_config_and_inputs_for_common()
          UpperCamelCase	:List[str]     							=       True

          for model_class in self.all_model_classes:
              UpperCamelCase	:List[Any]     							=       True
              UpperCamelCase	:Dict     							=       False
              UpperCamelCase	:int     							=       True
              UpperCamelCase	:List[Any]     							=       model_class(SCREAMING_SNAKE_CASE_			)
              model.to(SCREAMING_SNAKE_CASE_			)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase	:Union[str, Any]     							=       model(**self._prepare_for_class(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)			)
              UpperCamelCase	:Any     							=       outputs.attentions

              UpperCamelCase	:Any     							=       sum(self.model_tester.depths			)
              self.assertEqual(len(SCREAMING_SNAKE_CASE_			)   ,    SCREAMING_SNAKE_CASE_			)

              # check that output_attentions also work using config
              del inputs_dict["output_attentions"]
              UpperCamelCase	:List[Any]     							=       True
              UpperCamelCase	:Tuple     							=       model_class(SCREAMING_SNAKE_CASE_			)
              model.to(SCREAMING_SNAKE_CASE_			)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase	:Tuple     							=       model(**self._prepare_for_class(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)			)
              UpperCamelCase	:str     							=       outputs.attentions

              self.assertEqual(len(SCREAMING_SNAKE_CASE_			)   ,    SCREAMING_SNAKE_CASE_			)

              # verify the first attentions (first block, first layer)
              UpperCamelCase	:List[Any]     							=       (self.model_tester.image_size // 4) ** 2
              UpperCamelCase	:Optional[Any]     							=       (self.model_tester.image_size // (4 * self.model_tester.sr_ratios[0])) ** 2
              self.assertListEqual(
                  list(attentions[0].shape[-3:]			)   ,    [self.model_tester.num_attention_heads[0], expected_seq_len, expected_reduced_seq_len]   ,    )

              # verify the last attentions (last block, last layer)
              UpperCamelCase	:Any     							=       (self.model_tester.image_size // 32) ** 2
              UpperCamelCase	:List[str]     							=       (self.model_tester.image_size // (32 * self.model_tester.sr_ratios[-1])) ** 2
              self.assertListEqual(
                  list(attentions[-1].shape[-3:]			)   ,    [self.model_tester.num_attention_heads[-1], expected_seq_len, expected_reduced_seq_len]   ,    )
              UpperCamelCase	:List[Any]     							=       len(SCREAMING_SNAKE_CASE_			)

              # Check attention is always last and order is fine
              UpperCamelCase	:Union[str, Any]     							=       True
              UpperCamelCase	:List[Any]     							=       True
              UpperCamelCase	:Any     							=       model_class(SCREAMING_SNAKE_CASE_			)
              model.to(SCREAMING_SNAKE_CASE_			)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase	:Optional[int]     							=       model(**self._prepare_for_class(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)			)

              self.assertEqual(out_len + 1   ,    len(SCREAMING_SNAKE_CASE_			)			)

              UpperCamelCase	:Union[str, Any]     							=       outputs.attentions

              self.assertEqual(len(SCREAMING_SNAKE_CASE_			)   ,    SCREAMING_SNAKE_CASE_			)
              # verify the first attentions (first block, first layer)
              UpperCamelCase	:Any     							=       (self.model_tester.image_size // 4) ** 2
              UpperCamelCase	:Optional[Any]     							=       (self.model_tester.image_size // (4 * self.model_tester.sr_ratios[0])) ** 2
              self.assertListEqual(
                  list(self_attentions[0].shape[-3:]			)   ,    [self.model_tester.num_attention_heads[0], expected_seq_len, expected_reduced_seq_len]   ,    )
      def    UpperCAmelCase						(    self			)    ->				Any:
          def check_hidden_states_output(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			):
              UpperCamelCase	:List[str]     							=       model_class(SCREAMING_SNAKE_CASE_			)
              model.to(SCREAMING_SNAKE_CASE_			)
              model.eval()

              with torch.no_grad():
                  UpperCamelCase	:List[str]     							=       model(**self._prepare_for_class(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)			)

              UpperCamelCase	:int     							=       outputs.hidden_states

              UpperCamelCase	:Dict     							=       self.model_tester.num_encoder_blocks
              self.assertEqual(len(SCREAMING_SNAKE_CASE_			)   ,    SCREAMING_SNAKE_CASE_			)

              # verify the first hidden states (first block)
              self.assertListEqual(
                  list(hidden_states[0].shape[-3:]			)   ,    [
                      self.model_tester.hidden_sizes[0],
                      self.model_tester.image_size // 4,
                      self.model_tester.image_size // 4,
                  ]   ,    )

          UpperCamelCase							,       UpperCamelCase	:List[str]     							=       self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
              UpperCamelCase	:int     							=       True
              check_hidden_states_output(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              UpperCamelCase	:Optional[int]     							=       True

              check_hidden_states_output(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_			)
      def    UpperCAmelCase						(    self			)    ->				Tuple:
          if not self.model_tester.is_training:
              return

          UpperCamelCase							,       UpperCamelCase	:Optional[int]     							=       self.model_tester.prepare_config_and_inputs_for_common()
          UpperCamelCase	:Optional[Any]     							=       True

          for model_class in self.all_model_classes:
              if model_class in get_values(SCREAMING_SNAKE_CASE_			):
                  continue
              # TODO: remove the following 3 lines once we have a MODEL_FOR_DEPTH_ESTIMATION_MAPPING
              # this can then be incorporated into _prepare_for_class in test_modeling_common.py
              if model_class.__name__ == "GLPNForDepthEstimation":
                  UpperCamelCase							,       UpperCamelCase							,       UpperCamelCase							,       UpperCamelCase	:Optional[int]     							=       inputs_dict['''pixel_values'''].shape
                  UpperCamelCase	:Tuple     							=       torch.zeros(
                      [self.model_tester.batch_size, height, width]   ,    device=SCREAMING_SNAKE_CASE_			).long()
              UpperCamelCase	:List[str]     							=       model_class(SCREAMING_SNAKE_CASE_			)
              model.to(SCREAMING_SNAKE_CASE_			)
              model.train()
              UpperCamelCase	:str     							=       self._prepare_for_class(SCREAMING_SNAKE_CASE_   ,    SCREAMING_SNAKE_CASE_   ,    return_labels=SCREAMING_SNAKE_CASE_			)
              UpperCamelCase	:Optional[Any]     							=       model(**SCREAMING_SNAKE_CASE_			).loss
              loss.backward()




      @slow
      def    UpperCAmelCase						(    self			)    ->				List[Any]:
          for model_name in GLPN_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              UpperCamelCase	:Optional[Any]     							=       GLPNModel.from_pretrained(SCREAMING_SNAKE_CASE_			)
              self.assertIsNotNone(SCREAMING_SNAKE_CASE_			)







def   _A       (    ):
    UpperCamelCase	:int     							=       Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''	)
    return image







@require_torch
@require_vision
@slow
class       UpperCAmelCase_						( unittest.TestCase			):



      """simple docstring"""
      @slow
      def    UpperCAmelCase						(    self			)    ->				Dict:
          UpperCamelCase	:List[str]     							=       GLPNImageProcessor.from_pretrained(GLPN_PRETRAINED_MODEL_ARCHIVE_LIST[0]			)
          UpperCamelCase	:Any     							=       GLPNForDepthEstimation.from_pretrained(GLPN_PRETRAINED_MODEL_ARCHIVE_LIST[0]			).to(SCREAMING_SNAKE_CASE_			)

          UpperCamelCase	:Optional[Any]     							=       prepare_img()
          UpperCamelCase	:Any     							=       image_processor(images=SCREAMING_SNAKE_CASE_   ,    return_tensors='''pt'''			).to(SCREAMING_SNAKE_CASE_			)

          # forward pass
          with torch.no_grad():
              UpperCamelCase	:Optional[int]     							=       model(**SCREAMING_SNAKE_CASE_			)

          # verify the predicted depth
          UpperCamelCase	:str     							=       torch.Size([1, 480, 640]			)
          self.assertEqual(outputs.predicted_depth.shape   ,    SCREAMING_SNAKE_CASE_			)

          UpperCamelCase	:str     							=       torch.tensor(
              [[3.4291, 2.7865, 2.5151], [3.2841, 2.7021, 2.3502], [3.1147, 2.4625, 2.2481]]			).to(SCREAMING_SNAKE_CASE_			)

          self.assertTrue(torch.allclose(outputs.predicted_depth[0, :3, :3]   ,    SCREAMING_SNAKE_CASE_   ,    atol=1e-4			)			)













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

import numpy
from matplotlib import pyplot

__snake_case							 =  0.2_5 + 0.0j
__snake_case							 =  -0.4 + 0.6j
__snake_case							 =  -0.1 + 0.651j
__snake_case							 =  -2.0
__snake_case							 =  56
__snake_case							 =  2.0
__snake_case							 =  6_66


def   _A       (    SCREAMING_SNAKE_CASE__  :     complex					,  SCREAMING_SNAKE_CASE__  :     numpy.ndarray	):
    return numpy.exp(SCREAMING_SNAKE_CASE__	) + c_parameter


def   _A       (    SCREAMING_SNAKE_CASE__  :     complex					,  SCREAMING_SNAKE_CASE__  :     numpy.ndarray	):
    return z_values * z_values + c_parameter


def   _A       (    SCREAMING_SNAKE_CASE__  :     float					,  SCREAMING_SNAKE_CASE__  :     int	):
    UpperCamelCase	:List[Any]     							=       numpy.linspace(-window_size					,  SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	)
    UpperCamelCase	:Any     							=       x.reshape((nb_pixels, 1)	)
    UpperCamelCase	:Tuple     							=       numpy.linspace(-window_size					,  SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	)
    UpperCamelCase	:int     							=       y.reshape((1, nb_pixels)	)
    return x + 1.0J * y


def   _A       (    SCREAMING_SNAKE_CASE__  :     Callable[[Any, numpy.ndarray], numpy.ndarray]					,  SCREAMING_SNAKE_CASE__  :     Any					,  SCREAMING_SNAKE_CASE__  :     int					,  SCREAMING_SNAKE_CASE__  :     numpy.ndarray					,  SCREAMING_SNAKE_CASE__  :     float | None = None					,  ):
    UpperCamelCase	:Dict     							=       z_a.astype('''complex64'''	)
    for _ in range(SCREAMING_SNAKE_CASE__	):
        UpperCamelCase	:int     							=       eval_function(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	)
        if infinity is not None:
            numpy.nan_to_num(SCREAMING_SNAKE_CASE__					,  copy=SCREAMING_SNAKE_CASE__					,  nan=SCREAMING_SNAKE_CASE__	)
            UpperCamelCase	:Tuple     							=       infinity
    return z_n


def   _A       (    SCREAMING_SNAKE_CASE__  :     str					,  SCREAMING_SNAKE_CASE__  :     Any					,  SCREAMING_SNAKE_CASE__  :     float					,  SCREAMING_SNAKE_CASE__  :     numpy.ndarray					,  ):
    UpperCamelCase	:Any     							=       (abs(SCREAMING_SNAKE_CASE__	)).transpose()
    UpperCamelCase	:Any     							=       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   _A       (    ):
    warnings.filterwarnings(
        '''ignore'''					,  category=SCREAMING_SNAKE_CASE__					,  message='''overflow encountered in multiply'''	)
    warnings.filterwarnings(
        '''ignore'''					,  category=SCREAMING_SNAKE_CASE__					,  message='''invalid value encountered in multiply'''					,  )
    warnings.filterwarnings(
        '''ignore'''					,  category=SCREAMING_SNAKE_CASE__					,  message='''overflow encountered in absolute'''	)
    warnings.filterwarnings(
        '''ignore'''					,  category=SCREAMING_SNAKE_CASE__					,  message='''overflow encountered in exp'''	)


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

 ignore_overflow_warnings()  # See file header for explanations

 __snake_case							 =  24
 __snake_case							 =  2 * abs(c_cauliflower) + 1
 __snake_case							 =  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)

 __snake_case							 =  64
 __snake_case							 =  2 * abs(c_polynomial_a) + 1
 __snake_case							 =  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)

 __snake_case							 =  1_61
 __snake_case							 =  2 * abs(c_polynomial_a) + 1
 __snake_case							 =  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)

 __snake_case							 =  12
 __snake_case							 =  1_0_0_0_0.0
 __snake_case							 =  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)





