bug with zero-sized arrays
Fix index error
Merge pull request #484 from rmcgibbo/zeros-sized-arrays

[MRG] Bug with zero-sized arrays