<html><body>
<p>2 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/0c1d2aceba78/">https://bitbucket.org/yt_analysis/yt/commits/0c1d2aceba78/</a> Changeset:   0c1d2aceba78 Branch:      yt User:        ngoldbaum Date:        2016-03-25 20:12:59+00:00 Summary:     Ensure instances of subclasses of YTArray have the correct type. Closes #1197. Affected #:  2 files</p>
<p>diff -r a776e67368c5629296b1e365dfca0b68b41ef1d5 -r 0c1d2aceba78e05e78b7d9e85c9022b16e2344f2 yt/units/tests/test_ytarray.py --- a/yt/units/tests/test_ytarray.py +++ b/yt/units/tests/test_ytarray.py @@ -541,17 +541,17 @@</p>
<pre>    a = YTArray(range(10), 'cm')
    b = YTQuantity(5, 'g')
</pre>
<ul><li><p>yield assert_isinstance, a*b, YTArray</p></li>
<li><p>yield assert_isinstance, b*a, YTArray</p></li></ul>
<p>+    assert_isinstance(a*b, YTArray) +    assert_isinstance(b*a, YTArray)</p>
<ul><li><p>yield assert_isinstance, a/b, YTArray</p></li>
<li><p>yield assert_isinstance, b/a, YTArray</p></li></ul>
<p>+    assert_isinstance(a/b, YTArray) +    assert_isinstance(b/a, YTArray)</p>
<ul><li><p>yield assert_isinstance, a*a, YTArray</p></li>
<li><p>yield assert_isinstance, a/a, YTArray</p></li></ul>
<p>+    assert_isinstance(a*a, YTArray) +    assert_isinstance(a/a, YTArray)</p>
<ul><li><p>yield assert_isinstance, b*b, YTQuantity</p></li>
<li><p>yield assert_isinstance, b/b, YTQuantity</p></li></ul>
<p>+    assert_isinstance(b*b, YTQuantity) +    assert_isinstance(b/b, YTQuantity)</p>
<pre>def test_selecting():</pre>
<p>@@ -910,21 +910,22 @@</p>
<pre>    ops.append(operator.div)
for op in ops:
    for inst in (b, ytq, ndf, yta, nda, loq):</pre>
<ul><li><p>yield op_comparison, op, a, inst, YTASubclass</p></li></ul>
<p>+            op_comparison(op, a, inst, YTASubclass)</p>
<ul><li><p>yield op_comparison, op, ytq, nda, YTArray</p></li>
<li><p>yield op_comparison, op, ytq, yta, YTArray</p></li></ul>
<p>+        op_comparison(op, ytq, nda, YTArray) +        op_comparison(op, ytq, yta, YTArray)</p>
<pre>for op in (operator.add, operator.sub):</pre>
<ul><li><p>yield op_comparison, op, nu, nda, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, b, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, yta, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, loq, YTASubclass</p></li></ul>
<p>+        op_comparison(op, nu, nda, YTASubclass) +        op_comparison(op, a, b, YTASubclass) +        op_comparison(op, a, yta, YTASubclass) +        op_comparison(op, a, loq, YTASubclass)</p>
<ul><li><p>yield assert_isinstance, a[0], YTQuantity</p></li>
<li><p>yield assert_isinstance, a[:], YTASubclass</p></li>
<li><p>yield assert_isinstance, a[:2], YTASubclass</p></li></ul>
<p>– +    assert_isinstance(a[0], YTQuantity) +    assert_isinstance(a[:], YTASubclass) +    assert_isinstance(a[:2], YTASubclass) +    assert_isinstance(YTASubclass(yta), YTASubclass) +</p>
<pre>def test_h5_io():
    tmpdir = tempfile.mkdtemp()
    curdir = os.getcwd()</pre>
<p>diff -r a776e67368c5629296b1e365dfca0b68b41ef1d5 -r 0c1d2aceba78e05e78b7d9e85c9022b16e2344f2 yt/units/yt_array.py --- a/yt/units/yt_array.py +++ b/yt/units/yt_array.py @@ -333,7 +333,7 @@</p>
<pre>    obj.units.registry = registry
return obj
         if input_array is NotImplemented:</pre>
