def extract(self, other):
<EOL>if type(other) is float ortype(other) is numpy.float64 ortype(other) is numpy.float32:<EOL><INDENT>return self._extract_mfr(other)<EOL><DEDENT>elif self._is_compound_mfr_tuple(other):<EOL><INDENT>return self._extract_compound_mfr(other[<NUM_LIT:0>], other[<NUM_LIT:1>])<EOL><DEDENT>elif type(other) is str:<EOL><INDENT>return self._extract_compound(other)<EOL><DEDENT>elif type(other) is Material:<EOL><INDENT>return self._extract_material(other)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>
Extract 'other' from this stream, modifying this stream and returning
the extracted material as a new stream.

:param other: Can be one of the following:

  * float: A mass flow rate equal to other is extracted from self. Self
    is reduced by other and the extracted stream is returned as
    a new stream.
  * tuple (compound, mass): The other tuple specifies the mass flow
    rate of a compound to be extracted. It is extracted from self and
    the extracted mass flow rate is returned as a new stream.
  * string: The 'other' string specifies the compound to be
    extracted. All of the mass flow rate of that compound will be
    removed from self and a new stream created with it.
  * Material: The 'other' material specifies the list of
    compounds to extract.


:returns: New MaterialStream object.