#NEWLINE# def from_vector( self , vector , copy = True ) : #NEWLINE# #INDENT# '\n        Takes a flattened vector and returns a new :map:`BooleanImage` formed\n        by reshaping the vector to the correct dimensions. Note that this is\n        rebuilding a boolean image **itself** from boolean values. The mask\n        is in no way interpreted in performing the operation, in contrast to\n        :map:`MaskedImage`, where only the masked region is used in\n        :meth:`from_vector` and :meth`as_vector`. Any image landmarks are\n        transferred in the process.\n\n        Parameters\n        ----------\n        vector : ``(n_pixels,)`` `bool ndarray`\n            A flattened vector of all the pixels of a :map:`BooleanImage`.\n        copy : `bool`, optional\n            If ``False``, no copy of the vector will be taken.\n\n        Returns\n        -------\n        image : :map:`BooleanImage`\n            New BooleanImage of same shape as this image\n\n        Raises\n        ------\n        Warning\n            If ``copy=False`` cannot be honored.\n        ' #NEWLINE# mask = BooleanImage ( vector . reshape ( self . shape ) , copy = copy ) #NEWLINE# if self . has_landmarks : #NEWLINE# #INDENT# mask . landmarks = self . landmarks #NEWLINE# #UNINDENT# if hasattr ( self , 'path' ) : #NEWLINE# #INDENT# mask . path = self . path #NEWLINE# #UNINDENT# return self