fixed bug in summary_stats for empty arrays