
'''simple docstring'''







import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
  import torch

  from transformers import (
      OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
      OpenAIGPTConfig,
      OpenAIGPTDoubleHeadsModel,
      OpenAIGPTForSequenceClassification,
      OpenAIGPTLMHeadModel,
      OpenAIGPTModel,
  )







class UpperCAmelCase__	:





  """simple docstring"""

  def __init__(		self      :     List[Any]							,_a      :     Optional[int]							,_a      :     int=13							,_a      :     str=7							,_a      :     int=True							,_a      :     Tuple=True							,_a      :     Tuple=True							,_a      :     Dict=99							,_a      :     Union[str, Any]=32							,_a      :     Tuple=5							,_a      :     List[str]=4							,_a      :     str=37							,_a      :     Optional[Any]="gelu"							,_a      :     int=0.1							,_a      :     List[Any]=0.1							,_a      :     Tuple=512							,_a      :     Dict=16							,_a      :     Dict=2							,_a      :     Optional[int]=0.02							,_a      :     str=3							,_a      :     Optional[Any]=4							,_a      :     List[str]=None							,):


     '''simple docstring'''






     _a				:	Optional[Any]			=   parent
     _a				:	Tuple			=   batch_size
     _a				:	Any			=   seq_length
     _a				:	Union[str, Any]			=   is_training
     _a				:	Any			=   use_token_type_ids
     _a				:	List[Any]			=   use_labels
     _a				:	List[Any]			=   vocab_size
     _a				:	Dict			=   hidden_size
     _a				:	Union[str, Any]			=   num_hidden_layers
     _a				:	int			=   num_attention_heads
     _a				:	List[str]			=   intermediate_size
     _a				:	Dict			=   hidden_act
     _a				:	str			=   hidden_dropout_prob
     _a				:	Tuple			=   attention_probs_dropout_prob
     _a				:	Dict			=   max_position_embeddings
     _a				:	Dict			=   type_vocab_size
     _a				:	Union[str, Any]			=   type_sequence_label_size
     _a				:	Tuple			=   initializer_range
     _a				:	Tuple			=   num_labels
     _a				:	str			=   num_choices
     _a				:	List[str]			=   scope
     _a				:	Union[str, Any]			=   self.vocab_size - 1


  def   __lowercase		(		self      :     Dict       ):


     '''simple docstring'''






     _a				:	Optional[Any]			=   ids_tensor([self.batch_size, self.seq_length]							,self.vocab_size       )

     _a				:	List[str]			=   None
     if self.use_token_type_ids:
        _a				:	Optional[int]			=   ids_tensor([self.batch_size, self.seq_length]							,self.type_vocab_size       )

     _a				:	Optional[int]			=   None
     _a				:	str			=   None
     _a				:	int			=   None
     if self.use_labels:
        _a				:	Tuple			=   ids_tensor([self.batch_size]							,self.type_sequence_label_size       )
        _a				:	int			=   ids_tensor([self.batch_size, self.seq_length]							,self.num_labels       )
        _a				:	Optional[Any]			=   ids_tensor([self.batch_size]							,self.num_choices       )

     _a				:	Union[str, Any]			=   OpenAIGPTConfig(
         vocab_size=self.vocab_size							,n_embd=self.hidden_size							,n_layer=self.num_hidden_layers							,n_head=self.num_attention_heads							,n_positions=self.max_position_embeddings							,pad_token_id=self.pad_token_id							,)

     _a				:	Union[str, Any]			=   ids_tensor([self.num_hidden_layers, self.num_attention_heads]							,2       )

     return (
         config,
         input_ids,
         head_mask,
         token_type_ids,
         sequence_labels,
         token_labels,
         choice_labels,
     )


  def   __lowercase		(		self      :     Any							,_a      :     int							,_a      :     List[Any]							,_a      :     str							,_a      :     Optional[int]							,*_a      :     Union[str, Any]       ):


     '''simple docstring'''






     _a				:	Optional[int]			=   OpenAIGPTModel(config=lowerCamelCase__       )
     model.to(lowerCamelCase__       )
     model.eval()

     _a				:	int			=   model(lowerCamelCase__							,token_type_ids=lowerCamelCase__							,head_mask=lowerCamelCase__       )
     _a				:	Dict			=   model(lowerCamelCase__							,token_type_ids=lowerCamelCase__       )
     _a				:	List[str]			=   model(lowerCamelCase__       )

     self.parent.assertEqual(result.last_hidden_state.shape							,(self.batch_size, self.seq_length, self.hidden_size)       )


  def   __lowercase		(		self      :     List[Any]							,_a      :     Any							,_a      :     int							,_a      :     Optional[Any]							,_a      :     int							,*_a      :     Union[str, Any]       ):


     '''simple docstring'''






     _a				:	Any			=   OpenAIGPTLMHeadModel(lowerCamelCase__       )
     model.to(lowerCamelCase__       )
     model.eval()

     _a				:	Optional[int]			=   model(lowerCamelCase__							,token_type_ids=lowerCamelCase__							,labels=lowerCamelCase__       )
     self.parent.assertEqual(result.loss.shape							,()       )
     self.parent.assertEqual(result.logits.shape							,(self.batch_size, self.seq_length, self.vocab_size)       )


  def   __lowercase		(		self      :     Tuple							,_a      :     str							,_a      :     Any							,_a      :     str							,_a      :     List[Any]							,*_a      :     List[Any]       ):


     '''simple docstring'''






     _a				:	Optional[Any]			=   OpenAIGPTDoubleHeadsModel(lowerCamelCase__       )
     model.to(lowerCamelCase__       )
     model.eval()

     _a				:	List[str]			=   model(lowerCamelCase__							,token_type_ids=lowerCamelCase__							,labels=lowerCamelCase__       )
     self.parent.assertEqual(result.loss.shape							,()       )
     self.parent.assertEqual(result.logits.shape							,(self.batch_size, self.seq_length, self.vocab_size)       )


  def   __lowercase		(		self      :     str							,_a      :     Any							,_a      :     Optional[Any]							,_a      :     List[Any]							,_a      :     int							,*_a      :     int       ):


     '''simple docstring'''






     _a				:	List[Any]			=   self.num_labels
     _a				:	Optional[int]			=   OpenAIGPTForSequenceClassification(lowerCamelCase__       )
     model.to(lowerCamelCase__       )
     model.eval()

     _a				:	str			=   ids_tensor([self.batch_size]							,self.type_sequence_label_size       )
     _a				:	List[str]			=   model(lowerCamelCase__							,token_type_ids=lowerCamelCase__							,labels=lowerCamelCase__       )
     self.parent.assertEqual(result.logits.shape							,(self.batch_size, self.num_labels)       )


  def   __lowercase		(		self      :     str       ):


     '''simple docstring'''






     _a				:	Dict			=   self.prepare_config_and_inputs()
     (
         (
         _a						
     ),  (
         _a						
     ),  (
         _a						
     ),  (
         _a						
     ),  (
         _a						
     ),  (
         _a						
     ),  (
         _a						
     ),  						
     )				:	List[Any]			=   config_and_inputs
     _a				:	int			=   {
         'input_ids': input_ids,
         'token_type_ids': token_type_ids,
         'head_mask': head_mask,
     }

     return config, inputs_dict