<ul><li><p>return input_array</p></li></ul>
<p>+            return input_array.view(cls)</p>
<pre>         if registry is None and isinstance(input_units, (str, bytes)):
if input_units.startswith('code_'):
    raise UnitParseError(</pre>
<p>@@ -352,7 +352,7 @@</p>
<pre>    input_array.units = input_units
else:
    input_array.units = Unit(input_units, registry=registry)</pre>
<ul><li><p>return input_array</p></li></ul>
<p>+            return input_array.view(cls)</p>
<pre>         elif isinstance(input_array, np.ndarray):
pass
         elif iterable(input_array) and input_array:</pre>
<p>@@ -885,12 +885,12 @@</p>
<pre>"""
ro = sanitize_units_add(self, right_object, "addition")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__add__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__add__(ro)</p>
<pre>def __radd__(self, left_object):
    """ See __add__. """
    lo = sanitize_units_add(self, left_object, "addition")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__radd__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__radd__(lo)</p>
<pre>def __iadd__(self, other):
    """ See __add__. """</pre>
<p>@@ -905,12 +905,12 @@</p>
<pre>"""
ro = sanitize_units_add(self, right_object, "subtraction")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__sub__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__sub__(ro)</p>
<pre>def __rsub__(self, left_object):
    """ See __sub__. """
    lo = sanitize_units_add(self, left_object, "subtraction")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rsub__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rsub__(lo)</p>
<pre>def __isub__(self, other):
    """ See __sub__. """</pre>
<p>@@ -920,11 +920,11 @@</p>
<pre>def __neg__(self):
    """ Negate the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__neg__())</p></li></ul>
<p>+        return super(YTArray, self).__neg__()</p>
<pre>def __pos__(self):
    """ Posify the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__pos__(), self.units)</p></li></ul>
<p>+        return type(self)(super(YTArray, self).__pos__(), self.units)</p>
<pre>def __mul__(self, right_object):
    """</pre>
<p>@@ -933,12 +933,12 @@</p>
<pre>"""
ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__mul__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__mul__(ro)</p>
<pre>def __rmul__(self, left_object):
    """ See __mul__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rmul__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rmul__(lo)</p>
<pre>def __imul__(self, other):
    """ See __mul__. """</pre>
<p>@@ -952,12 +952,12 @@</p>
<pre>"""
ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__div__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__div__(ro)</p>
<pre>def __rdiv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rdiv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rdiv__(lo)</p>
<pre>def __idiv__(self, other):
    """ See __div__. """</pre>
<p>@@ -967,12 +967,12 @@</p>
<pre>def __truediv__(self, right_object):
    ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__truediv__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__truediv__(ro)</p>
<pre>def __rtruediv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rtruediv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rtruediv__(lo)</p>
<pre>def __itruediv__(self, other):
    """ See __div__. """</pre>
<p>@@ -982,12 +982,12 @@</p>
<pre>def __floordiv__(self, right_object):
    ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__floordiv__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__floordiv__(ro)</p>
<pre>def __rfloordiv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rfloordiv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rfloordiv__(lo)</p>
<pre>def __ifloordiv__(self, other):
    """ See __div__. """</pre>
<p>@@ -995,32 +995,31 @@</p>
<pre>        np.floor_divide(self, oth, out=self)
        return self
