---
source: https://iinventedlight.com/library/notes/numpy-copies-views.md
title: "NumPy copies versus views"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt); prose restates or closely paraphrases cited source lines"
license_family: numpy-bsd3
rule_check: "needs rule check (family not in auto-publish rule; check.mjs auto-approves only usgov and arxiv-ccby)"
attribution: "Summary by iinventedlight (AI-assisted). Sources: NumPy docs, Copies and views — NumPy v2.5 Manual, BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt); NumPy docs, NumPy quickstart — NumPy v2.5 Manual, BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-ai-eng: NumPy"
tags: ['numpy', 'views', 'copies', 'memory']
sources:
  - id: S1
    title: "Copies and views — NumPy v2.5 Manual"
    publisher: NumPy docs
    url: https://numpy.org/doc/stable/user/basics.copies.html
    accessed: 2026-11-04
    license: "BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt)"
  - id: S2
    title: "NumPy quickstart — NumPy v2.5 Manual"
    publisher: NumPy docs
    url: https://numpy.org/doc/stable/user/quickstart.html
    accessed: 2026-11-04
    license: "BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt)"
---
# NumPy copies versus views

**Answer:** When operating on NumPy arrays, it is possible to access the internal data buffer directly using a view without copying data around. This ensures good performance but can also cause unwanted problems if the user is not aware of how this works. (S1)

## Views

- It is possible to access the array differently by just changing certain metadata like stride and dtype without changing the data buffer; these new arrays are called views. (S1)
- The data buffer remains the same, so any changes made to a view reflects in the original copy. (S1)
- A view can be forced through the ndarray.view method. (S1)
- Views are created when elements can be addressed with offsets and strides in the original array. (S1)

## Copies

- When a new array is created by duplicating the data buffer as well as the metadata, it is called a copy. (S1)
- Changes made to the copy do not reflect on the original array. (S1)
- Making a copy is slower and memory-consuming but sometimes necessary. (S1)
- The copy method makes a complete copy of the array and its data. (S2)
- Sometimes copy should be called after slicing if the original array is not required anymore. (S2)

## No copy at all

- Simple assignments make no copy of objects or their data. (S2)
- Python passes mutable objects as references, so function calls make no copy. (S2)

## Claims
- id: C1
  claim: Changes made to a view reflect in the original.
  source: S1
  evidence: "to a view reflects in the original copy."
- id: C2
  claim: Changes made to a copy do not reflect on the original.
  source: S1
  evidence: "do not reflect on the original array."
- id: C3
  claim: Simple assignments make no copy.
  source: S2
  evidence: "Simple assignments make no copy of objects or their data."
- id: C4
  claim: The copy method makes a complete copy.
  source: S2
  evidence: "The copy method makes a complete copy of the array and its data."

## Sources
- [S1] Copies and views — NumPy v2.5 Manual. NumPy docs. https://numpy.org/doc/stable/user/basics.copies.html . License: BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt). Accessed 2026-11-04.
- [S2] NumPy quickstart — NumPy v2.5 Manual. NumPy docs. https://numpy.org/doc/stable/user/quickstart.html . License: BSD-3-Clause (numpy/numpy LICENSE.txt; Copyright (c) 2005-2026, NumPy Developers; https://github.com/numpy/numpy/blob/main/LICENSE.txt). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
