-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Description
In my understanding, based on the definitions in NEP 44, my proposal is to make an Explanation page around the topic.
I am aware about two places in the docs mentioning this topic for NumPy users: the Quickstart tutorial and NumPy: the absolute basics for beginners. The former, starts with the following:
When operating and manipulating arrays, their data is sometimes copied into a new array and sometimes not. This is often a source of confusion for beginners.
Sometimes, even after five years using NumPy, I have to go with my gut feeling to predict if an operation will trigger a copy in the underlying data. I'd love to have an official documentation page for helping people build a better mental model of this.
Some questions and ideas:
- What does an advanced user of NumPy needs to know about the underlying data structure?
- What are the operations that will cause data to be moved/copied in memory?
- How to tell if Numpy did or will copy data in an operation?
- When is recommended to choose between creating a view or making a copy?
- May include or link to a good overview of indexing
- Shallow copy vs deep copy
- Cite the classic
SettingWithCopyWarningexception in Pandas, which I believe is caused by not having a good understanding of this very same subject