old_contents: 
  import numpy as np
  import pyamg
  from geoblend.b import b
  
  
  def test_b():
  
      mask = np.array([
          [0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 1, 1, 1, 0, 0, 0, 0],
          [0, 1, 1, 1, 1, 1, 1, 0, 0],
          [0, 0, 1, 1, 1, 1, 0, 0, 0],
          [0, 0, 0, 1, 1, 1, 0, 0, 0],
          [0, 0, 0, 0 ,0, 0, 0, 0, 0]
      ], dtype=np.uint8)
  
      source = np.array([
          [459, 516, 579, 595, 622, 575, 564, 607, 627],
          [451, 509, 540, 561, 528, 515, 537, 621, 614],
          [489, 537, 574, 587, 497, 484, 491, 540, 532],
          [543, 683, 650, 620, 546, 513, 521, 522, 549],
          [557, 656, 666, 628, 576, 570, 571, 545, 546],
          [623, 742, 683, 610, 616, 566, 558, 516, 501]
      ], dtype=np.uint16)
  
      reference = np.array([
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [504, 504, 472, 472, 472, 472, 458, 458, 458],
          [504, 504, 472, 472, 472, 472, 458, 458, 458],
          [504, 504, 472, 472, 472, 472, 458, 458, 458]
      ], dtype=np.uint16)
  
      field = (pyamg.gallery.poisson(source.shape, dtype=np.int8) * source.ravel()).reshape(source.shape)
  
      expected = np.array([
          1682, 1080, 1718, 2408, -110, 992, -1078, 1076, 2048, 2306, 210, 250, 460, 2182, 352, 2542
      ])
  
      vector = b(mask, field, reference)
  
      assert np.all(expected == vector)
new_contents: 
  import numpy as np
  import pyamg
  from geoblend.b import b
  
  
  def test_b():
  
      mask = np.array([
          [0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 1, 1, 1, 0, 0, 0, 0],
          [0, 1, 1, 1, 1, 1, 1, 0, 0],
          [0, 0, 1, 1, 1, 1, 0, 0, 0],
          [0, 0, 0, 1, 1, 1, 0, 0, 0],
          [0, 0, 0, 0 ,0, 0, 0, 0, 0]
      ], dtype=np.uint8)
  
      source = np.array([
          [459, 516, 579, 595, 622, 575, 564, 607, 627],
          [451, 509, 540, 561, 528, 515, 537, 621, 614],
          [489, 537, 574, 587, 497, 484, 491, 540, 532],
          [543, 683, 650, 620, 546, 513, 521, 522, 549],
          [557, 656, 666, 628, 576, 570, 571, 545, 546],
          [623, 742, 683, 610, 616, 566, 558, 516, 501]
      ], dtype=np.uint16)
  
      reference = np.array([
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [555, 555, 514, 514, 514, 514, 479, 479, 479],
          [504, 504, 472, 472, 472, 472, 458, 458, 458],
          [504, 504, 472, 472, 472, 472, 458, 458, 458],
          [504, 504, 472, 472, 472, 472, 458, 458, 458]
      ], dtype=np.uint16)
  
      field = (pyamg.gallery.poisson(source.shape, dtype=np.int8) * source.ravel()).reshape(source.shape)
  
      expected = np.array([
          1682, 1080, 1718, 2408, -110, 992, -1078, 1076, 2048, 2306, 210, 250, 460, 2182, 352, 2542
      ])
      
      vector = b(mask, field, reference)
      
      assert np.all(expected == vector)
subject: test b vector