<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 30, 2013 at 6:37 PM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Mon, Sep 30, 2013 at 6:13 PM, Christoph Gohlke <span dir="ltr"><<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On 9/30/2013 4:44 PM, Julian Taylor wrote:<br>
> On 01.10.2013 01:30, Charles R Harris wrote:<br>
>><br>
>><br>
>><br>
>> On Mon, Sep 30, 2013 at 5:12 PM, Christoph Gohlke <<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a><br>
>> <mailto:<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a>>> wrote:<br>
>><br>
>>      On 9/30/2013 3:45 PM, Charles R Harris wrote:<br>
>>      ><br>
>>      ><br>
>>      ><br>
>>      > On Mon, Sep 30, 2013 at 3:51 PM, Christoph Gohlke <<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a><br>
>>      <mailto:<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a>><br>
>>      > <mailto:<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a> <mailto:<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a>>>> wrote:<br>
>>      ><br>
>>      ><br>
>>      ><br>
>>      >     On 9/30/2013 11:02 AM, Nathaniel Smith wrote:> Everyone please do<br>
>>      >     actually test this! It is really in your best<br>
>>      >     > interest, and I think people don't always realize this.<br>
>>      >     ><br>
>>      >     > Here's how it works:<br>
>>      >     > - If you test it *now*, and it breaks your code that worked<br>
>>      with 1.7,<br>
>>      >     > and you *tell* us this now, then it's *our* problem and we<br>
>>      hold up the<br>
>>      >     > release to fix the bug.<br>
>>      >     > - If you test it *after* we release, and it breaks your<br>
>>      code, then we<br>
>>      >     > are sad but you have to work around it (because we can't<br>
>>      magically<br>
>>      >     > make that release not have happened, your users will be using it<br>
>>      >     > anyway), and we put it on the stack with all the other bugs.<br>
>>      All of<br>
>>      >     > which we care about but it's a large enough stack that it's<br>
>>      not going<br>
>>      >     > to get any special priority, because, see above about how at<br>
>>      this<br>
>>      >     > point you'll have had to work around it anyway.<br>
>>      >     ><br>
>>      >     > -n<br>
>>      >     ><br>
>>      >     > On Mon, Sep 30, 2013 at 4:17 PM, Charles R Harris<br>
>>      >     > <<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a><br>
>>      <mailto:<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>> <mailto:<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a><br>

