User Guides
===========

Comprehensive guides for using NLSQ effectively in your projects.

.. toctree::
   :maxdepth: 2

   migration_scipy
   advanced_features
   performance_guide
   large_datasets
   troubleshooting

Guide Overview
--------------

Migrating from SciPy
~~~~~~~~~~~~~~~~~~~~

:doc:`migration_scipy`

Complete guide for transitioning from ``scipy.optimize.curve_fit`` to NLSQ:

- Minimal code changes required
- API compatibility reference
- Common migration patterns
- Performance considerations
- Troubleshooting migration issues

Advanced Features
~~~~~~~~~~~~~~~~~

:doc:`advanced_features`

Unlock NLSQ's full potential:

- Automatic fallback strategies
- Smart parameter bounds
- Numerical stability enhancements
- Memory management for large datasets
- Custom loss functions and robust fitting

Performance Optimization
~~~~~~~~~~~~~~~~~~~~~~~~

:doc:`performance_guide`

Maximize fitting speed and efficiency:

- GPU/TPU acceleration strategies
- Batch processing techniques
- Memory optimization
- JIT compilation tips
- Benchmarking and profiling

Large Datasets
~~~~~~~~~~~~~~

:doc:`large_datasets`

Handle datasets with millions of points:

- Automatic data chunking
- Streaming optimization
- Memory-efficient processing
- Parallel fitting strategies

Troubleshooting
~~~~~~~~~~~~~~~

:doc:`troubleshooting`

Solutions to common issues:

- Convergence failures
- Memory errors
- JAX compatibility issues
- Performance problems
- Installation issues
