¡@

Home 

python Programming Glossary: slcs1

Filling gaps in a numpy array

http://stackoverflow.com/questions/5551286/filling-gaps-in-a-numpy-array

# make slices to shift view one element along the axis slcs1 slcs slcs2 slcs slcs1 i slice 0 1 slcs2 i slice 1 None # replace.. view one element along the axis slcs1 slcs slcs2 slcs slcs1 i slice 0 1 slcs2 i slice 1 None # replace from the right repmask.. None # replace from the right repmask np.logical_and ~flag slcs1 flag slcs2 data slcs1 repmask data slcs2 repmask flag slcs1..