import numpy as np

"""
Explanation: Numpy Overview

Scientific computing package for Python  
Arrays are the fundamental elements
Methods to manipulate and perform mathematical operations on arrays and matrices
Documentation: https://docs.scipy.org/doc/

Import the Numpy Package

Must import numpy package before use
Import as 'np' and then call using np.<>
End of explanation
"""


A = np.array([[1,2,3]]); print(A)

B = np.array([[1,2,3],[4,5,6],[7,8,9]]); print(B)

C = np.zeros((2,1)); print(C)

D = np.ones((1,3)); print(D)

E = np.random.randn(3,3); print(E)

"""
Explanation: Create Basic Arrays
End of explanation
"""


print(B)

B[0]  #first row

B[:,0] #first column

B[0,0]

B[2,2]

B[:,0]

"""
Explanation: Array Indexing
End of explanation
"""


print(B.dtype)
print(B.shape)
print(B.ndim)
print(B.size)

"""
Explanation: Array Attributes
End of explanation
"""


B.tolist()

B.T

B.reshape(1,9)

B.flatten()

A.nonzero()

"""
Explanation: Array Methods
End of explanation
"""


A

A.min()

A.max()

A.sum()

A.mean()

A.var()

A.std()

"""
Explanation: Array Calcuations
End of explanation
"""


A

A*A

A**A

A/A

A-A

A+A

A<B

A==B

"""
Explanation: Array Arithmetic

numpy performs element-wise arithmetic
End of explanation
"""


