class_docstr: A unittest class for testing Poisoning Attack on SVMs.
class_docstr_tok: ["A","unittest","class","for","testing","Poisoning","Attack","on","SVMs","."]
docstr: Returns an array of booleans that is true if that element was previously in the array
  
  :param x_train: training data
  :type x_train: `np.ndarray`
  :return: duplicates array
  :rtype: `np.ndarray`
docstr_tok: ["Returns","an","array","of","booleans","that","is","true","if","that","element","was","previously","in","the","array",":","param","x_train",":","training","data",":","type","x_train",":","`","np.ndarray","`",":","return",":","duplicates","array",":","rtype",":","`","np.ndarray","`"]
code: def find_duplicates(x_train):
      """
      Returns an array of booleans that is true if that element was previously in the array
  
      :param x_train: training data
      :type x_train: `np.ndarray`
      :return: duplicates array
      :rtype: `np.ndarray`
      """
      dup = np.zeros(x_train.shape[0])
      for idx, x in enumerate(x_train):
          dup[idx] = np.isin(x_train[:idx], x).all(axis=1).any()
      return dup
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from sklearn.svm import NuSVC, SVC
  from art.attacks.poisoning import PoisoningAttackSVM
  from art.estimators.classification.scikitlearn import SklearnClassifier, ScikitlearnSVC
  from art.utils import load_iris
  from tests.utils import master_seed
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 2 for calling the TestSVMAttack obj's underlying member method code with example usage: obj.find_duplicates(x_train) and returns: dup