blob: 0fd2778a159815df75eb2d4fb3c7bef8b4b00c4e (
plain)
1
2
3
4
5
6
7
8
9
|
import numpy as np
x = np.arange(10)
# Write a npy file.
np.save("test.npy", x)
# Write multiple values to a npz file.
values = { "x": x, "x_plus_one": x + 1 }
np.savez("test.npz", **values)
|