title: Numpy seed sometimes not working for dask function
body: <p>Seeding sometimes fails when running across dask distributed function calls. The desire is to pass in a seed value to a set of MC simulation trials which works most of the time; but, not always. The issue was boiled down to the following example:</p>
  
  <pre><code>from dask.distributed import Client
  import numpy as np
  
  def get_rand4seed(seedx):
      np.random.seed(seedx)
      rand1 = np.random.rand(1)[0]
      return seedx, rand1
  
  seedrange = 100
  seed_ids = np.arange(0,seedrange).tolist()
  
  client = Client()
  a = client.map(get_rand4seed, seed_ids)
  results = client.gather(a)
  client.close()
  
  for result in results:
      # take seed packed in result and calculate correct 1st random number
      np.random.seed(result[0])
      correct_result = np.random.rand(1)[0]
  
      # comparing with 1st random number calculated in parallelized func
      comparison = 'seed=%s, dask=%s, correct=%s' % (result[0], result[1], correct_result)
      if result[1] != correct_result:
          print('DIFF: %s' % comparison)
      else:
          pass
          #print(comparison)
  </code></pre>
  
  <p>Typically, 5 to 10% of the cases are incorrect and the error likelihood seems to be greater after the 10th or so item. And, sometimes all 100 items are correct. Example results:</p>
  
  <pre><code>DIFF: seed=10, dask=0.6503742417395917, correct=0.771320643266746
  DIFF: seed=18, dask=0.5054533737348429, correct=0.6503742417395917
  DIFF: seed=26, dask=0.038561680881409655, correct=0.30793495262497084
  DIFF: seed=34, dask=0.780100460524675, correct=0.038561680881409655
  DIFF: seed=69, dask=0.6063543377764754, correct=0.29624916167243354
  DIFF: seed=77, dask=0.29624916167243354, correct=0.9191090317991818
  DIFF: seed=85, dask=0.6575115686178157, correct=0.620373814553256
  DIFF: seed=93, dask=0.3072410093435699, correct=0.6063543377764754
  </code></pre>