# ValueError: assignment destination is read-only

- **ID:** `python/numpy-array-not-writeable`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Array is read-only (e.g., from np.broadcast_to or a view backed by immutable buffer).

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   arr = np.array(arr, copy=True) before mutation
   ```
2. **** (85% success)
   ```
   arr.setflags(write=True) when array is a writable view
   ```

## Dead Ends

- **** — Still read-only; same error (85% fail)
- **** — May raise if buffer is genuinely immutable (60% fail)
