

'''simple docstring'''



import inspect
import unittest

from transformers import ViTConfig
from transformers.testing_utils import (
    require_accelerate,
    require_torch,
    require_torch_gpu,
    require_vision,
    slow,
    torch_device,
)
from transformers.utils import cached_property, is_torch_available, is_vision_available

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 torch import nn

		from transformers import ViTForImageClassification, ViTForMaskedImageModeling, ViTModel
		from transformers.models.vit.modeling_vit import VIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
		from PIL import Image

		from transformers import ViTImageProcessor



class lowerCamelCase			:



			'''simple docstring'''






			def __init__(				self	:						str		,      lowerCAmelCase_	:						Union[str, Any]		,      lowerCAmelCase_	:						Any=13		,      lowerCAmelCase_	:						int=30		,      lowerCAmelCase_	:						Optional[Any]=2		,      lowerCAmelCase_	:						List[Any]=3		,      lowerCAmelCase_	:						Tuple=True		,      lowerCAmelCase_	:						Tuple=True		,      lowerCAmelCase_	:						Dict=32		,      lowerCAmelCase_	:						str=5		,      lowerCAmelCase_	:						int=4		,      lowerCAmelCase_	:						str=37		,      lowerCAmelCase_	:						Optional[Any]="gelu"		,      lowerCAmelCase_	:						Optional[Any]=0.1		,      lowerCAmelCase_	:						List[Any]=0.1		,      lowerCAmelCase_	:						int=10		,      lowerCAmelCase_	:						Tuple=0.02		,      lowerCAmelCase_	:						List[Any]=None		,      lowerCAmelCase_	:						Dict=2		,      )      ->		List[Any]:





									'''simple docstring'''
									A__					:       Optional[int]     =parent
									A__					:       Any     =batch_size
									A__					:       int     =image_size
									A__					:       Dict     =patch_size
									A__					:       Optional[Any]     =num_channels
									A__					:       List[str]     =is_training
									A__					:       List[str]     =use_labels
									A__					:       Union[str, Any]     =hidden_size
									A__					:       List[Any]     =num_hidden_layers
									A__					:       str     =num_attention_heads
									A__					:       Optional[Any]     =intermediate_size
									A__					:       List[Any]     =hidden_act
									A__					:       Dict     =hidden_dropout_prob
									A__					:       Dict     =attention_probs_dropout_prob
									A__					:       Optional[Any]     =type_sequence_label_size
									A__					:       Optional[int]     =initializer_range
									A__					:       List[str]     =scope
									A__					:       List[str]     =encoder_stride

									# in ViT, the seq length equals the number of patches + 1 (we add 1 for the [CLS] token)
									A__					:       List[str]     =(image_size // patch_size) ** 2
									A__					:       List[Any]     =num_patches + 1


			def lowercase__						(				self	:						Any			)      ->		Optional[Any]:





									'''simple docstring'''
									A__					:       str     =floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]			)

									A__					:       Tuple     =None
									if self.use_labels:
															A__					:       Dict     =ids_tensor([self.batch_size]		,      self.type_sequence_label_size			)

									A__					:       Any     =self.get_config()

									return config, pixel_values, labels


			def lowercase__						(				self	:						int			)      ->		Union[str, Any]:





									'''simple docstring'''
									return ViTConfig(
									    image_size=self.image_size		,      patch_size=self.patch_size		,      num_channels=self.num_channels		,      hidden_size=self.hidden_size		,      num_hidden_layers=self.num_hidden_layers		,      num_attention_heads=self.num_attention_heads		,      intermediate_size=self.intermediate_size		,      hidden_act=self.hidden_act		,      hidden_dropout_prob=self.hidden_dropout_prob		,      attention_probs_dropout_prob=self.attention_probs_dropout_prob		,      is_decoder=lowerCAmelCase_		,      initializer_range=self.initializer_range		,      encoder_stride=self.encoder_stride		,      )


			def lowercase__						(				self	:						Union[str, Any]		,      lowerCAmelCase_	:						Optional[Any]		,      lowerCAmelCase_	:						List[str]		,      lowerCAmelCase_	:						int			)      ->		Any:





									'''simple docstring'''
									A__					:       Union[str, Any]     =ViTModel(config=lowerCAmelCase_			)
									model.to(lowerCAmelCase_			)
									model.eval()
									A__					:       Union[str, Any]     =model(lowerCAmelCase_			)
									self.parent.assertEqual(result.last_hidden_state.shape		,      (self.batch_size, self.seq_length, self.hidden_size)			)


			def lowercase__						(				self	:						List[str]		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						List[str]		,      lowerCAmelCase_	:						str			)      ->		Tuple:





									'''simple docstring'''
									A__					:       Any     =ViTForMaskedImageModeling(config=lowerCAmelCase_			)
									model.to(lowerCAmelCase_			)
									model.eval()
									A__					:       Union[str, Any]     =model(lowerCAmelCase_			)
									self.parent.assertEqual(
									    result.reconstruction.shape		,      (self.batch_size, self.num_channels, self.image_size, self.image_size)			)

									# test greyscale images
									A__					:       str     =1
									A__					:       List[Any]     =ViTForMaskedImageModeling(lowerCAmelCase_			)
									model.to(lowerCAmelCase_			)
									model.eval()

									A__					:       Dict     =floats_tensor([self.batch_size, 1, self.image_size, self.image_size]			)
									A__					:       str     =model(lowerCAmelCase_			)
									self.parent.assertEqual(result.reconstruction.shape		,      (self.batch_size, 1, self.image_size, self.image_size)			)


			def lowercase__						(				self	:						Optional[Any]		,      lowerCAmelCase_	:						int		,      lowerCAmelCase_	:						Dict		,      lowerCAmelCase_	:						Optional[int]			)      ->		Any:





									'''simple docstring'''
									A__					:       List[Any]     =self.type_sequence_label_size
									A__					:       Optional[Any]     =ViTForImageClassification(lowerCAmelCase_			)
									model.to(lowerCAmelCase_			)
									model.eval()
									A__					:       str     =model(lowerCAmelCase_		,      labels=lowerCAmelCase_			)
									self.parent.assertEqual(result.logits.shape		,      (self.batch_size, self.type_sequence_label_size)			)

									# test greyscale images
									A__					:       List[Any]     =1
									A__					:       Dict     =ViTForImageClassification(lowerCAmelCase_			)
									model.to(lowerCAmelCase_			)
									model.eval()

									A__					:       str     =floats_tensor([self.batch_size, 1, self.image_size, self.image_size]			)
									A__					:       Union[str, Any]     =model(lowerCAmelCase_			)
									self.parent.assertEqual(result.logits.shape		,      (self.batch_size, self.type_sequence_label_size)			)



			def lowercase__						(				self	:						List[str]			)      ->		Any:





									'''simple docstring'''
									A__					:       Optional[Any]     =self.prepare_config_and_inputs()
									(
									    A__						
									)					:       List[Any]     =config_and_inputs
									A__					:       int     ={"""pixel_values""": pixel_values}
									return config, inputs_dict



