Your Cart
Loading

Code Clinic - The Build - Book 4: NumPy for Lab Data

On Sale
$12.00
$12.00
Added to cart

A column of lab values deserves better than a loop. NumPy is the reason you no longer need one, and the book opens with that case before having you build your first array. Statistics come next, computed over the whole column in a single call rather than an accumulator and a counter. Indexing and slicing let you pull the third result, the last five, or everything after a given point. Then the idea the rest of the book rests on: the boolean mask. You write one comparison against the array and get back a grid of True and False, one per value. Feed that mask back in as an index and NumPy hands you only the values that passed, which is how you find every result above a reference range without writing a single if statement. The final chapters join it to real work, lifting numeric results out of HL7 messages into an array and then running a full lab analysis on them, from raw values to finished summary figures.


Seventeen A4 pages, in full colour. Written in short sentences and plain English, for readers whose first language is not English and clearer for everyone else because of it.


Every code example in this book was run before the page was printed, so the output you read is the output you get. Instant PDF download. By M.R. Sterling.


You will get a PDF (841KB) file