Working with NDArray
Working with NDArray
Get shape of array
import numpy as np
def test_run():
array = np.array([(1, 2, 3), (2, 3, 4)])
print array.shape
print len(array.shape)
print array.shape[0]
print array.shape[1]
if __name__ == "__main__":
test_run()(2, 3)
2
2
3Get size of array
Type of array
Make random numbers the same for every execution
Sum all elements in array
Sum of each column and row
Finding max, min and mean in an array
Find index of max value
Glue arrays together
Slicing array
Assigning values in array
Indexing
Filtering data using conditions
Multiplication
Sum arrays
Last updated