@require_torch
class lowerCamelCase			(  lowercase_	,						lowercase_	,						unittest.TestCase						):



			'''simple docstring'''






			__snake_case        =	(
			    (
			        ViTModel,
			        ViTForImageClassification,
			        ViTForMaskedImageModeling,
			    )
			    if is_torch_available()
			    else ()
			)
			__snake_case        =	(
			    {'feature-extraction': ViTModel, 'image-classification': ViTForImageClassification}
			    if is_torch_available()
			    else {}
			)
			__snake_case        =	True

			__snake_case        =	False
			__snake_case        =	False
			__snake_case        =	False


			def lowercase__						(				self	:						str			)      ->		int:





									'''simple docstring'''
									A__					:       Dict     =ViTModelTester(self			)
									A__					:       Dict     =ConfigTester(self		,      config_class=lowerCAmelCase_		,      has_text_modality=lowerCAmelCase_		,      hidden_size=37			)


			def lowercase__						(				self	:						Tuple			)      ->		Any:





									'''simple docstring'''
									self.config_tester.run_common_tests()


			@unittest.skip(reason="""ViT does not use inputs_embeds"""			)
			def lowercase__						(				self	:						Union[str, Any]			)      ->		Optional[Any]:





									'''simple docstring'''
									pass


			def lowercase__						(				self	:						List[str]			)      ->		List[str]:





									'''simple docstring'''
									A__					:       Optional[int]     =self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
															A__					:       Any     =model_class(lowerCAmelCase_			)
															self.assertIsInstance(model.get_input_embeddings()		,      (nn.Module)			)
															A__					:       Union[str, Any]     =model.get_output_embeddings()
															self.assertTrue(x is None or isinstance(lowerCAmelCase_		,      nn.Linear			)			)


			def lowercase__						(				self	:						int			)      ->		Dict:





									'''simple docstring'''
									A__					:       List[Any]     =self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
															A__					:       List[Any]     =model_class(lowerCAmelCase_			)
															A__					:       List[str]     =inspect.signature(model.forward			)
															# signature.parameters is an OrderedDict => so arg_names order is deterministic
															A__					:       Union[str, Any]     =[*signature.parameters.keys()]

															A__					:       int     =["""pixel_values"""]
															self.assertListEqual(arg_names[:1]		,      lowerCAmelCase_			)


			def lowercase__						(				self	:						Any			)      ->		List[Any]:





									'''simple docstring'''
									A__					:       Union[str, Any]     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_model(*lowerCAmelCase_			)


			def lowercase__						(				self	:						str			)      ->		Any:





									'''simple docstring'''
									A__					:       Tuple     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_masked_image_modeling(*lowerCAmelCase_			)


			def lowercase__						(				self	:						Any			)      ->		Tuple:





									'''simple docstring'''
									A__					:       Any     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_image_classification(*lowerCAmelCase_			)



			@slow
			def lowercase__						(				self	:						Tuple			)      ->		Any:





									'''simple docstring'''
									for model_name in VIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
															A__					:       Union[str, Any]     =ViTModel.from_pretrained(lowerCAmelCase_			)
															self.assertIsNotNone(lowerCAmelCase_			)
