🃏

Numpy Reference

import numpy as np

Array Creation

np.array([1,2,3][4,5,6], dtype = np.int64)
np.zeros()
np.ones()
np.eye()
np.random.random((2,2))

I/O

np.save('array', arr) 
np.load('array', arr)
arr = np.loadtxt('array.txt')
np.savetxt('array.txt', arr)

Array Types

np.int64
np.float32

Array Properties

arr.shape
arr.ndim
arr.size
arr.dtype
arr.dtype.name
arr.astype(int)
len(arr)

Array Operations

np.add()
np.sum()
np.subtract()
np.multiply()
np.exp()
np.sqrt()
np.log()
np.dot()
arr = barr # element-wise comparisons
np.array_equal() # array-wise comparisons
np.min()
np.mean()/median()/mode()/std()
np.copy()
np.append()
np.delete()
np.insert()
np.resize() 

Array Manipulation

np.transpose(arr)
np.reshape()
np.concatenate()
np.vstack()
np.hstack()
np.hsplit()
np.vslplit()