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

# eofs.tests.EofsTest.assert_array_almost_equal

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

```    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'])
self.assert_array_almost_equal(eofs, reofs)

def test_eofsAsCorrelation(self):
```
```        reofs = self._tomasked(self.solution['eofscor'])
self.assert_array_almost_equal(eofs, reofs)

def test_eofsAsCorrelation_range(self):
```

```    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):
```

```        reofs = self._tomasked(self.solution['eofs'])
```        reofs = self._tomasked(self.solution['eofs'])