I believe

a = numpy.empty_like(b)
a[:] = b

will copy the values quickly. As Funsi mentions, recent versions of numpy also have the copyto function.

Answer from Brian Hawkins on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ numpy โ€บ numpy_copy_vs_view.asp
NumPy Array Copy vs View
The main difference between a copy and a view of an array is that the copy is a new array, and the view is just a view of the original array. The copy owns the data and any changes made to the copy will not affect original array, and any changes made to the original array will not affect the copy.
๐ŸŒ
AskPython
askpython.com โ€บ python-modules โ€บ numpy โ€บ copy-a-numpy-array-into-another-array
How To Copy a Numpy Array Into Another Array? - AskPython
May 5, 2026 - Use a view when you want to work on a subset without copying, use copy when you need independent data ยท np.shares_memory() checks whether two arrays point to the same memory block ยท A NumPy array is a grid of values, all of the same type, indexed by a tuple of integers.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ numpy-copy-and-view
NumPy Copy and View of Array - GeeksforGeeks
January 14, 2026 - Explanation: A NumPy array arr ... data, so changes in arr (like arr[0] = 12) also appear in v. A copy creates a new, independent array with its own memory....
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python:numpy โ€บ ndarray โ€บ .copy()
Python:NumPy | ndarray | .copy() | Codecademy
October 31, 2025 - The .copy() method in NumPy creates a new, independent copy of an array (ndarray). Unlike simple assignment, which creates a view that shares the same underlying data, it ensures that changes to the new array do not affect the original, and ...
Find elsewhere
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-numpy-duplicate-copy-array
Python Numpy - Duplicate or Copy Array Data to Another Array
The array arr is initialized as a 3D numpy array with shape (2, 2, 2). We create a copy of arr using the copy() function and assign it to arr_copy.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.ndarray.copy.html
numpy.ndarray.copy โ€” NumPy v2.5 Manual
January 31, 2021 - >>> import numpy as np >>> x = np.array([[1,2,3],[4,5,6]], order='F') ... For arrays containing Python objects (e.g. dtype=np.object_), the copy is a shallow one.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.copyto.html
numpy.copyto โ€” NumPy v2.5 Manual
A boolean array which is broadcasted to match the dimensions of dst, and selects elements to copy from src to dst wherever it contains the value True. ... Try it in your browser! >>> import numpy as np >>> A = np.array([4, 5, 6]) >>> B = [1, 2, 3] >>> np.copyto(A, B) >>> A array([1, 2, 3])
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ python โ€บ python โ€“ numpy array copy
Python - NumPy Array Copy - Spark By {Examples}
March 27, 2024 - Use numpy.copy() function to copy Python NumPy array (ndarray) to another array. This method takes the array you wanted to copy as an argument and returns
๐ŸŒ
Vultr Docs
docs.vultr.com โ€บ python โ€บ third party โ€บ numpy โ€บ copy()
Python Numpy copy() - Create Array Copy
November 7, 2024 - The numpy.copy() function is a fundamental operation in Python's NumPy library, designed to create a copy of an array.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.2 โ€บ reference โ€บ generated โ€บ numpy.ndarray.copy.html
numpy.ndarray.copy โ€” NumPy v2.2 Manual
Return a copy of the array. ... Controls the memory layout of the copy. โ€˜Cโ€™ means C-order, โ€˜Fโ€™ means F-order, โ€˜Aโ€™ means โ€˜Fโ€™ if a is Fortran contiguous, โ€˜Cโ€™ otherwise. โ€˜Kโ€™ means match the layout of a as closely as possible. (Note that this function and numpy.copy are very similar but have different default values for their order= arguments, and this function always passes sub-classes through.)
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-copy-numpy-array-into-another-array
How to Copy NumPy array into another array? - GeeksforGeeks
July 15, 2025 - In the below example, the given Numpy array 'org_array' is copied to another array 'copy_array' using np.copy () function.