4c08f6a92d547a3308164499ec92d35254ed1da5,scipy/stats/tests/test_multivariate.py,TestUnitaryGroup,test_haar,#TestUnitaryGroup#,1436

Before Change


        eigs = np.vstack(scipy.linalg.eigvals(x) for x in xs)
        x = np.arctan(eigs.imag/eigs.real)

        h = np.histogram(x.flatten())[0]

        // The angles "x" of the eigenvalues should be uniformly distributed
        // We are not checking that the range is correct; maybe we should?
        // Overall this seems to be a necessary but weak test of the distribution.

After Change


        // Overall this seems to be a necessary but weak test of the distribution.
        eigs = np.vstack(scipy.linalg.eigvals(x) for x in xs)
        x = np.arctan2(eigs.imag, eigs.real)
        res = kstest(x.ravel(),
                     lambda x: uniform(0, 2*np.pi).cdf(x + np.pi))
        // Note that this should be uniform(-pi, pi), but uniform"s
        // range can"t seem to include 0 as an interior point
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: scipy/scipy
Commit Name: 4c08f6a92d547a3308164499ec92d35254ed1da5
Time: 2017-02-24
Author: philip_deboer@scotiacapital.com
File Name: scipy/stats/tests/test_multivariate.py
Class Name: TestUnitaryGroup
Method Name: test_haar


Project Name: NifTK/NiftyNet
Commit Name: 141cb21fec5b5557a800cb2131e463b92913985a
Time: 2017-07-18
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/misc_common.py
Class Name:
Method Name: otsu_threshold


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 66268ffdc847e64216114871bd4169ad7872966a
Time: 2019-04-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/pyNN_target_sim.py
Class Name: SNN
Method Name: simulate


Project Name: scikit-image/scikit-image
Commit Name: b0b629c6be895dd6b301643daf5a3473ca28a714
Time: 2016-08-24
Author: juan.n@unimelb.edu.au
File Name: skimage/morphology/watershed.py
Class Name:
Method Name: watershed