diff --git a/README.md b/README.md index ff903a2d9d..2259732c69 100644 --- a/README.md +++ b/README.md @@ -97,11 +97,12 @@ import numpy as np ds = Dataset( "username/basic", - shape=(4,), - schema={ + shape = (4,), + mode = "w+", + schema = { "image": schema.Tensor((512, 512), dtype="float"), "label": schema.Tensor((512, 512), dtype="float"), - }, + } ) ds["image"][:] = np.zeros((4, 512, 512)) diff --git a/examples/basic.py b/examples/basic.py index 4cfb0ceb58..aff790d41a 100644 --- a/examples/basic.py +++ b/examples/basic.py @@ -14,6 +14,7 @@ def main(): "image": schema.Tensor((512, 512), dtype="float"), "label": schema.Tensor((512, 512), dtype="float"), }, + mode="w+", ) # Upload Data