mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
10 lines
193 B
Python
10 lines
193 B
Python
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)
|