def 						__lowerCamelCase	(       )	->							Any:






						"""simple docstring"""





						A__					:       Dict     =Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""	)
						return image



@require_torch
@require_vision
class lowerCamelCase			(  unittest.TestCase						):



			'''simple docstring'''






			@cached_property
			def lowercase__						(				self	:						int			)      ->		Tuple:





									'''simple docstring'''
									return ViTImageProcessor.from_pretrained("""google/vit-base-patch16-224"""			) if is_vision_available() else None


			@slow
			def lowercase__						(				self	:						List[Any]			)      ->		Tuple:





									'''simple docstring'''
									A__					:       Tuple     =ViTForImageClassification.from_pretrained("""google/vit-base-patch16-224"""			).to(lowerCAmelCase_			)

									A__					:       List[Any]     =self.default_image_processor
									A__					:       Optional[Any]     =prepare_img()
									A__					:       str     =image_processor(images=lowerCAmelCase_		,      return_tensors="""pt"""			).to(lowerCAmelCase_			)

									# forward pass
									with torch.no_grad():
															A__					:       str     =model(**lowerCAmelCase_			)

									# verify the logits
									A__					:       Optional[int]     =torch.Size((1, 10_00)			)
									self.assertEqual(outputs.logits.shape		,      lowerCAmelCase_			)

									A__					:       Optional[Any]     =torch.tensor([-0.2744, 0.8215, -0.0836]			).to(lowerCAmelCase_			)

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


			@slow
			def lowercase__						(				self	:						List[Any]			)      ->		Any:





									'''simple docstring'''
									A__					:       Optional[Any]     =ViTModel.from_pretrained("""facebook/dino-vits8"""			).to(lowerCAmelCase_			)

									A__					:       List[str]     =ViTImageProcessor.from_pretrained("""facebook/dino-vits8"""		,      size=4_80			)
									A__					:       str     =prepare_img()
									A__					:       Optional[int]     =image_processor(images=lowerCAmelCase_		,      return_tensors="""pt"""			)
									A__					:       str     =inputs.pixel_values.to(lowerCAmelCase_			)

									# forward pass
									with torch.no_grad():
															A__					:       Optional[int]     =model(lowerCAmelCase_		,      interpolate_pos_encoding=lowerCAmelCase_			)

									# verify the logits
									A__					:       Any     =torch.Size((1, 36_01, 3_84)			)
									self.assertEqual(outputs.last_hidden_state.shape		,      lowerCAmelCase_			)

									A__					:       int     =torch.tensor(
									    [[4.2340, 4.3906, -6.6692], [4.5463, 1.8928, -6.7257], [4.4429, 0.8496, -5.8585]]			).to(lowerCAmelCase_			)

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



			@slow
			@require_accelerate
			@require_torch_gpu
			def lowercase__						(				self	:						Union[str, Any]			)      ->		Dict:





									'''simple docstring'''
									A__					:       Dict     =ViTModel.from_pretrained("""facebook/dino-vits8"""		,      torch_dtype=torch.floataa		,      device_map="""auto"""			)
									A__					:       Optional[Any]     =self.default_image_processor

									A__					:       List[Any]     =prepare_img()
									A__					:       Dict     =image_processor(images=lowerCAmelCase_		,      return_tensors="""pt"""			)
									A__					:       Tuple     =inputs.pixel_values.to(lowerCAmelCase_			)

									# forward pass to make sure inference works in fp16
									with torch.no_grad():
															A__					:       Union[str, Any]     =model(lowerCAmelCase_			)




