def __new__(cls, data, unit=None,<EOL>x0=None, dx=None, xindex=None, xunit=None,<EOL>y0=None, dy=None, yindex=None, yunit=None, **kwargs):
<EOL>new = super(Array2D, cls).__new__(cls, data, unit=unit, xindex=xindex,<EOL>xunit=xunit, x0=x0, dx=dx, **kwargs)<EOL>if yindex is not None:<EOL><INDENT>if dy is not None:<EOL><INDENT>warn("<STR_LIT>"<EOL>% cls.__name__)<EOL><DEDENT>if y0 is not None:<EOL><INDENT>warn("<STR_LIT>"<EOL>% cls.__name__)<EOL><DEDENT>if yunit is None and isinstance(yindex, Quantity):<EOL><INDENT>yunit = yindex.unit<EOL><DEDENT>elif yunit is None:<EOL><INDENT>yunit = cls._default_yunit<EOL><DEDENT>new.yindex = Quantity(yindex, unit=yunit)<EOL><DEDENT>else:<EOL><INDENT>if yunit is None and isinstance(dy, Quantity):<EOL><INDENT>yunit = dy.unit<EOL><DEDENT>elif yunit is None and isinstance(y0, Quantity):<EOL><INDENT>yunit = y0.unit<EOL><DEDENT>elif yunit is None:<EOL><INDENT>yunit = cls._default_yunit<EOL><DEDENT>if dy is not None:<EOL><INDENT>new.dy = Quantity(dy, yunit)<EOL><DEDENT>if y0 is not None:<EOL><INDENT>new.y0 = Quantity(y0, yunit)<EOL><DEDENT><DEDENT>return new<EOL>
Define a new `Array2D`