# numpy.core._exceptions._ArrayMemoryError: Unable to allocate 15.3 GiB for an array with shape (45000, 45000) and data type float64

- **ID:** `python/numpy-memory-allocation`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Requested array exceeds available RAM; often from dense distance matrices or cross joins.

## Version Compatibility

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

## Workarounds

1. **** (85% success)
   ```
   Use float32: np.zeros((n, m), dtype=np.float32)
   ```
2. **** (90% success)
   ```
   Chunk with sklearn.metrics.pairwise_distances_chunked or use sparse matrices
   ```

## Dead Ends

- **** — Frees only a few GB; array still too large (85% fail)
- **** — Massive slowdown, may still OOM (70% fail)