'''simple docstring'''



import tempfile

import numpy as np
import torch
from transformers import AutoTokenizer, TaEncoderModel

from diffusers import DDPMScheduler, UNetaDConditionModel
from diffusers.models.attention_processor import AttnAddedKVProcessor
from diffusers.pipelines.deepfloyd_if import IFWatermarker
from diffusers.utils.testing_utils import torch_device

from ..test_pipelines_common import to_np



class lowerCamelCase			:



			'''simple docstring'''






			def lowercase__						(				self	:						Any			)      ->		Tuple:





									'''simple docstring'''
									torch.manual_seed(0			)
									A__					:       str     =TaEncoderModel.from_pretrained("""hf-internal-testing/tiny-random-t5"""			)

									torch.manual_seed(0			)
									A__					:       int     =AutoTokenizer.from_pretrained("""hf-internal-testing/tiny-random-t5"""			)

									torch.manual_seed(0			)
									A__					:       Union[str, Any]     =UNetaDConditionModel(
									    sample_size=32		,      layers_per_block=1		,      block_out_channels=[32, 64]		,      down_block_types=[
									        """ResnetDownsampleBlock2D""",
									        """SimpleCrossAttnDownBlock2D""",
									    ]		,      mid_block_type="""UNetMidBlock2DSimpleCrossAttn"""		,      up_block_types=["""SimpleCrossAttnUpBlock2D""", """ResnetUpsampleBlock2D"""]		,      in_channels=3		,      out_channels=6		,      cross_attention_dim=32		,      encoder_hid_dim=32		,      attention_head_dim=8		,      addition_embed_type="""text"""		,      addition_embed_type_num_heads=2		,      cross_attention_norm="""group_norm"""		,      resnet_time_scale_shift="""scale_shift"""		,      act_fn="""gelu"""		,      )
									unet.set_attn_processor(AttnAddedKVProcessor()			)  # For reproducibility tests

									torch.manual_seed(0			)
									A__					:       Dict     =DDPMScheduler(
									    num_train_timesteps=10_00		,      beta_schedule="""squaredcos_cap_v2"""		,      beta_start=0.0001		,      beta_end=0.02		,      thresholding=lowerCAmelCase_		,      dynamic_thresholding_ratio=0.95		,      sample_max_value=1.0		,      prediction_type="""epsilon"""		,      variance_type="""learned_range"""		,      )

									torch.manual_seed(0			)
									A__					:       Union[str, Any]     =IFWatermarker()

									return {
									    "text_encoder": text_encoder,
									    "tokenizer": tokenizer,
									    "unet": unet,
									    "scheduler": scheduler,
									    "watermarker": watermarker,
									    "safety_checker": None,
									    "feature_extractor": None,
									}


			def lowercase__						(				self	:						Union[str, Any]			)      ->		int:





									'''simple docstring'''
									torch.manual_seed(0			)
									A__					:       List[Any]     =TaEncoderModel.from_pretrained("""hf-internal-testing/tiny-random-t5"""			)

									torch.manual_seed(0			)
									A__					:       str     =AutoTokenizer.from_pretrained("""hf-internal-testing/tiny-random-t5"""			)

									torch.manual_seed(0			)
									A__					:       Dict     =UNetaDConditionModel(
									    sample_size=32		,      layers_per_block=[1, 2]		,      block_out_channels=[32, 64]		,      down_block_types=[
									        """ResnetDownsampleBlock2D""",
									        """SimpleCrossAttnDownBlock2D""",
									    ]		,      mid_block_type="""UNetMidBlock2DSimpleCrossAttn"""		,      up_block_types=["""SimpleCrossAttnUpBlock2D""", """ResnetUpsampleBlock2D"""]		,      in_channels=6		,      out_channels=6		,      cross_attention_dim=32		,      encoder_hid_dim=32		,      attention_head_dim=8		,      addition_embed_type="""text"""		,      addition_embed_type_num_heads=2		,      cross_attention_norm="""group_norm"""		,      resnet_time_scale_shift="""scale_shift"""		,      act_fn="""gelu"""		,      class_embed_type="""timestep"""		,      mid_block_scale_factor=1.414		,      time_embedding_act_fn="""gelu"""		,      time_embedding_dim=32		,      )
									unet.set_attn_processor(AttnAddedKVProcessor()			)  # For reproducibility tests

									torch.manual_seed(0			)
									A__					:       Optional[int]     =DDPMScheduler(
									    num_train_timesteps=10_00		,      beta_schedule="""squaredcos_cap_v2"""		,      beta_start=0.0001		,      beta_end=0.02		,      thresholding=lowerCAmelCase_		,      dynamic_thresholding_ratio=0.95		,      sample_max_value=1.0		,      prediction_type="""epsilon"""		,      variance_type="""learned_range"""		,      )

									torch.manual_seed(0			)
									A__					:       int     =DDPMScheduler(
									    num_train_timesteps=10_00		,      beta_schedule="""squaredcos_cap_v2"""		,      beta_start=0.0001		,      beta_end=0.02		,      )

									torch.manual_seed(0			)
									A__					:       List[str]     =IFWatermarker()

									return {
									    "text_encoder": text_encoder,
									    "tokenizer": tokenizer,
									    "unet": unet,
									    "scheduler": scheduler,
									    "image_noising_scheduler": image_noising_scheduler,
									    "watermarker": watermarker,
									    "safety_checker": None,
									    "feature_extractor": None,
									}


			def lowercase__						(				self	:						str			)      ->		Tuple:





									'''simple docstring'''
									A__					:       Tuple     =self.get_dummy_components()
									A__					:       str     =self.pipeline_class(**lowerCAmelCase_			)
									pipe.to(lowerCAmelCase_			)
									pipe.set_progress_bar_config(disable=lowerCAmelCase_			)

									A__					:       Optional[int]     =self.get_dummy_inputs(lowerCAmelCase_			)

									A__					:       str     =inputs["""prompt"""]
									A__					:       Optional[int]     =inputs["""generator"""]
									A__					:       Optional[Any]     =inputs["""num_inference_steps"""]
									A__					:       Union[str, Any]     =inputs["""output_type"""]

									if "image" in inputs:
															A__					:       Union[str, Any]     =inputs["""image"""]
									else:
															A__					:       List[Any]     =None

									if "mask_image" in inputs:
															A__					:       Union[str, Any]     =inputs["""mask_image"""]
									else:
															A__					:       Tuple     =None

									if "original_image" in inputs:
															A__					:       Optional[Any]     =inputs["""original_image"""]
									else:
															A__					:       Tuple     =None

									A__   ,						A__					:       Optional[Any]     =pipe.encode_prompt(lowerCAmelCase_			)

									# inputs with prompt converted to embeddings
									A__					:       Optional[int]     ={
									    """prompt_embeds""": prompt_embeds,
									    """negative_prompt_embeds""": negative_prompt_embeds,
									    """generator""": generator,
									    """num_inference_steps""": num_inference_steps,
									    """output_type""": output_type,
									}

									if image is not None:
															A__					:       int     =image

									if mask_image is not None:
															A__					:       Tuple     =mask_image

									if original_image is not None:
															A__					:       Optional[int]     =original_image

									# set all optional components to None
									for optional_component in pipe._optional_components:
															setattr(lowerCAmelCase_		,      lowerCAmelCase_		,      lowerCAmelCase_			)

									A__					:       Any     =pipe(**lowerCAmelCase_			)[0]

									with tempfile.TemporaryDirectory() as tmpdir:
															pipe.save_pretrained(lowerCAmelCase_			)
															A__					:       int     =self.pipeline_class.from_pretrained(lowerCAmelCase_			)
															pipe_loaded.to(lowerCAmelCase_			)
															pipe_loaded.set_progress_bar_config(disable=lowerCAmelCase_			)

									pipe_loaded.unet.set_attn_processor(AttnAddedKVProcessor()			)  # For reproducibility tests

									for optional_component in pipe._optional_components:
															self.assertTrue(
															    getattr(lowerCAmelCase_		,      lowerCAmelCase_			) is None		,      f"`{optional_component}` did not stay set to None after loading."		,      )

									A__					:       Dict     =self.get_dummy_inputs(lowerCAmelCase_			)

									A__					:       int     =inputs["""generator"""]
									A__					:       str     =inputs["""num_inference_steps"""]
									A__					:       Optional[Any]     =inputs["""output_type"""]

									# inputs with prompt converted to embeddings
									A__					:       List[Any]     ={
									    """prompt_embeds""": prompt_embeds,
									    """negative_prompt_embeds""": negative_prompt_embeds,
									    """generator""": generator,
									    """num_inference_steps""": num_inference_steps,
									    """output_type""": output_type,
									}

									if image is not None:
															A__					:       int     =image

									if mask_image is not None:
															A__					:       int     =mask_image

									if original_image is not None:
															A__					:       Optional[int]     =original_image

									A__					:       List[str]     =pipe_loaded(**lowerCAmelCase_			)[0]

									A__					:       Union[str, Any]     =np.abs(to_np(lowerCAmelCase_			) - to_np(lowerCAmelCase_			)			).max()
									self.assertLess(lowerCAmelCase_		,      1e-4			)



			def lowercase__						(				self	:						List[str]			)      ->		Dict:





									'''simple docstring'''
									A__					:       Union[str, Any]     =self.get_dummy_components()
									A__					:       int     =self.pipeline_class(**lowerCAmelCase_			)
									pipe.to(lowerCAmelCase_			)
									pipe.set_progress_bar_config(disable=lowerCAmelCase_			)

									A__					:       int     =self.get_dummy_inputs(lowerCAmelCase_			)
									A__					:       List[Any]     =pipe(**lowerCAmelCase_			)[0]

									with tempfile.TemporaryDirectory() as tmpdir:
															pipe.save_pretrained(lowerCAmelCase_			)
															A__					:       List[Any]     =self.pipeline_class.from_pretrained(lowerCAmelCase_			)
															pipe_loaded.to(lowerCAmelCase_			)
															pipe_loaded.set_progress_bar_config(disable=lowerCAmelCase_			)

									pipe_loaded.unet.set_attn_processor(AttnAddedKVProcessor()			)  # For reproducibility tests

									A__					:       int     =self.get_dummy_inputs(lowerCAmelCase_			)
									A__					:       Tuple     =pipe_loaded(**lowerCAmelCase_			)[0]

									A__					:       Tuple     =np.abs(to_np(lowerCAmelCase_			) - to_np(lowerCAmelCase_			)			).max()
									self.assertLess(lowerCAmelCase_		,      1e-4			)

