



from math import cos, sin

def 	a						(				_UpperCAmelCase							: float						):







		'''simple docstring'''





		__UpperCAmelCase   :					int													=     float(_UpperCAmelCase						)
		return [[scaling_factor * int(x == y						) for x in range(2						)] for y in range(2						)]

def 	a						(				_UpperCAmelCase							: float						):







		'''simple docstring'''





		__UpperCAmelCase							, __UpperCAmelCase   :					Dict													=     cos(_UpperCAmelCase						), sin(_UpperCAmelCase						)
		return [[c, -s], [s, c]]

def 	a						(				_UpperCAmelCase							: float						):







		'''simple docstring'''





		__UpperCAmelCase							, __UpperCAmelCase   :					int													=     cos(_UpperCAmelCase						), sin(_UpperCAmelCase						)
		__UpperCAmelCase   :					Dict													=     c * s
		return [[c * c, cs], [cs, s * s]]

def 	a						(				_UpperCAmelCase							: float						):







		'''simple docstring'''





		__UpperCAmelCase							, __UpperCAmelCase   :					str													=     cos(_UpperCAmelCase						), sin(_UpperCAmelCase						)
		__UpperCAmelCase   :					List[Any]													=     c * s
		return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f'''    {scaling(5) = }''')
print(f'''  {rotation(4_5) = }''')
print(f'''{projection(4_5) = }''')
print(f'''{reflection(4_5) = }''')










import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir

@dataclass
class 		UpperCAmelCase__      :




			'''simple docstring'''






			UpperCamelCase      						=	42

class 		UpperCAmelCase__      (      unittest.TestCase       ):




			'''simple docstring'''






			def 			snake_case__					(       self							:			Any			):
					'''simple docstring'''





					__UpperCAmelCase   :					Optional[int]													=     get_tests_dir('''fixtures/test_sentencepiece.model'''			)
					__UpperCAmelCase   :					Union[str, Any]													=     get_tests_dir('''fixtures/test_sentencepiece_with_bytefallback.model'''			)

					__UpperCAmelCase   :					List[str]													=     FakeOriginalTokenizer(vocab_file=a_			)

					with warnings.catch_warnings(record=a_			) as w:
							__UpperCAmelCase   :					Optional[int]													=     SpmConverter(a_			)
					self.assertEqual(len(a_			)	,	0			)

					__UpperCAmelCase   :					Optional[int]													=     FakeOriginalTokenizer(vocab_file=a_			)

					with warnings.catch_warnings(record=a_			) as w:
							__UpperCAmelCase   :					Dict													=     SpmConverter(a_			)
					self.assertEqual(len(a_			)	,	1			)

					self.assertIn(
					    '''The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option'''
					    ''' which is not implemented in the fast tokenizers.'''	,	str(w[0].message			)	,	)





