Used masked arrays to manage missing costs