original_docstring: 
      Hash of NumPy array using array samples. It is best to always use the same sample_size and seed, to avoid the
      possibility of the same array having different hashes.
  
      Parameters
      ----------
      array : numpy.ndarray
          NumPy array for which to compute hash.
  
      sample_size : int
          Number of samples to take. Higher number means more entropy, but slower computation. Using different sample
          sizes over the same array will most likely produce different hashes.
  
      seed : int
          Seed used to randomly choose samples. Using different seeds over the same array will most likely produce
          different hashes.
  
      Returns
      -------
      int
          Hash of taken samples.
  
      Notes
      -----
      Idea taken from https://stackoverflow.com/a/23300771.
      
docstring: Hash of NumPy array using array samples. It is best to always use the same sample_size and seed, to avoid the
  possibility of the same array having different hashes.
  
  Parameters
  
  array : numpy.ndarray
  NumPy array for which to compute hash.
  
  sample_size : int
  Number of samples to take. Higher number means more entropy, but slower computation. Using different sample
  sizes over the same array will most likely produce different hashes.
  
  seed : int
  Seed used to randomly choose samples. Using different seeds over the same array will most likely produce
  different hashes.
  
  Returns
  
  int
  Hash of taken samples.
  
  Notes
  
  
docstring_tokens: Hash of NumPy array using array samples . It is best to always use the same sample_size and seed to avoid the possibility of the same array having different hashes . Parameters array : numpy . ndarray NumPy array for which to compute hash . sample_size : int Number of samples to take . Higher number means more entropy but slower computation . Using different sample sizes over the same array will most likely produce different hashes . seed : int Seed used to randomly choose samples . Using different seeds over the same array will most likely produce different hashes . Returns int Hash of taken samples . Notes
code: def subsample_hash(array: np.ndarray, sample_size: int = 1024, seed: int = 666) -> int:
      """
      Hash of NumPy array using array samples. It is best to always use the same sample_size and seed, to avoid the
      possibility of the same array having different hashes.
  
      Parameters
      ----------
      array : numpy.ndarray
          NumPy array for which to compute hash.
  
      sample_size : int
          Number of samples to take. Higher number means more entropy, but slower computation. Using different sample
          sizes over the same array will most likely produce different hashes.
  
      seed : int
          Seed used to randomly choose samples. Using different seeds over the same array will most likely produce
          different hashes.
  
      Returns
      -------
      int
          Hash of taken samples.
  
      Notes
      -----
      Idea taken from https://stackoverflow.com/a/23300771.
      """
  
      # Choose random samples
      rng = np.random.RandomState(seed)
      indexes = rng.randint(low=0, high=array.size, size=sample_size)
      # Create new array of chosen samples
      sample = array.flat[indexes]
      sample.flags.writeable = False
      # Calculate the hash of the samples
      return hash(sample.data.tobytes())
code_tokens: def subsample_hash ( array : np . ndarray , sample_size : int = 1024 , seed : int = 666 ) -> int : rng = np . random . RandomState ( seed ) indexes = rng . randint ( low = 0 , high = array . size , size = sample_size ) sample = array . flat [ indexes ] sample . flags . writeable = False return hash ( sample . data . tobytes ( ) )
short_docstring: Hash of NumPy array using array samples.
short_docstring_tokens: Hash of NumPy array using array samples .
comment: """
      Hash of NumPy array using array samples. It is best to always use the same sample_size and seed, to avoid the
      possibility of the same array having different hashes.
  
      Parameters
      ----------
      array : numpy.ndarray
          NumPy array for which to compute hash.
  
      sample_size : int
          Number of samples to take. Higher number means more entropy, but slower computation. Using different sample
          sizes over the same array will most likely produce different hashes.
  
      seed : int
          Seed used to randomly choose samples. Using different seeds over the same array will most likely produce
          different hashes.
  
      Returns
      -------
      int
          Hash of taken samples.
  
      Notes
      -----
      Idea taken from https://stackoverflow.com/a/23300771.
      """$SEP$# Choose random samples$SEP$# Create new array of chosen samples$SEP$# Calculate the hash of the samples