[ndarray] basic implementation