title: AttributeError: 'numpy.ndarray' object has no attribute 'append' error
body: <p>Hello Guys I am new to Machine and Trying to learn it from you-tube but when i run their code on my computer i got this error Please help....!!!!</p>
  
  <p>Code:</p>
  
  <pre><code>import random
  
  random.shuffle(training_data)
  
  for sample in training_data:
      print(sample[1])
  
  X = []
  y = [] 
  
  y = np.array(y)
  
  for features  , label in training_data:
      X.append(features)
      y.append(label)
  
  X  = np.array(X).reshape(-1 , IMG_SIZE , IMG_SIZE,1)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PVQsQ.png" rel="nofollow noreferrer">enter image description here</a></p>