From bd3725dc9b7b2db3cb15883af79fdf747d7ce526 Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Fri, 27 Nov 2015 11:26:28 -0600 Subject: [PATCH] fixed some typos --- README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5ceb5ee..24f25ca 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,7 @@ for image in nd2: Slicing is also supported and is extremely memory efficient, as images are only read when directly accessed: ```python -my_subset = nd2[50:433] -for image in my_subset: +for image in nd2[50:433]: do_something(image) # get every other image in the first 100 images @@ -59,7 +58,7 @@ for image in nd2[::-1]: do_something(image) ``` -You can also just index a single images: +You can also just index a single image: ```python # gets the 18th image @@ -76,16 +75,6 @@ The `Nd2` object has some useful metadata: >>> len(nd2) 30528 ``` - -It can also be used as a context manager: - -``` -import nd2reader -with nd2reader.Nd2("/path/to/my_images.nd2") as nd2: - for image in nd2: - do_something(image) -``` - ### Images `Image` objects are just Numpy arrays with some extra metadata bolted on: