Renamed array to narray.
Function to type-check for ndarrays added.