FIX: Cast floats to int before slicing in robust_covariance

Fixes #1608.