@require_torch
class UpperCAmelCase__	( lowercase__    ,				lowercase__    ,				lowercase__    ,				unittest.TestCase	):





  """simple docstring"""

  __UpperCAmelCase				:				Dict   =					(
      (OpenAIGPTModel, OpenAIGPTLMHeadModel, OpenAIGPTDoubleHeadsModel, OpenAIGPTForSequenceClassification)
      if is_torch_available()
      else ()
  )
  __UpperCAmelCase				:				Optional[Any]   =					(
      (OpenAIGPTLMHeadModel,) if is_torch_available() else ()
  )  # TODO (PVP): Add Double HeadsModel when generate() function is changed accordingly
  __UpperCAmelCase				:				Any   =					(
      {
          '''feature-extraction''': OpenAIGPTModel,
          '''text-classification''': OpenAIGPTForSequenceClassification,
          '''text-generation''': OpenAIGPTLMHeadModel,
          '''zero-shot''': OpenAIGPTForSequenceClassification,
      }
      if is_torch_available()
      else {}
  )


  def   __lowercase		(		self      :     int							,_a      :     int							,_a      :     Dict							,_a      :     Union[str, Any]							,_a      :     Optional[Any]							,_a      :     List[Any]       ):


     '''simple docstring'''






     if pipeline_test_casse_name == "ZeroShotClassificationPipelineTests":
        # Get `tokenizer does not have a padding token` error for both fast/slow tokenizers.
        # `OpenAIGPTConfig` was never used in pipeline tests, either because of a missing checkpoint or because a
        # tiny config could not be created.
        return True

     return False


  def   __lowercase		(		self      :     Optional[int]							,_a      :     str							,_a      :     Optional[Any]							,_a      :     int=False       ):


     '''simple docstring'''






     _a				:	List[Any]			=   super()._prepare_for_class(lowerCamelCase__							,lowerCamelCase__							,return_labels=lowerCamelCase__       )

     if return_labels:
        if model_class.__name__ == "OpenAIGPTDoubleHeadsModel":
           _a				:	Tuple			=   torch.zeros(
               (self.model_tester.batch_size, self.model_tester.num_choices, self.model_tester.seq_length)							,dtype=torch.long							,device=lowerCamelCase__							,)
           _a				:	Optional[int]			=   inputs_dict['labels']
           _a				:	Dict			=   inputs_dict['labels']
           _a				:	List[str]			=   torch.zeros(
               (self.model_tester.batch_size, self.model_tester.num_choices)							,dtype=torch.long							,device=lowerCamelCase__							,)
           _a				:	Optional[int]			=   torch.zeros(
               self.model_tester.batch_size							,dtype=torch.long							,device=lowerCamelCase__       )
     return inputs_dict


  def   __lowercase		(		self      :     Any       ):


     '''simple docstring'''






     _a				:	str			=   OpenAIGPTModelTester(self       )
     _a				:	List[str]			=   ConfigTester(self							,config_class=lowerCamelCase__							,n_embd=37       )


  def   __lowercase		(		self      :     Optional[Any]       ):


     '''simple docstring'''






     self.config_tester.run_common_tests()


  def   __lowercase		(		self      :     List[str]       ):


     '''simple docstring'''






     _a				:	Union[str, Any]			=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_openai_gpt_model(*lowerCamelCase__       )


  def   __lowercase		(		self      :     Tuple       ):


     '''simple docstring'''






     _a				:	List[str]			=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_lm_head_model(*lowerCamelCase__       )


  def   __lowercase		(		self      :     List[Any]       ):


     '''simple docstring'''






     _a				:	List[str]			=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_double_lm_head_model(*lowerCamelCase__       )


  def   __lowercase		(		self      :     List[Any]       ):


     '''simple docstring'''






     _a				:	Any			=   self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_openai_gpt_for_sequence_classification(*lowerCamelCase__       )


  @slow
  def   __lowercase		(		self      :     Union[str, Any]       ):


     '''simple docstring'''






     for model_name in OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
        _a				:	int			=   OpenAIGPTModel.from_pretrained(lowerCamelCase__       )
        self.assertIsNotNone(lowerCamelCase__       )







