added functions in SGNDArray

@iglesias @hushell
Could you help me to check this patch? Thanks!
should we use a unified name? I mean change all bases to dims.