Commit b0f40396 authored by Aitical's avatar Aitical Committed by Kai Chen
Browse files

Update the documentation (#36)

* update the documentation

* update the documentation

* Update io.md
parent 76bcbe2d
......@@ -18,14 +18,14 @@ with open('test.json', 'r') as f:
data = mmcv.load(f)
# dump data to a string
json_str = mmcv.dump(data, format='json')
json_str = mmcv.dump(data, file_format='json')
# dump data to a file with a filename (infer format from file extension)
mmcv.dump(data, 'out.pkl')
# dump data to a file with a file-like object
with open('test.yaml', 'w') as f:
data = mmcv.dump(data, f, format='yaml')
data = mmcv.dump(data, f, file_format='yaml')
```
It is also very convenient to extend the api to support more file formats.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment