diff --git a/docs/tutorial.rst b/docs/tutorial.rst index ebc5db7165..adb34e7999 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -802,7 +802,7 @@ Here is an example using S3Map to read an array created previously:: array([b'H', b'e', b'l', b'l', b'o', b' ', b'f', b'r', b'o', b'm', b' ', b't', b'h', b'e', b' ', b'c', b'l', b'o', b'u', b'd', b'!'], dtype='|S1') - >>> z[:].tostring() + >>> z[:].tobytes() b'Hello from the cloud!' Zarr now also has a builtin storage backend for Azure Blob Storage. @@ -841,11 +841,11 @@ store. E.g.:: >>> z = root['foo/bar/baz'] >>> from timeit import timeit >>> # first data access is relatively slow, retrieved from store - ... timeit('print(z[:].tostring())', number=1, globals=globals()) # doctest: +SKIP + ... timeit('print(z[:].tobytes())', number=1, globals=globals()) # doctest: +SKIP b'Hello from the cloud!' 0.1081731989979744 >>> # second data access is faster, uses cache - ... timeit('print(z[:].tostring())', number=1, globals=globals()) # doctest: +SKIP + ... timeit('print(z[:].tobytes())', number=1, globals=globals()) # doctest: +SKIP b'Hello from the cloud!' 0.0009490990014455747 diff --git a/zarr/storage.py b/zarr/storage.py index 2b60c749ee..2836c68346 100644 --- a/zarr/storage.py +++ b/zarr/storage.py @@ -1972,11 +1972,11 @@ class LRUStoreCache(MutableMapping): >>> z = root['foo/bar/baz'] # doctest: +REMOTE_DATA >>> from timeit import timeit >>> # first data access is relatively slow, retrieved from store - ... timeit('print(z[:].tostring())', number=1, globals=globals()) # doctest: +SKIP + ... timeit('print(z[:].tobytes())', number=1, globals=globals()) # doctest: +SKIP b'Hello from the cloud!' 0.1081731989979744 >>> # second data access is faster, uses cache - ... timeit('print(z[:].tostring())', number=1, globals=globals()) # doctest: +SKIP + ... timeit('print(z[:].tobytes())', number=1, globals=globals()) # doctest: +SKIP b'Hello from the cloud!' 0.0009490990014455747