>>      <mailto:<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>>>> wrote:<br>
>>      >     >> Hi All,<br>
>>      >     >><br>
>>      >     >> NumPy 1.8.0rc1 is up now on sourceforge .The binary builds<br>
>>      are included<br>
>>      >     >> except for Python 3.3 on windows, which will arrive later.<br>
>>      Many thanks to<br>
>>      >     >> Ralf for the binaries, and to those who found and fixed the<br>
>>      bugs in the last<br>
>>      >     >> beta. Any remaining bugs are all my fault ;) I hope this<br>
>>      will be the last<br>
>>      >     >> release before final, so please test it thoroughly.<br>
>>      >     >><br>
>>      >     >> Chuck<br>
>>      ><br>
>>      ><br>
>>      >     Hello,<br>
>>      ><br>
>>      >     NumPy 1.8.0rc1 looks good. All tests pass on Windows and most<br>
>>      3rd party<br>
>>      >     packages test OK now. Thank you.<br>
>>      ><br>
>>      >     A few tests still fail in the following packages when run with<br>
>>      >     numpy-MKL-1.8.0rc1-win-amd64-py3.3 compared to<br>
>>      >     numpy-MKL-1.7.1-win-amd64-py3.3:<br>
>>      ><br>
>>      >     1) Pandas 0.12.0<br>
>>      ><br>
>>      >     ```<br>
>>      ><br>
>>      ======================================================================<br>
>>      >     FAIL: test_nansum_buglet (pandas.tests.test_series.TestNanops)<br>
>>      ><br>
>>      ----------------------------------------------------------------------<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\pandas\tests\test_series.py",<br>
>>      >     line 254, in test_nansum_buglet<br>
>>      >           assert_almost_equal(result, 1)<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\pandas\util\testing.py", line<br>
>>      >     134, in assert_almost_equal<br>
>>      >           np.testing.assert_(isiterable(b))<br>
>>      >         File<br>
>>      "D:\Dev\Compile\Test\numpy-build\numpy\testing\utils.py", line<br>
>>      >     44, in assert_<br>
>>      >           raise AssertionError(msg)<br>
>>      >     AssertionError<br>
>>      >     ```<br>
>>      ><br>
>>      >     Possibly related:<br>
>>      ><br>
>>      >     ```<br>
>>      >     >>> import numpy as np<br>
>>      >     >>> from pandas import Series<br>
>>      >     >>> s = Series([0.0])<br>
>>      >     >>> result = np.nansum(s)<br>
>>      >     >>> print(result)<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File "<stdin>", line 1, in <module><br>
>>      >         File "X:\Python33\lib\site-packages\pandas\core\base.py", line<br>
>>      >     19, in<br>
>>      >     __str__<br>
>>      >           return self.__unicode__()<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\pandas\core\series.py", line<br>
>>      >     1115, in __unicode__<br>
>>      >           length=len(self) > 50,<br>
>>      >     TypeError: len() of unsized object<br>
>>      >     ```<br>
>>      ><br>
>>      >     2) Bottleneck 0.7.0<br>
>>      ><br>
>>      ><br>
>>      <a href="https://github.com/kwgoodman/bottleneck/issues/71#issuecomment-25331701" target="_blank">https://github.com/kwgoodman/bottleneck/issues/71#issuecomment-25331701</a><br>
>>      ><br>
>>      >     3) skimage 0.8.2<br>
>>      ><br>
>>      >     These tests passed with numpy 1.8.0b2:<br>
>>      ><br>
>>      >     ```<br>
>>      ><br>
>>      ======================================================================<br>
>>      >     FAIL: test_grey.test_non_square_image<br>
>>      ><br>
>>      ----------------------------------------------------------------------<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File "X:\Python33\lib\site-packages\nose\case.py", line<br>
>>      198, in<br>
>>      >     runTest<br>
>>      >           self.test(*self.arg)<br>
>>      >         File<br>
>>      ><br>
>>      "X:\Python33\lib\site-packages\skimage\morphology\tests\test_grey.py",<br>
>>      >     line 162, in test_non_square_image<br>
>>      >           testing.assert_array_equal(binary_res, grey_res)<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     718, in assert_array_equal<br>
>>      >           verbose=verbose, header='Arrays are not equal')<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     644, in assert_array_compare<br>
>>      >           raise AssertionError(msg)<br>
>>      >     AssertionError:<br>
>>      >     Arrays are not equal<br>
>>      ><br>
>>      >     (mismatch 50.6328125%)<br>
>>      >        x: array([[False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],...<br>
>>      >        y: array([[ True,  True,  True, ...,  True, False, False],<br>
>>      >              [ True,  True,  True, ..., False, False, False],<br>
>>      >              [ True,  True,  True, ..., False, False, False],...<br>
>>      ><br>
>>      ><br>
>>      ======================================================================<br>
>>      >     FAIL: test_grey.test_binary_erosion<br>
>>      ><br>
>>      ----------------------------------------------------------------------<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File "X:\Python33\lib\site-packages\nose\case.py", line<br>
>>      198, in<br>
>>      >     runTest<br>
>>      >           self.test(*self.arg)<br>
>>      >         File<br>
>>      ><br>
>>      "X:\Python33\lib\site-packages\skimage\morphology\tests\test_grey.py",<br>
>>      >     line 169, in test_binary_erosion<br>
>>      >           testing.assert_array_equal(binary_res, grey_res)<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     718, in assert_array_equal<br>
>>      >           verbose=verbose, header='Arrays are not equal')<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     644, in assert_array_compare<br>
>>      >           raise AssertionError(msg)<br>
>>      >     AssertionError:<br>
>>      >     Arrays are not equal<br>
>>      ><br>
>>      >     (mismatch 48.260498046875%)<br>
>>      >        x: array([[False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],...<br>
>>      >        y: array([[ True,  True,  True, ...,  True, False, False],<br>
>>      >              [ True,  True,  True, ..., False, False, False],<br>
>>      >              [ True,  True,  True, ..., False, False, False],...<br>
>>      ><br>
>>      ><br>
>>      ======================================================================<br>
>>      >     FAIL: test_grey.test_binary_closing<br>
>>      ><br>
>>      ----------------------------------------------------------------------<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File "X:\Python33\lib\site-packages\nose\case.py", line<br>
>>      198, in<br>
>>      >     runTest<br>
>>      >           self.test(*self.arg)<br>
>>      >         File<br>
>>      ><br>
>>      "X:\Python33\lib\site-packages\skimage\morphology\tests\test_grey.py",<br>
>>      >     line 183, in test_binary_closing<br>
>>      >           testing.assert_array_equal(binary_res, grey_res)<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     718, in assert_array_equal<br>
>>      >           verbose=verbose, header='Arrays are not equal')<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     644, in assert_array_compare<br>
>>      >           raise AssertionError(msg)<br>
>>      >     AssertionError:<br>
>>      >     Arrays are not equal<br>
>>      ><br>
>>      >     (mismatch 66.302490234375%)<br>
>>      >        x: array([[False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],...<br>
>>      >        y: array([[ True,  True,  True, ...,  True,  True,  True],<br>
>>      >              [ True,  True,  True, ...,  True,  True,  True],<br>
>>      >              [ True,  True,  True, ..., False, False, False],...<br>
>>      ><br>
>>      ><br>
>>      ======================================================================<br>
>>      >     FAIL: test_grey.test_binary_opening<br>
>>      ><br>
>>      ----------------------------------------------------------------------<br>
>>      >     Traceback (most recent call last):<br>
>>      >         File "X:\Python33\lib\site-packages\nose\case.py", line<br>
>>      198, in<br>
>>      >     runTest<br>
>>      >           self.test(*self.arg)<br>
>>      >         File<br>
>>      ><br>
>>      "X:\Python33\lib\site-packages\skimage\morphology\tests\test_grey.py",<br>
>>      >     line 190, in test_binary_opening<br>
>>      >           testing.assert_array_equal(binary_res, grey_res)<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     718, in assert_array_equal<br>
>>      >           verbose=verbose, header='Arrays are not equal')<br>
>>      >         File<br>
>>      "X:\Python33\lib\site-packages\numpy\testing\utils.py", line<br>
>>      >     644, in assert_array_compare<br>
>>      >           raise AssertionError(msg)<br>
>>      >     AssertionError:<br>
>>      >     Arrays are not equal<br>
>>      ><br>
>>      >     (mismatch 58.465576171875%)<br>
>>      >        x: array([[False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],<br>
>>      >              [False, False, False, ..., False, False, False],...<br>
>>      >        y: array([[ True,  True,  True, ...,  True,  True, False],<br>
>>      >              [ True,  True,  True, ...,  True,  True, False],<br>
>>      >              [ True,  True,  True, ..., False, False, False],...<br>
>>      >     ```<br>
>>      ><br>
>>      > I'll bet the skimage problems come from<br>
>>      > <a href="https://github.com/numpy/numpy/pull/3811" target="_blank">https://github.com/numpy/numpy/pull/3811</a>. They may be doing something<br>
>>      > naughty...<br>
>>      ><br>
>>      > Chuck<br>
>>      ><br>
>><br>
>>      A bool image is convolved with a uint8 kernel and the result compared<br>
>>      for equality with an uint32 scalar...<br>
>><br>
>>      <a href="https://github.com/scikit-image/scikit-image/blob/master/skimage/morphology/binary.py#L32" target="_blank">https://github.com/scikit-image/scikit-image/blob/master/skimage/morphology/binary.py#L32</a><br>


