'How can I combine different objects in npz file

I have an .npz file which includes data

['X_test', 'X_train', 'y_train', 'y_test']

But I need a file such as;

['train','test']

In order to do that actually I want to combine X_test with y_test, and X_train with y_train. Is there any possible way to do that, or at least can anyone help me with it? I am trying to deal with modelnet10 and in the end I want to have a npz which includes ['train', 'test'].



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source