Category: Programing

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


Numpy for Matlab user

Ref: Some Key Differences In MATLAB®, the basic data type is a multidimensional array of double precision floating point numbers. Most expressions take such arrays and return such arrays. Operations on the 2-D instances of these arrays are designed to act more or less like matrix operations in linear algebra. In NumPy the basic … Continue reading Numpy for Matlab user