* Always include 0 in the range * Handle case where tensor is zeros only (fixes issue #115) * Add unit tests