code: def test_bam_exceptions(self):
      with self.assertRaises(NotTrained):
          dbnet = algorithms.DiscreteBAM()
          dbnet.predict(np.array([0, 1]))
  
      with self.assertRaises(NotTrained):
          dbnet = algorithms.DiscreteBAM()
          dbnet.predict_input(np.array([0, 1]))
  
      with self.assertRaises(ValueError):
          dbnet = algorithms.DiscreteBAM()
          dbnet.weight = np.array([[0, 1], [1, 0]])
          dbnet.train(np.array([0, 1, 1]), np.array([0, 1]))
  
file_path: neupy/tests/algorithms/memory/test_bam.py
imports: import pickle
  import numpy
  from neupy import algorithms
  from neupy.exceptions import NotTrained
  from algorithms.memory.data import zero, one, half_one, half_zero
  from base import BaseTestCase
  from helpers import vectors_for_testing
label_desc: Use image node_id 2 for calling the BAMTestCase obj's underlying member method code with example usage: obj.test_bam_exceptions() without return types