code: def array2mask(cls, array=None, **kwargs):
          
          kwargs['dtype'] = bool
          if array is None:
              return numpy.ndarray.__new__(cls, 0, **kwargs)
          return numpy.asarray(array, **kwargs).view(cls)
docs: Create a new mask object based on the given |numpy.ndarray|
          and return it.