added ndarray.set method