# RuntimeWarning: invalid value encountered in sqrt

- **ID:** `python/numpy-invalid-value-encountered`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

np.sqrt applied to negative numbers, producing NaN.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   np.sqrt(np.clip(arr, 0, None))
   ```
2. **** (90% success)
   ```
   np.where(arr >= 0, np.sqrt(arr), np.nan)
   ```

## Dead Ends

- **** — Hides NaN; downstream results wrong (80% fail)
- **** — Changes math silently; loses sign info (70% fail)
