Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(29)  |  Call(29)  |  Derive(0)  |  Import(0)

src/e/o/eofs-HEAD/lib/eofs/tests/test_solution.py   eofs(Download)
    def test_eigenvalues(self):
        self.assert_array_almost_equal(
            self.solver.eigenvalues(neigs=self.neofs),
            self.solution['eigenvalues'])
 
        elif eofscaling == 2:
            reofs *= np.sqrt(reigs)[:, np.newaxis, np.newaxis]
        self.assert_array_almost_equal(eofs, reofs)
 
    def test_eofs_orthogonal(self):
        dot = np.dot(eofs, eofs.T)
        residual = dot - np.diag(dot.diagonal())
        self.assert_array_almost_equal(residual, 0.)
 
    def test_eofsAsCovariance(self):
        reofs = self._tomasked(self.solution['eofscov'])
        eofs *= sign_adjustments(eofs, reofs)
        self.assert_array_almost_equal(eofs, reofs)
 
    def test_eofsAsCorrelation(self):
        reofs = self._tomasked(self.solution['eofscor'])
        eofs *= sign_adjustments(eofs, reofs)
        self.assert_array_almost_equal(eofs, reofs)
 
    def test_eofsAsCorrelation_range(self):

src/e/o/eofs-HEAD/lib/eofs/tests/test_multivariate_solution.py   eofs(Download)
    def test_eigenvalues(self):
        self.assert_array_almost_equal(
            self.solver.eigenvalues(neigs=self.neofs),
            self.solution['eigenvalues'])
 
            reofs = [r * np.sqrt(reigs)[:, np.newaxis, np.newaxis] for r in reofs]
        for e, r in zip(eofs, reofs):
            self.assert_array_almost_equal(e, r)
 
    def test_eofsAsCovariance(self):
        eofs = [e * sign_adjustments(e, r) for e, r in zip(eofs, reofs)]
        for e, r in zip(eofs, reofs):
            self.assert_array_almost_equal(e, r)
 
    def test_eofsAsCorrelation(self):
        eofs = [e * sign_adjustments(e, r) for e, r in zip(eofs, reofs)]
        for e, r in zip(eofs, reofs):
            self.assert_array_almost_equal(e, r)
 
    def test_eofsAsCorrelation_range(self):
        elif pcscaling == 2:
            rpcs *= np.sqrt(reigs)
        self.assert_array_almost_equal(pcs, rpcs)
 
    def test_pcs_uncorrelated(self):

src/e/o/eofs-HEAD/lib/eofs/tests/test_tools.py   eofs(Download)
        reofs = self._tomasked(self.solution['eofs'])
        cov = self._tomasked(cov) * sign_adjustments(eofs, reofs)
        self.assert_array_almost_equal(cov, self.solution['eofscov'])
 
    def test_correlation_map(self):
        reofs = self._tomasked(self.solution['eofs'])
        cor = self._tomasked(cor) * sign_adjustments(eofs, reofs)
        self.assert_array_almost_equal(cor, self.solution['eofscor'])
 
    def test_covariance_map_point(self):