code: def zscale(image, nsamples=1000, contrast=0.25):
      
  
      # Sample the image
      samples = zsc_sample(image, nsamples)
  
      return zscale_samples(samples, contrast=contrast)
docs: Implement IRAF zscale algorithm
      nsamples=1000 and contrast=0.25 are the IRAF display task defaults
      image is a 2-d numpy array
      returns (z1, z2)