Added templated method for special indices

The method is for python arrays when the number of indices is less than number of dimensions. In numpy, an entire row or matrix is returned instead of a single value.
Added methods for index ptr in python

Added methods which are to be generated by the code generator.
Also added specialised methods for one, two and three indices.
Added indexPtr to library ops

Added it to the header file so that it is visible to other functions.
Also fixed a bug in indexPtr method.
Removed unecessary comments

Removed commented code which was not required.
Bug fixes for getIndexPtrImpl

Added casts to allocation functions
Replaced increment operator with decrement since the range had to be decreasing.