>><br>
>><br>
>> Looks like the result of the convolution is probably output as a bool,<br>
>> which now means 0,1, which does not work when checking equality with the<br>
>> number of pixels in the kernel. I'd call expressing the result of a<br>
>> convolution as a boolean very naughty.<br>
><br>
> using a view should fix it:<br>
> conv = ndimage.convolve((image > 0).view(np.uint8), selem, output=out,<br>
>                              mode='constant', cval=1)<br>
> but it needs check for sum(selem) < 255 too.<br>
<br>
</div></div>I opened an issue at<br>
<<a href="https://github.com/scikit-image/scikit-image/issues/745" target="_blank">https://github.com/scikit-image/scikit-image/issues/745</a>><br>
<span><font color="#888888"><br></font></span></blockquote><div><br></div></div></div><div>The errors in skimage for Python 2.7 are also present for numpy 1.7.1. Maybe I'm missing some dependencies? A bunch of tests are skipped for Python 3.3 and I suspect the failing tests are among them.<br>

<br></div></div></div></div></blockquote><div><br></div><div>The pandas test passes for current pandas dev, so it looks like a bug on their end that has been taken care of.<br><br>test_nansum_buglet (__main__.TestNanops) ... ok<br>
<br></div><div>Chuck <br></div></div></div></div>