# TypeError: Cannot cast array data from dtype('O') to dtype('float64') according to the rule 'safe'

- **ID:** `python/numpy-dtype-object-no-cast`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An object-dtype array (often a pandas column with mixed types or None) is being passed to a NumPy/SciPy routine that requires a numeric dtype with safe casting.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   arr = pd.to_numeric(pd.Series(arr), errors='coerce').to_numpy(dtype=np.float64)
   ```
2. **** (85% success)
   ```
   Clean first: arr = np.array([x for x in arr if x is not None], dtype=np.float64)
   ```

## Dead Ends

- **** — Raises ValueError on non-numeric strings (80% fail)
- **** — Keeps object dtype (85% fail)
