# NumPy 2.0 migration guide PyArray_Descr PyDataType_ELSIZE numpy.org

Status: search-observed
Product: NumPy
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/numpy-2-0-migration-guide-pyarray-descr-pydatatype-elsize-numpy-org
Machine JSON: https://gitdocs.org/api/fixes/numpy-2-0-migration-guide-pyarray-descr-pydatatype-elsize-numpy-org.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

Pure Python source may be unchanged while binary wheels, C extensions, or scalar promotion behavior depend on the current runtime ABI and external build artifacts.

## Fix

```
Verifier checks rebuilt/compatible dependencies or explicitly adapted promotion/API behavior. Accept a compatible rebuild/pin only when it preserves the requested NumPy major and behavior constraints.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- site:numpy.org NumPy 2.0 migration guide PyArray_Descr elsize PyDataType_ELSIZE
- NumPy 2.0 migration guide PyArray_Descr PyDataType_ELSIZE numpy.org
- https://numpy.org/doc/stable/numpy_2_0_migration_guide.html

## Sources

- NumPy 2.0 release notes: https://numpy.org/devdocs/release/2.0.0-notes.html
- Official reference opened by Codex: https://numpy.org/doc/stable/numpy_2_0_migration_guide.html
