
"""simple docstring"""






import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible




class 				lowercase__(				unittest.TestCase   ):
	'''simple docstring'''

	def   __lowerCAmelCase (						self    :int					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Any				= [
			    '''safety_checker/pytorch_model.bin''',
			    '''safety_checker/model.safetensors''',
			    '''vae/diffusion_pytorch_model.bin''',
			    '''vae/diffusion_pytorch_model.safetensors''',
			    '''text_encoder/pytorch_model.bin''',
			    '''text_encoder/model.safetensors''',
			    '''unet/diffusion_pytorch_model.bin''',
			    '''unet/diffusion_pytorch_model.safetensors''',
			]
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :Union[str, Any]					)							->			List[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Dict				= [
			    '''unet/diffusion_pytorch_model.bin''',
			    '''unet/diffusion_pytorch_model.safetensors''',
			]
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_					)					)





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







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= [
			    '''safety_checker/pytorch_model.bin''',
			    '''safety_checker/model.safetensors''',
			    '''vae/diffusion_pytorch_model.bin''',
			    '''vae/diffusion_pytorch_model.safetensors''',
			    '''text_encoder/pytorch_model.bin''',
			    '''text_encoder/model.safetensors''',
			    '''unet/diffusion_pytorch_model.bin''',
			    # Removed: 'unet/diffusion_pytorch_model.safetensors',
			]
			self.assertFalse(is_safetensors_compatible(lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :List[str]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[int]				= [
			    '''text_encoder/pytorch_model.bin''',
			    '''text_encoder/model.safetensors''',
			]
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_					)					)





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







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[str]				= [
			    '''safety_checker/pytorch_model.bin''',
			    '''safety_checker/model.safetensors''',
			    '''vae/diffusion_pytorch_model.bin''',
			    '''vae/diffusion_pytorch_model.safetensors''',
			    '''text_encoder/pytorch_model.bin''',
			    # Removed: 'text_encoder/model.safetensors',
			    '''unet/diffusion_pytorch_model.bin''',
			    '''unet/diffusion_pytorch_model.safetensors''',
			]
			self.assertFalse(is_safetensors_compatible(lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :Optional[int]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     str				= [
			    '''safety_checker/pytorch_model.fp16.bin''',
			    '''safety_checker/model.fp16.safetensors''',
			    '''vae/diffusion_pytorch_model.fp16.bin''',
			    '''vae/diffusion_pytorch_model.fp16.safetensors''',
			    '''text_encoder/pytorch_model.fp16.bin''',
			    '''text_encoder/model.fp16.safetensors''',
			    '''unet/diffusion_pytorch_model.fp16.bin''',
			    '''unet/diffusion_pytorch_model.fp16.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= '''fp16'''
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :str					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= [
			    '''unet/diffusion_pytorch_model.fp16.bin''',
			    '''unet/diffusion_pytorch_model.fp16.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     Dict				= '''fp16'''
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :int					)							->			int:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     int				= [
			    '''unet/diffusion_pytorch_model.bin''',
			    '''unet/diffusion_pytorch_model.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= '''fp16'''
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :Tuple					)							->			List[str]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Dict				= [
			    '''safety_checker/pytorch_model.fp16.bin''',
			    '''safety_checker/model.fp16.safetensors''',
			    '''vae/diffusion_pytorch_model.fp16.bin''',
			    '''vae/diffusion_pytorch_model.fp16.safetensors''',
			    '''text_encoder/pytorch_model.fp16.bin''',
			    '''text_encoder/model.fp16.safetensors''',
			    '''unet/diffusion_pytorch_model.fp16.bin''',
			    # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
			]
			SCREAMING_SNAKE_CASE       :     Dict				= '''fp16'''
			self.assertFalse(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :Optional[int]					)							->			str:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= [
			    '''text_encoder/pytorch_model.fp16.bin''',
			    '''text_encoder/model.fp16.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= '''fp16'''
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)





	def   __lowerCAmelCase (						self    :Dict					)							->			Optional[int]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= [
			    '''text_encoder/pytorch_model.bin''',
			    '''text_encoder/model.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     str				= '''fp16'''
			self.assertTrue(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)







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







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     int				= [
			    '''safety_checker/pytorch_model.fp16.bin''',
			    '''safety_checker/model.fp16.safetensors''',
			    '''vae/diffusion_pytorch_model.fp16.bin''',
			    '''vae/diffusion_pytorch_model.fp16.safetensors''',
			    '''text_encoder/pytorch_model.fp16.bin''',
			    # 'text_encoder/model.fp16.safetensors',
			    '''unet/diffusion_pytorch_model.fp16.bin''',
			    '''unet/diffusion_pytorch_model.fp16.safetensors''',
			]
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= '''fp16'''
			self.assertFalse(is_safetensors_compatible(lowerCamelCase_		, variant=lowerCamelCase_					)					)







"""simple docstring"""






from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray





def __A						(   a_ :							float		,		a_ :							float		,		a_ :							bool = False     )->							list[float]:




		'''simple docstring'''






		if radian_mode:
				return [magnitude * cos(a_     ), magnitude * sin(a_     )]
		return [magnitude * cos(radians(a_     )     ), magnitude * sin(radians(a_     )     )]





def __A						(   a_ :							NDArray[floataa]		,		a_ :							NDArray[floataa]		,		a_ :							float = 10**-1     )->							bool:




		'''simple docstring'''






		SCREAMING_SNAKE_CASE       :     NDArray[floataa]				= cross(a_		,		a_     )
		SCREAMING_SNAKE_CASE       :     float				= sum(a_     )
		return abs(a_     ) < eps


if __name__ == "__main__":
					# Test to check if it works
					lowerCamelCase__ :       Optional[Any]						     =			array(
					    [
					        polar_force(7_1_8.4, 180 - 30),
					        polar_force(8_7_9.5_4, 45),
					        polar_force(100, -90),
					    ]
					)

					lowerCamelCase__ :       NDArray[floataa]						     =			array([[0, 0], [0, 0], [0, 0]])

					assert in_static_equilibrium(forces, location)

					# Problem 1 in image_data/2D_problems.jpg
					lowerCamelCase__ :       Union[str, Any]						     =			array(
					    [
					        polar_force(30 * 9.8_1, 15),
					        polar_force(215, 180 - 45),
					        polar_force(264, 90 - 30),
					    ]
					)

					lowerCamelCase__ :       Any						     =			array([[0, 0], [0, 0], [0, 0]])

					assert in_static_equilibrium(forces, location)

					# Problem in image_data/2D_problems_1.jpg
					lowerCamelCase__ :       Union[str, Any]						     =			array([[0, -2000], [0, -1200], [0, 15600], [0, -12400]])

					lowerCamelCase__ :       Optional[int]						     =			array([[0, 0], [6, 0], [10, 0], [12, 0]])

					assert in_static_equilibrium(forces, location)

					import doctest

					doctest.testmod()





