WDF File I/O / WDFファイル入出力¶
The generated save and load docstrings are the public WDF API contract.
They describe typed Frame data, metadata, and lazy-load behavior. WDF stores a
concrete Frame result, not a replayable Recipe; use the
Recipe How-to when the artifact should replay
operations on another input.
生成されたsave/load docstringが、公開WDF API契約の正本です。具体的なFrame結果を保存する
WDFと、別入力へ処理を再実行するRecipeの使い分けはRecipe How-to
を参照してください。wandas/io/の実装不変条件はI/O Contracts
で管理します。
wandas.io.wdf_io.save(frame, path, *, compress='gzip', overwrite=False)
¶
Save an exact built-in Frame as WDF 0.4.
The artifact retains the Frame label, user metadata, channel labels and
metadata (units, references, calibration, and channel extras), source-time
offsets, analysis coordinates, and the derived operation_history view.
Metadata fields use strict JSON encoding and therefore follow JSON value
semantics (for example, a tuple is loaded as a list).
It stores the concrete Frame result; previous references and replayable
Recipe intent are not persisted.
Dask data is handed directly to xarray and is written synchronously; Wandas does
not first materialize the complete tensor with frame._data.compute().
Source code in wandas/io/wdf_io.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
wandas.io.wdf_io.load(path)
¶
Load a local WDF 0.4 artifact as its exact built-in Frame type.
The returned Frame restores the saved label, user metadata, channel labels
and metadata (units, references, calibration, and channel extras),
source-time offsets, analysis coordinates, and derived
operation_history view. Metadata follows strict JSON value semantics;
for example, a tuple saved in metadata is loaded as a list. WDF does not
restore a previous reference or replayable Recipe intent.
The returned Frame owns access to its source internally. Keep the source path
unchanged while that Frame or Frames derived from it are in use. Obtain NumPy
values through frame.data without managing the storage backend directly.
Source code in wandas/io/wdf_io.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |