generic accessor method for slot ndim
ndim(object)
object
object of class MassSpectra
contents of slot ndim