@require_torch
class UpperCAmelCase__	( unittest.TestCase	):





  """simple docstring"""

  @slow
  def   __lowercase		(		self      :     List[str]       ):


     '''simple docstring'''






     _a				:	str			=   OpenAIGPTLMHeadModel.from_pretrained('openai-gpt'       )
     model.to(lowerCamelCase__       )
     _a				:	List[str]			=   torch.tensor([[481, 4735, 544]]							,dtype=torch.long							,device=lowerCamelCase__       )  # the president is
     _a				:	List[str]			=   [
         481,
         4735,
         544,
         246,
         963,
         870,
         762,
         239,
         244,
         4_0477,
         244,
         249,
         719,
         881,
         487,
         544,
         240,
         244,
         603,
         481,
     ]  # the president is a very good man. " \n " i\'m sure he is, " said the

     _a				:	Optional[int]			=   model.generate(lowerCamelCase__							,do_sample=lowerCamelCase__       )
     self.assertListEqual(output_ids[0].tolist()							,lowerCamelCase__       )









import unittest

import numpy as np

from transformers.testing_utils import require_flax, require_tf, require_torch
from transformers.utils import (
    expand_dims,
    flatten_dict,
    is_flax_available,
    is_tf_available,
    is_torch_available,
    reshape,
    squeeze,
    transpose,
)


