class_docstr: Implementation of the Geometric Decision-based Attack (GeoDA), a black-box attack requiring class predictions.
  Based on reference implementation: https://github.com/thisisalirah/GeoDA
  
  | Paper link: https://arxiv.org/abs/2003.06468
class_docstr_tok: ["Implementation","of","the","Geometric","Decision-based","Attack","(","GeoDA",")",",","a","black-box","attack","requiring","class","predictions",".","Based","on","reference","implementation",":","https",":","\/\/github.com\/thisisalirah\/GeoDA","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/2003.06468"]
docstr: Create subspace random perturbation.
  
  :param num_noises: Number of random subspace noises.
  :param basis: Subspace bases.
  :return: Random subspace perturbations.
docstr_tok: ["Create","subspace","random","perturbation",".",":","param","num_noises",":","Number","of","random","subspace","noises",".",":","param","basis",":","Subspace","bases",".",":","return",":","Random","subspace","perturbations","."]
code: def _sub_noise(self, num_noises: int, basis: np.ndarray):
      """
      Create subspace random perturbation.
  
      :param num_noises: Number of random subspace noises.
      :param basis: Subspace bases.
      :return: Random subspace perturbations.
      """
      noise = np.random.normal(
          size=(basis.shape[1], self.nb_channels * num_noises)
      ) * (self.clip_max - self.clip_min)
      sub_noise = np.array(
          np.matmul(basis, noise)
          .transpose((1, 0))
          .astype(ART_NUMPY_DTYPE)
      )
  
      if self.estimator.channels_first:
          subspace_shape = (num_noises,) + self.estimator.input_shape
      else:
          subspace_shape = (
              num_noises,
              self.estimator.input_shape[2],
              self.estimator.input_shape[0],
              self.estimator.input_shape[1],
          )
  
      r_list = sub_noise.reshape(subspace_shape)
  
      if not self.estimator.channels_first:
          r_list = r_list.transpose((0, 2, 3, 1))
  
      return r_list
  
imports: import os
  import math
  import logging
  from typing import List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import check_and_transform_label_format, get_labels_np_array
label_desc: Use image node_id 10 for calling the GeoDA obj's underlying member method code with example usage: obj._sub_noise(num_noises, basis) and returns: r_list