Skip to content
Snippets Groups Projects

add intro numpy example

Merged Kimberly Isobel Meechan requested to merge numpy-ex-1 into master
All threads resolved!

Basic intro exercise for numpy. The example images are in the repo under data/ @stamper @ralves @ext.bauer - happy for review from anyone!

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Great! thank you @meechan. I'd suggest a couple minor changes:

    1. I think the preface text & code snippets, reading the images in with imread, would be better kept outside the exercise block, i.e.
    ## Reading data to a numpy array
    We'll use the popular image analysis package scikit-image, to read two example images into numpy
    arrays.
    ~~~
    from skimage.io import imread
    raw = imread('cilliated_cell.png')
    nuclei = imread('cilliated_cell_nuclei.png')
    # if you want to see what these images look like - we can use matplotlib (more to come later!)
    import matplotlib.pyplot as plt
    plt.imshow(raw, cmap='gray')
    plt.imshow(nuclei)
    ~~~
    {: .language-python }
    > ## Exploring Image Arrays
    > * What are the dimensions of these arrays?
    > * What data type are these arrays?
    [...]
    1. Code blocks don't need to be blockquoted (> ), only wrapped in ~~~ - I've adjusted this in the example above.
  • Sounds good to me! I'll make those changes

  • added 1 commit

    • 6a97b745 - move initial setup outside of exercise block

    Compare with previous version

  • Since writing that last comment, I learned that we need blank lines in the exercise blocks.

  • Toby Hodges
  • Toby Hodges
  • added 1 commit

    • e268de35 - Apply suggestion to _episodes/02-data.md

    Compare with previous version

  • added 1 commit

    • 80413c9a - Apply suggestion to _episodes/02-data.md

    Compare with previous version

  • Kimberly Isobel Meechan resolved all threads

    resolved all threads

  • added 1 commit

    • 9fac3a87 - Apply suggestion to _episodes/02-data.md

    Compare with previous version

  • merged

  • Toby Hodges mentioned in commit b64c9d1f

    mentioned in commit b64c9d1f

  • Please register or sign in to reply
    Loading