Metadata-Version: 2.4
Name: pygridfit
Version: 0.1.5
Summary: Python Port of gridfit (John D'Errico, 2006)
License-File: LICENSE
Requires-Python: >=3.10.0
Requires-Dist: matplotlib>=3.9.4
Requires-Dist: numpy>=2.0.2
Requires-Dist: pytest>=8.3.5
Requires-Dist: scipy>=1.13.2
Requires-Dist: watermark>=2.5.0
Provides-Extra: dev
Requires-Dist: maturin; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: scikit-sparse
Requires-Dist: scikit-sparse>=0.4.15; extra == 'scikit-sparse'
Description-Content-Type: text/markdown

# pygridfit

Python port of the MATLAB [gridfit](https://www.mathworks.com/matlabcentral/fileexchange/8998-surface-fitting-using-gridfit) function (D'Errico, 2006). 


## Installation

To install the latest tagged version:

```bash
pip install pygridfit
```

Or to install the development version, clone the repository and install it with `pip install -e`:

```bash
git clone https://github.com/berenslab/pygridfit.git
pip install -e pygridfit
```

By default, `pygridfit` uses `scipy.sparse.linalg.spsolve` to solve sparse matrices, which can be slow. For better performance, you can manually install the additional dependencies of [scikit-sparse](https://github.com/scikit-sparse/scikit-sparse) first:

```bash
# mac
brew install suite-sparse

# debian
sudo apt-get install libsuitesparse-dev
```

then run:

```
pip install -e pygridfit[scikit-sparse]
```

## Usage

See the [example](https://github.com/berenslab/pygridfit/blob/main/notebooks/example.ipynb) notebook for usage.