bug fixed for ndarray appending