code: def is_probability(vector: np.ndarray) -> bool:
      """
      Check if an 1D-array is a probability vector.
  
      :param vector: An 1D-array.
      :return: True if it is a probability vector.
      """
      is_sum_1 = math.isclose(np.sum(vector), 1.0, rel_tol=1e-03)
      is_smaller_1 = np.amax(vector) <= 1.0
      is_larger_0 = np.amin(vector) >= 0.0
  
      return is_sum_1 and is_smaller_1 and is_larger_0
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import os
  import shutil
  import sys
  import tarfile
  import warnings
  import zipfile
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, List, Dict, Optional, Tuple, Union
  import numpy
  import six
  from scipy.special import gammainc
  from tqdm.auto import tqdm
  from art import config
label_desc: Use image node_id 42 for calling a global function with example usage: is_probability(vector) and returns: unknown