[SciPy-user] Issues building from source on windows (SVN)

Ryan Krauss ryanlists at gmail.com
Mon May 21 22:34:48 EDT 2007


Is there an easy way to test every package except ndimage?  Because it
fails and completely crashes Python, I don't know any tests that run
after ndimage also fail.

On 5/21/07, Robert Kern <robert.kern at gmail.com> wrote:
> Ryan Krauss wrote:
> > generic filter 1 ... ERROR
> > generic 1d filter 1
>
> It looks like the problem is in scipy.ndimage:
>
>     def test_generic_filter1d01(self):
>         "generic 1d filter 1"
>         weights = numpy.array([1.1, 2.2, 3.3])
>         def _filter_func(input, output, fltr, total):
>             fltr = fltr / total
>             for ii in range(input.shape[0] - 2):
>                 output[ii] = input[ii] * fltr[0]
>                 output[ii] += input[ii + 1] * fltr[1]
>                 output[ii] += input[ii + 2] * fltr[2]
>         for type in self.types:
>             a = numpy.arange(12, dtype = type)
>             a.shape = (3,4)
>             r1 = ndimage.correlate1d(a, weights / weights.sum(), 0,
>                                               origin = -1)
>             r2 = ndimage.generic_filter1d(a, _filter_func, 3,
>                       axis = 0, origin = -1, extra_arguments = (weights,),
>                       extra_keywords = {'total': weights.sum()})
>             self.failUnless(diff(r1, r2) < eps)
>
>
> If you don't need scipy.ndimage for your class, ignore the error. You can test
> the other package independently like so:
>
> >>> from numpy import NumpyTest
> >>> t = NumpyTest('scipy.ndimage')
> >>> t.test(1, 2)
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>  that is made terrible by our own mad attempt to interpret it as though it had
>  an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list