if is_flax_available():
					import jax.numpy as jnp

if is_tf_available():
					import tensorflow as tf

if is_torch_available():
					import torch







class     __lowerCAmelCase (       unittest.TestCase ):

			"""simple docstring"""







			def       lowercase_    (      self							)    ->      Tuple:



							'''simple docstring'''
							__lowerCamelCase		       =    {
							    'task_specific_params': {
							        'summarization': {'length_penalty': 1.0, 'max_length': 128, 'min_length': 12, 'num_beams': 4},
							        'summarization_cnn': {'length_penalty': 2.0, 'max_length': 142, 'min_length': 56, 'num_beams': 4},
							        'summarization_xsum': {'length_penalty': 1.0, 'max_length': 62, 'min_length': 11, 'num_beams': 6},
							    }
							}
							__lowerCamelCase		       =    {
							    'task_specific_params.summarization.length_penalty': 1.0,
							    'task_specific_params.summarization.max_length': 128,
							    'task_specific_params.summarization.min_length': 12,
							    'task_specific_params.summarization.num_beams': 4,
							    'task_specific_params.summarization_cnn.length_penalty': 2.0,
							    'task_specific_params.summarization_cnn.max_length': 142,
							    'task_specific_params.summarization_cnn.min_length': 56,
							    'task_specific_params.summarization_cnn.num_beams': 4,
							    'task_specific_params.summarization_xsum.length_penalty': 1.0,
							    'task_specific_params.summarization_xsum.max_length': 62,
							    'task_specific_params.summarization_xsum.min_length': 11,
							    'task_specific_params.summarization_xsum.num_beams': 6,
							}

							self.assertEqual(flatten_dict(lowerCamelCase__							)			,						lowerCamelCase__							)


			def       lowercase_    (      self							)    ->      Tuple:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__							)			,						x.transpose()							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__			,						axes=(1, 2, 0)							)			,						x.transpose((1, 2, 0)							)							)							)


			@require_torch
			def       lowercase_    (      self							)    ->      int:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__							)			,						transpose(lowerCamelCase__							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__			,						axes=(1, 2, 0)							)			,						transpose(lowerCamelCase__			,						axes=(1, 2, 0)							).numpy()							)							)


			@require_tf
			def       lowercase_    (      self							)    ->      Union[str, Any]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__							)			,						transpose(lowerCamelCase__							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__			,						axes=(1, 2, 0)							)			,						transpose(lowerCamelCase__			,						axes=(1, 2, 0)							).numpy()							)							)


			@require_flax
			def       lowercase_    (      self							)    ->      Optional[int]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__							)			,						np.asarray(transpose(lowerCamelCase__							)							)							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(transpose(lowerCamelCase__			,						axes=(1, 2, 0)							)			,						np.asarray(transpose(lowerCamelCase__			,						axes=(1, 2, 0)							)							)							)							)


			def       lowercase_    (      self							)    ->      int:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(4, 3)							)			,						np.reshape(lowerCamelCase__			,						(4, 3)							)							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(12, 5)							)			,						np.reshape(lowerCamelCase__			,						(12, 5)							)							)							)


			@require_torch
			def       lowercase_    (      self							)    ->      List[Any]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(4, 3)							)			,						reshape(lowerCamelCase__			,						(4, 3)							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(12, 5)							)			,						reshape(lowerCamelCase__			,						(12, 5)							).numpy()							)							)


			@require_tf
			def       lowercase_    (      self							)    ->      Optional[int]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(4, 3)							)			,						reshape(lowerCamelCase__			,						(4, 3)							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(12, 5)							)			,						reshape(lowerCamelCase__			,						(12, 5)							).numpy()							)							)


			@require_flax
			def       lowercase_    (      self							)    ->      Tuple:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(4, 3)							)			,						np.asarray(reshape(lowerCamelCase__			,						(4, 3)							)							)							)							)

							__lowerCamelCase		       =    np.random.randn(3			,						4			,						5							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(reshape(lowerCamelCase__			,						(12, 5)							)			,						np.asarray(reshape(lowerCamelCase__			,						(12, 5)							)							)							)							)


			def       lowercase_    (      self							)    ->      int:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(1			,						3			,						4							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__							)			,						np.squeeze(lowerCamelCase__							)							)							)

							__lowerCamelCase		       =    np.random.randn(1			,						4			,						1			,						5							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__			,						axis=2							)			,						np.squeeze(lowerCamelCase__			,						axis=2							)							)							)


			@require_torch
			def       lowercase_    (      self							)    ->      int:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(1			,						3			,						4							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__							)			,						squeeze(lowerCamelCase__							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(1			,						4			,						1			,						5							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__			,						axis=2							)			,						squeeze(lowerCamelCase__			,						axis=2							).numpy()							)							)


			@require_tf
			def       lowercase_    (      self							)    ->      Union[str, Any]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(1			,						3			,						4							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__							)			,						squeeze(lowerCamelCase__							).numpy()							)							)

							__lowerCamelCase		       =    np.random.randn(1			,						4			,						1			,						5							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__			,						axis=2							)			,						squeeze(lowerCamelCase__			,						axis=2							).numpy()							)							)


			@require_flax
			def       lowercase_    (      self							)    ->      List[str]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(1			,						3			,						4							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__							)			,						np.asarray(squeeze(lowerCamelCase__							)							)							)							)

							__lowerCamelCase		       =    np.random.randn(1			,						4			,						1			,						5							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(squeeze(lowerCamelCase__			,						axis=2							)			,						np.asarray(squeeze(lowerCamelCase__			,						axis=2							)							)							)							)


			def       lowercase_    (      self							)    ->      int:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							self.assertTrue(np.allclose(expand_dims(lowerCamelCase__			,						axis=1							)			,						np.expand_dims(lowerCamelCase__			,						axis=1							)							)							)


			@require_torch
			def       lowercase_    (      self							)    ->      Any:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    torch.tensor(lowerCamelCase__							)
							self.assertTrue(np.allclose(expand_dims(lowerCamelCase__			,						axis=1							)			,						expand_dims(lowerCamelCase__			,						axis=1							).numpy()							)							)


			@require_tf
			def       lowercase_    (      self							)    ->      Any:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    tf.constant(lowerCamelCase__							)
							self.assertTrue(np.allclose(expand_dims(lowerCamelCase__			,						axis=1							)			,						expand_dims(lowerCamelCase__			,						axis=1							).numpy()							)							)






			@require_flax
			def       lowercase_    (      self							)    ->      List[Any]:



							'''simple docstring'''
							__lowerCamelCase		       =    np.random.randn(3			,						4							)
							__lowerCamelCase		       =    jnp.array(lowerCamelCase__							)
							self.assertTrue(np.allclose(expand_dims(lowerCamelCase__			,						axis=1							)			,						np.asarray(expand_dims(lowerCamelCase__			,						axis=1							)							)							)							)


