Tag: python slicing

Subsampling Python array using Slice

Slicing sampled = sample[start:end:step] Example import numpy as np x = np.zeros(shape=(10,4)) print (x.shape) # 10 4 y = x[::2] print (y.shape)# 5 4

Advertisements