Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
d0mine
on Feb 12, 2009
|
parent
|
context
|
favorite
| on:
Python: copying a list the right way
numpy arrays do not copy on `[:]` therefore an explicit `.copy()` is required.
`copy.copy()` makes a shallow copy of both a ordinary list and numpy arrays.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
`copy.copy()` makes a shallow copy of both a ordinary list and numpy arrays.