-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes.txt
23 lines (14 loc) · 932 Bytes
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Functions return: a copy of array or the view
Copy: when the contents are physically stored in another location
View: A different view of the the same memory
id() - universal identifier of python object. Similar to pointer in C
Change in shape one will make a change in the other (view)
See example in NumPy/copies_and_views.py
- slicing an array creates a view
------------------------------------------------------------
Encapsulation: it is that things are protected inside of a class or object and cannot be easily manipulated by outside
- in python an underscore denotes a private member or method
__private_method__
_private_member
Abstraction: a class that can be used as a base and then added to to better suit a situation or context. Parent could be an abstraction of the class Person
Polymorphism: to have different methods for handling different types and to override other methods for specific classes