Skip to content

Commit

Permalink
refactor!: reorganize methods into new namespaces (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicrie authored Sep 2, 2024
1 parent 7505350 commit 675983f
Show file tree
Hide file tree
Showing 302 changed files with 4,951 additions and 3,059 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Provide a concise Python code snippet that demonstrates the issue. To display th
```python
import xeofs as xe

model = xe.models.EOF()
model = xe.single.EOF()
...
```

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Provide a concise Python code snippet that demonstrates your approach. To displa
```python
import xeofs as xe

model = xe.models.EOF()
model = xe.single.EOF()
...
```

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Personal
.vscode/
# Test related to CCA
tests/models/test_cca_solution.py
tests/**/test_cca_solution.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ In order to get started with `xeofs`, follow these simple steps:
Initiate and fit the EOF/PCA model to the data

```python
>>> eof = xe.models.EOF(n_modes=10)
>>> eof = xe.single.EOF(n_modes=10)
>>> eof.fit(t2m, dim="time") # doctest: +ELLIPSIS
<xeofs.models.eof.EOF object at ...>
<xeofs.single.eof.EOF object at ...>

```
Now, you can access the model's EOF components and PC scores:
Expand All @@ -77,9 +77,9 @@ Now, you can access the model's EOF components and PC scores:
Initiate and fit an `EOFRotator` class to the model to obtain a varimax-rotated EOF analysis

```python
>>> rotator = xe.models.EOFRotator(n_modes=3)
>>> rotator = xe.single.EOFRotator(n_modes=3)
>>> rotator.fit(eof) # doctest: +ELLIPSIS
<xeofs.models.eof_rotator.EOFRotator object at ...>
<xeofs.single.eof_rotator.EOFRotator object at ...>

>>> rot_comps = rotator.components() # Rotated EOFs (spatial patterns)
>>> rot_scores = rotator.scores() # Rotated PCs (temporal patterns)
Expand All @@ -89,9 +89,9 @@ Initiate and fit an `EOFRotator` class to the model to obtain a varimax-rotated
**Maximum Covariance Analysis (MCA)**

```python
>>> mca = xe.models.MCA(n_modes=10)
>>> mca = xe.cross.MCA(n_modes=10)
>>> mca.fit(t2m_west, t2m_east, dim="time") # doctest: +ELLIPSIS
<xeofs.models.mca.MCA object at ...>
<xeofs.cross.mca.MCA object at ...>

>>> comps1, comps2 = mca.components() # Singular vectors (spatial patterns)
>>> scores1, scores2 = mca.scores() # Expansion coefficients (temporal patterns)
Expand All @@ -101,9 +101,9 @@ Initiate and fit an `EOFRotator` class to the model to obtain a varimax-rotated
**Varimax-rotated MCA**

```python
>>> rotator = xe.models.MCARotator(n_modes=10)
>>> rotator = xe.cross.MCARotator(n_modes=10)
>>> rotator.fit(mca) # doctest: +ELLIPSIS
<xeofs.models.mca_rotator.MCARotator object at ...>
<xeofs.cross.mca_rotator.MCARotator object at ...>

>>> rot_comps = rotator.components() # Rotated singular vectors (spatial patterns)
>>> rot_scores = rotator.scores() # Rotated expansion coefficients (temporal patterns)
Expand Down
File renamed without changes.
45 changes: 0 additions & 45 deletions docs/_autosummary/xeofs.models.ComplexEOF.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/_autosummary/xeofs.models.ComplexEOFRotator.rst

This file was deleted.

48 changes: 0 additions & 48 deletions docs/_autosummary/xeofs.models.ComplexMCA.rst

This file was deleted.

48 changes: 0 additions & 48 deletions docs/_autosummary/xeofs.models.ComplexMCARotator.rst

This file was deleted.

41 changes: 0 additions & 41 deletions docs/_autosummary/xeofs.models.EOF.rst

This file was deleted.

41 changes: 0 additions & 41 deletions docs/_autosummary/xeofs.models.EOFRotator.rst

This file was deleted.

41 changes: 0 additions & 41 deletions docs/_autosummary/xeofs.models.ExtendedEOF.rst

This file was deleted.

Loading

0 comments on commit 675983f

Please sign in to comment.