


'''simple docstring'''

from math import log

from scipy.constants import Boltzmann, physical_constants

_UpperCAmelCase :       Optional[Any]										= 3_0_0  # TEMPERATURE (unit = K)

def 							__magic_name__(  lowerCamelCase, lowerCamelCase, lowerCamelCase, ):

						if donor_conc <= 0:
												raise ValueError('''Donor concentration should be positive''')
						elif acceptor_conc <= 0:
												raise ValueError('''Acceptor concentration should be positive''')
						elif intrinsic_conc <= 0:
												raise ValueError('''Intrinsic concentration should be positive''')
						elif donor_conc <= intrinsic_conc:
												raise ValueError(
												    '''Donor concentration should be greater than intrinsic concentration''')
						elif acceptor_conc <= intrinsic_conc:
												raise ValueError(
												    '''Acceptor concentration should be greater than intrinsic concentration''')
						else:
												return (
												    Boltzmann
												    * T
												    * log((donor_conc * acceptor_conc) / intrinsic_conc**2)
												    / physical_constants["electron volt"][0]
												)


if __name__ == "__main__":
	import doctest

	doctest.testmod()





"""simple docstring"""





from __future__ import annotations

import math

import numpy as np
from numpy.linalg import norm


def    _snake_case  (  _snake_case :	np.ndarray       ,      _snake_case :	np.ndarray	):
      return math.sqrt(sum(pow(a - b       ,      2	) for a, b in zip(_snake_case       ,      _snake_case	)	)	)


def    _snake_case  (  _snake_case :	np.ndarray       ,      _snake_case :	np.ndarray	):

      if dataset.ndim != value_array.ndim:
            lowerCAmelCase    :		List[Any]				=      (
                '''Wrong input data\'s dimensions... '''
                f'''dataset : {dataset.ndim}, value_array : {value_array.ndim}'''
            )
            raise ValueError(_snake_case	)

      try:
            if dataset.shape[1] != value_array.shape[1]:
                  lowerCAmelCase    :		Dict				=      (
                      '''Wrong input data\'s shape... '''
                      f'''dataset : {dataset.shape[1]}, value_array : {value_array.shape[1]}'''
                  )
                  raise ValueError(_snake_case	)
      except IndexError:
            if dataset.ndim != value_array.ndim:
                  raise TypeError('''Wrong shape'''	)

      if dataset.dtype != value_array.dtype:
            lowerCAmelCase    :		Optional[Any]				=      (
                '''Input data have different datatype... '''
                f'''dataset : {dataset.dtype}, value_array : {value_array.dtype}'''
            )
            raise TypeError(_snake_case	)

      lowerCAmelCase    :		str				=      []

      for value in value_array:
            lowerCAmelCase    :		int				=      euclidean(_snake_case       ,      dataset[0]	)
            lowerCAmelCase    :		Union[str, Any]				=      dataset[0].tolist()

            for dataset_value in dataset[1:]:
                  lowerCAmelCase    :		Any				=      euclidean(_snake_case       ,      _snake_case	)

                  if dist > temp_dist:
                        lowerCAmelCase    :		List[Any]				=      temp_dist
                        lowerCAmelCase    :		Tuple				=      dataset_value.tolist()

            answer.append([vector, dist]	)

      return answer


def    _snake_case  (  _snake_case :	np.ndarray       ,      _snake_case :	np.ndarray	):
      return np.dot(_snake_case       ,      _snake_case	) / (norm(_snake_case	) * norm(_snake_case	))


if __name__ == "__main__":
 import doctest

 doctest.testmod()


