inverse of [boolMasksToImage]
178685
def imageToBoolMasks(arr):
    ''''''
    assert arr.dtype == np.uint8, 'image needs to be dtype=uint8'
    masks = np.unpackbits(arr).reshape(*arr.shape, 8)
    return np.swapaxes(masks, 2, 0)
611118
function(x, y) {
        var imageData = this._context.getImageData(x, y, 1, 1);
        var data = imageData.data;
        return data[3] === 0;
    }
238942
def inverse(self):
        
        return ResizingOperator(domain=self.range, range=self.domain,
                                pad_mode=self.pad_mode,
                                pad_const=self.pad_const)
405774
function inverted(node) {
  if (node.value === threeDashes) {
    node.value = enDash
  } else if (node.value === twoDashes) {
    node.value = emDash
  }
}
867386
def rgb2cmy(self, img, whitebg=False):
        """"""
        tmp = img*1.0
        if whitebg:
            tmp = (1.0 - (img - img.min())/(img.max() - img.min()))
        out = tmp*0.0
        out[:,:,0] = (tmp[:,:,1] + tmp[:,:,2])/2.0
        out[:,:,1] = (tmp[:,:,0] + tmp[:,:,2])/2.0
        out[:,:,2] = (tmp[:,:,0] + tmp[:,:,1])/2.0
        return out
1018201
def inverse(self):
        """"""
        sign = '+' if self.sign == '-' else '-'
        return DiscreteFourierTransformInverse(
            domain=self.range, range=self.domain, axes=self.axes,
            halfcomplex=self.halfcomplex, sign=sign)
321805
function restoreImage (image) {
  if (image.restore && (typeof image.restore === 'function')) {
    image.restore();

    return true;
  }

  return false;
}
785373
function writeImageTag(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {

        var whole_match = m1;
        var alt_text   = m2;
        var link_id	 = m3.toLowerCase();
        var url		= m4;
        var title	= m7;

        if (!title) {
            title = "";
        }

        if (url == "") {
            if (link_id == "") {
                link_id = alt_text.toLowerCase().replace(/ ?\n/g," ");
            }
            url = "#"+link_id;

            if (urls[link_id] != undefined) {
                url = urls[link_id];
                if (titles[link_id] != undefined) {
                    title = title[link_id];
                }
            }
            else {
                return whole_match;
            }
        }

        alt_text = alt_text.replace(/"/g,"&quot;");
        url = escapeCharacters(url,"*_");
        var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";

        title = title.replace(/"/g,"&quot;");
        title = escapeCharacters(title,"*_");
        result +=  " title=\"" + title + "\"";

        result += " />";

        return result;
    }
348197
def _bool_encode(self, d):
        
        for k, v in d.items():
            if isinstance(v, bool):
                d[k] = str(v).lower()
        
        return d
7591
def _convert_bool_array(self, array):
        

        output = (array.view(numpy.int8) == ord('T')).astype(numpy.bool)
        return output
319818
def recover(y):
    
    p = (y*y - 1) * inverse(D*y*y + 1)
    x = powmod(p, (PRIME+3) // 8, PRIME)
    if (x*x - p) % PRIME != 0:
        i = powmod(2, (PRIME-1) // 4, PRIME)
        x = (x*i) % PRIME
    if x % 2 != 0:
        x = PRIME - x
    return x
821064
def Reverse(self, y):
        """"""
        return self._Bisect(y, self.ys, self.xs)
1111719
def _inverse_i(self, y, i):
        """"""
        lb = self._lb[self._index(i)]
        ub = self._ub[self._index(i)]
        al = self._al[self._index(i)]
        au = self._au[self._index(i)]
        if 1 < 3:
            if not lb <= y <= ub:
                raise ValueError('argument of inverse must be within the given bounds')
        if y < lb + al:
            return (lb - al) + 2 * (al * (y - lb))**0.5
        elif y < ub - au:
            return y
        else:
            return (ub + au) - 2 * (au * (ub - y))**0.5
942418
def binary_thin(image, strel1, strel2):
    
    hit_or_miss = scind.binary_hit_or_miss(image, strel1, strel2)
    return np.logical_and(image,np.logical_not(hit_or_miss))
1242658
function parse_BoolErr(blob, length, opts) {
	var cell = parse_XLSCell(blob, 6);
	if(opts.biff == 2) ++blob.l;
	var val = parse_Bes(blob, 2);
	cell.val = val;
	cell.t = (val === true || val === false) ? 'b' : 'e';
	return cell;
}
978765
def inverse_mod( a, m ):
  """"""

  if a < 0 or m <= a: a = a % m

  # From Ferguson and Schneier, roughly:

  c, d = a, m
  uc, vc, ud, vd = 1, 0, 0, 1
  while c != 0:
    q, c, d = divmod( d, c ) + ( c, )
    uc, vc, ud, vd = ud - q*uc, vd - q*vc, uc, vc

  # At this point, d is the GCD, and ud*a+vd*m = d.
  # If d == 1, this means that ud is a inverse.

  assert d == 1
  if ud > 0: return ud
  else: return ud + m
482363
function convertToFalseColorImage (element, colormap) {
  const enabledElement = getEnabledElement(element);


  return convertImageToFalseColorImage(enabledElement.image, colormap);
}