"""simple docstring"""







import numpy as np
def     __UpperCAmelCase							(       UpperCAmelCase_       :							List[str]    )				->     Dict:

	'''simple docstring'''





	__snake_case     :				Tuple 						=					np.exp(UpperCAmelCase_    )

	# Add up the all the exponentials
	__snake_case     :				int 						=					np.sum(UpperCAmelCase_    )

	# Divide every exponent by the sum of all exponents
	__snake_case     :				Optional[int] 						=					exponent_vector / sum_of_exponents

	return softmax_vector


if __name__ == "__main__":
	print(softmax((0,)))






"""simple docstring"""







from typing import TypeVar

from .arrow_dataset import Dataset, _split_by_node_map_style_dataset
from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset


_a	:	List[Any]=					TypeVar("DatasetType", Dataset, IterableDataset)
def     __UpperCAmelCase							(       UpperCAmelCase_       :							DatasetType     ,				UpperCAmelCase_       :							int     ,				UpperCAmelCase_       :							int    )				->     DatasetType:

	'''simple docstring'''





	if isinstance(UpperCAmelCase_     ,				UpperCAmelCase_    ):
		return _split_by_node_map_style_dataset(UpperCAmelCase_     ,				rank=UpperCAmelCase_     ,				world_size=UpperCAmelCase_    )
	else:
		return _split_by_node_iterable_dataset(UpperCAmelCase_     ,				rank=UpperCAmelCase_     ,				world_size=UpperCAmelCase_    )





