Method write
val write: HDF5 -> string -> ITensor -> unit
Writes the tensor into the HDF5 file under the specfied HDF5 object path.
Declaration
val write: hdf5:HDF5 -> path:string -> x:ITensor -> unit
Parameters
Type | Name | Description |
---|---|---|
HDF5 | hdf5 | The HDF5 file. |
string | path | The HDF5 object path. |
ITensor | x | The tensor to write. |
Examples
let k = HostTensor.init [5L; 3L] (fun [|i; j|] -> 3.0 * float i + float j)
use hdfFile = HDF5.OpenWrite "tensors.h5"
HostTensor.write hdfFile "k" k