Professional Documents
Culture Documents
np.pi
np.sin
np.cos
np.tan
np.arcsin
np.arccos
np.arctan
np.arcsinh
np.arccosh
np.arctanh
np.arctan2
np.radians
np.rad2deg
np.deg2rad
np.radians
np.sinc
np.sinh
np.tanh
np.angle
Second array:
[[5 6]
[7 8]]
>>Aliasing
In computing, aliasing describes a situation in which a data location in memory can be accessed through different
symbolic names in the program. ... Thus, modifying the data through one name implicitly modifies the values associated
with all aliased names, which may not be expected by the programmer.
>>Shallow Copy
In computing, aliasing describes a situation in which a data location in memory can be accessed through different
symbolic names in the program. ... Thus, modifying the data through one name implicitly modifies the values associated
with all aliased names, which may not be expected by the programmer.
>>Deep Copy
Deep copy is a process in which the copying process occurs recursively. ... In case of deep copy, a copy of object
is copied in other object. It means that any changes made to a copy of object do not reflect in the original object.
In python, this is implemented using “deepcopy()” function.
To generate 2D matrix we can use np. arange() inside a list. We pass this list into np. array() which makes it a
2D NumPy array.2
A = [[1, 4, 5, 12],
[-5, 8, 9, 0],
[-6, 7, 11, 19]]
print("A =", A)
print("A[1] =", A[1]) # 2nd row
print("A[1][2] =", A[1][2]) # 3rd element of 2nd row
print("A[0][-1] =", A[0][-1]) # Last element of 1st Row
output