</pre>
<ul><li><p>#Should these raise errors?  I need to come back and check this. def __or__(self, right_object):</p></li>
<li><p>return YTArray(super(YTArray, self).__or__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__or__(right_object)</p>
<pre>def __ror__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__ror__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__ror__(left_object)</p>
<pre>    def __ior__(self, other):
        np.bitwise_or(self, other, out=self)
        return self

    def __xor__(self, right_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__xor__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__xor__(right_object)</p>
<pre>def __rxor__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rxor__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__rxor__(left_object)</p>
<pre>    def __ixor__(self, other):
        np.bitwise_xor(self, other, out=self)
        return self

    def __and__(self, right_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__and__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__and__(right_object)</p>
<pre>def __rand__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rand__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__rand__(left_object)</p>
<pre>def __iand__(self, other):
    np.bitwise_and(self, other, out=self)</pre>
<p>@@ -1047,13 +1046,13 @@</p>
<pre>         # dimensionless Unit object.
         if self.units.is_dimensionless and power == -1:
ret = super(YTArray, self).__pow__(power)</pre>
<ul><li><p>return YTArray(ret, input_units='')</p></li></ul>
<p>+            return type(self)(ret, input_units='')</p>
<ul><li><p>return YTArray(super(YTArray, self).__pow__(power))</p></li></ul>
<p>+        return super(YTArray, self).__pow__(power)</p>
<pre>def __abs__(self):
    """ Return a YTArray with the abs of the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__abs__())</p></li></ul>
<p>+        return super(YTArray, self).__abs__()</p>
<pre>def sqrt(self):
    """</pre>
<p>@@ -1061,18 +1060,17 @@</p>
<pre>        take the 1/2 power of the units.

        """</pre>
<ul><li><p>return YTArray(super(YTArray, self).sqrt(),</p></li>
<li><p>input_units=self.units**0.5)</p></li></ul>
<p>+        return type(self)(super(YTArray, self).sqrt(), +                          input_units=self.units**0.5)</p>
<pre>    #
    # Start comparison operators.
    #
</pre>
<ul><li><p># @todo: outsource to a single method with an op argument.</p></li></ul>
<p>–</p>
<pre>def __lt__(self, other):
    """ Test if this is less than the object on the right. """</pre>
<ul><li><p>oth = validate_comparison_units(self, other, ‘less_than’) # converts if possible</p></li></ul>
<p>+        # converts if possible +        oth = validate_comparison_units(self, other, ‘less_than’)</p>
<pre>        return super(YTArray, self).__lt__(oth)

    def __le__(self, other):</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/a98dd29e4e93/">https://bitbucket.org/yt_analysis/yt/commits/a98dd29e4e93/</a> Changeset:   a98dd29e4e93 Branch:      yt User:        xarthisius Date:        2016-03-30 18:27:25+00:00 Summary:     Merged in ngoldbaum/yt (pull request #2083)</p>
<p>Ensure instances of subclasses of YTArray have the correct type. Closes #1197. Affected #:  2 files</p>
<p>diff -r c9a19dd7d6e63996b30850bf9660203d64e6b5b8 -r a98dd29e4e93fef8002811e9e05e34810574b9cd yt/units/tests/test_ytarray.py --- a/yt/units/tests/test_ytarray.py +++ b/yt/units/tests/test_ytarray.py @@ -541,17 +541,17 @@</p>
<pre>    a = YTArray(range(10), 'cm')
    b = YTQuantity(5, 'g')
</pre>
<ul><li><p>yield assert_isinstance, a*b, YTArray</p></li>
<li><p>yield assert_isinstance, b*a, YTArray</p></li></ul>
<p>+    assert_isinstance(a*b, YTArray) +    assert_isinstance(b*a, YTArray)</p>
<ul><li><p>yield assert_isinstance, a/b, YTArray</p></li>
<li><p>yield assert_isinstance, b/a, YTArray</p></li></ul>
<p>+    assert_isinstance(a/b, YTArray) +    assert_isinstance(b/a, YTArray)</p>
<ul><li><p>yield assert_isinstance, a*a, YTArray</p></li>
<li><p>yield assert_isinstance, a/a, YTArray</p></li></ul>
<p>+    assert_isinstance(a*a, YTArray) +    assert_isinstance(a/a, YTArray)</p>
<ul><li><p>yield assert_isinstance, b*b, YTQuantity</p></li>
<li><p>yield assert_isinstance, b/b, YTQuantity</p></li></ul>
<p>+    assert_isinstance(b*b, YTQuantity) +    assert_isinstance(b/b, YTQuantity)</p>
<pre>def test_selecting():</pre>
<p>@@ -910,21 +910,22 @@</p>
<pre>    ops.append(operator.div)
for op in ops:
    for inst in (b, ytq, ndf, yta, nda, loq):</pre>
<ul><li><p>yield op_comparison, op, a, inst, YTASubclass</p></li></ul>
<p>+            op_comparison(op, a, inst, YTASubclass)</p>
<ul><li><p>yield op_comparison, op, ytq, nda, YTArray</p></li>
<li><p>yield op_comparison, op, ytq, yta, YTArray</p></li></ul>
<p>+        op_comparison(op, ytq, nda, YTArray) +        op_comparison(op, ytq, yta, YTArray)</p>
<pre>for op in (operator.add, operator.sub):</pre>
<ul><li><p>yield op_comparison, op, nu, nda, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, b, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, yta, YTASubclass</p></li>
<li><p>yield op_comparison, op, a, loq, YTASubclass</p></li></ul>
<p>+        op_comparison(op, nu, nda, YTASubclass) +        op_comparison(op, a, b, YTASubclass) +        op_comparison(op, a, yta, YTASubclass) +        op_comparison(op, a, loq, YTASubclass)</p>
<ul><li><p>yield assert_isinstance, a[0], YTQuantity</p></li>
<li><p>yield assert_isinstance, a[:], YTASubclass</p></li>
<li><p>yield assert_isinstance, a[:2], YTASubclass</p></li></ul>
<p>– +    assert_isinstance(a[0], YTQuantity) +    assert_isinstance(a[:], YTASubclass) +    assert_isinstance(a[:2], YTASubclass) +    assert_isinstance(YTASubclass(yta), YTASubclass) +</p>
<pre>def test_h5_io():
    tmpdir = tempfile.mkdtemp()
    curdir = os.getcwd()</pre>
<p>diff -r c9a19dd7d6e63996b30850bf9660203d64e6b5b8 -r a98dd29e4e93fef8002811e9e05e34810574b9cd yt/units/yt_array.py --- a/yt/units/yt_array.py +++ b/yt/units/yt_array.py @@ -333,7 +333,7 @@</p>
<pre>    obj.units.registry = registry
return obj
         if input_array is NotImplemented:</pre>
<ul><li><p>return input_array</p></li></ul>
<p>+            return input_array.view(cls)</p>
<pre>         if registry is None and isinstance(input_units, (str, bytes)):
if input_units.startswith('code_'):
    raise UnitParseError(</pre>
<p>@@ -352,7 +352,7 @@</p>
<pre>    input_array.units = input_units
else:
    input_array.units = Unit(input_units, registry=registry)</pre>
<ul><li><p>return input_array</p></li></ul>
<p>+            return input_array.view(cls)</p>
<pre>         elif isinstance(input_array, np.ndarray):
pass
         elif iterable(input_array) and input_array:</pre>
<p>@@ -885,12 +885,12 @@</p>
<pre>"""
ro = sanitize_units_add(self, right_object, "addition")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__add__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__add__(ro)</p>
<pre>def __radd__(self, left_object):
    """ See __add__. """
    lo = sanitize_units_add(self, left_object, "addition")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__radd__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__radd__(lo)</p>
<pre>def __iadd__(self, other):
    """ See __add__. """</pre>
<p>@@ -905,12 +905,12 @@</p>
<pre>"""
ro = sanitize_units_add(self, right_object, "subtraction")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__sub__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__sub__(ro)</p>
<pre>def __rsub__(self, left_object):
    """ See __sub__. """
    lo = sanitize_units_add(self, left_object, "subtraction")</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rsub__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rsub__(lo)</p>
<pre>def __isub__(self, other):
    """ See __sub__. """</pre>
<p>@@ -920,11 +920,11 @@</p>
<pre>def __neg__(self):
    """ Negate the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__neg__())</p></li></ul>
<p>+        return super(YTArray, self).__neg__()</p>
<pre>def __pos__(self):
    """ Posify the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__pos__(), self.units)</p></li></ul>
<p>+        return type(self)(super(YTArray, self).__pos__(), self.units)</p>
<pre>def __mul__(self, right_object):
    """</pre>
<p>@@ -933,12 +933,12 @@</p>
<pre>"""
ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__mul__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__mul__(ro)</p>
<pre>def __rmul__(self, left_object):
    """ See __mul__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rmul__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rmul__(lo)</p>
<pre>def __imul__(self, other):
    """ See __mul__. """</pre>
<p>@@ -952,12 +952,12 @@</p>
<pre>"""
ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__div__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__div__(ro)</p>
<pre>def __rdiv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rdiv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rdiv__(lo)</p>
<pre>def __idiv__(self, other):
    """ See __div__. """</pre>
<p>@@ -967,12 +967,12 @@</p>
<pre>def __truediv__(self, right_object):
    ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__truediv__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__truediv__(ro)</p>
<pre>def __rtruediv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rtruediv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rtruediv__(lo)</p>
<pre>def __itruediv__(self, other):
    """ See __div__. """</pre>
<p>@@ -982,12 +982,12 @@</p>
<pre>def __floordiv__(self, right_object):
    ro = sanitize_units_mul(self, right_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__floordiv__(ro))</p></li></ul>
<p>+        return super(YTArray, self).__floordiv__(ro)</p>
<pre>def __rfloordiv__(self, left_object):
    """ See __div__. """
    lo = sanitize_units_mul(self, left_object)</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rfloordiv__(lo))</p></li></ul>
<p>+        return super(YTArray, self).__rfloordiv__(lo)</p>
<pre>def __ifloordiv__(self, other):
    """ See __div__. """</pre>
<p>@@ -995,32 +995,31 @@</p>
<pre>        np.floor_divide(self, oth, out=self)
        return self
</pre>
<ul><li><p>#Should these raise errors?  I need to come back and check this. def __or__(self, right_object):</p></li>
<li><p>return YTArray(super(YTArray, self).__or__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__or__(right_object)</p>
<pre>def __ror__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__ror__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__ror__(left_object)</p>
<pre>    def __ior__(self, other):
        np.bitwise_or(self, other, out=self)
        return self

    def __xor__(self, right_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__xor__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__xor__(right_object)</p>
<pre>def __rxor__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rxor__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__rxor__(left_object)</p>
<pre>    def __ixor__(self, other):
        np.bitwise_xor(self, other, out=self)
        return self

    def __and__(self, right_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__and__(right_object))</p></li></ul>
<p>+        return super(YTArray, self).__and__(right_object)</p>
<pre>def __rand__(self, left_object):</pre>
<ul><li><p>return YTArray(super(YTArray, self).__rand__(left_object))</p></li></ul>
<p>+        return super(YTArray, self).__rand__(left_object)</p>
<pre>def __iand__(self, other):
    np.bitwise_and(self, other, out=self)</pre>
<p>@@ -1047,13 +1046,13 @@</p>
<pre>         # dimensionless Unit object.
         if self.units.is_dimensionless and power == -1:
ret = super(YTArray, self).__pow__(power)</pre>
<ul><li><p>return YTArray(ret, input_units='')</p></li></ul>
<p>+            return type(self)(ret, input_units='')</p>
<ul><li><p>return YTArray(super(YTArray, self).__pow__(power))</p></li></ul>
<p>+        return super(YTArray, self).__pow__(power)</p>
<pre>def __abs__(self):
    """ Return a YTArray with the abs of the data. """</pre>
<ul><li><p>return YTArray(super(YTArray, self).__abs__())</p></li></ul>
<p>+        return super(YTArray, self).__abs__()</p>
<pre>def sqrt(self):
    """</pre>
<p>@@ -1061,18 +1060,17 @@</p>
<pre>        take the 1/2 power of the units.

        """</pre>
<ul><li><p>return YTArray(super(YTArray, self).sqrt(),</p></li>
<li><p>input_units=self.units**0.5)</p></li></ul>
<p>+        return type(self)(super(YTArray, self).sqrt(), +                          input_units=self.units**0.5)</p>
<pre>    #
    # Start comparison operators.
    #
</pre>
<ul><li><p># @todo: outsource to a single method with an op argument.</p></li></ul>
<p>–</p>
<pre>def __lt__(self, other):
    """ Test if this is less than the object on the right. """</pre>
<ul><li><p>oth = validate_comparison_units(self, other, ‘less_than’) # converts if possible</p></li></ul>
<p>+        # converts if possible +        oth = validate_comparison_units(self, other, ‘less_than’)</p>
<pre>        return super(YTArray, self).__lt__(oth)

    def __le__(self, other):</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27CyapFx7rxn4t1xT9ybNiEbMiLR8V0GxzKJEfVgMOenSu66a8oD-2Bwp6jWtn8H4QpK2M1mwAo8wmsMksgiSTu95NdTf8P9D6SABJU0gbysxZsma5YCLblstqCOLQi3hfVHarYIhKh-2B9yeaBVA4I7F0eRwo8-2BNkfc3c0dRSxsXHFLw5XnokzhCgS6K31oi62jUhE-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>