liveBook · Manning

Scalar

A scalar is a single numerical quantity, as opposed to a vector or multidimensional collection of values.

How 4 Manning books explain it

Geometry for Programmers

A scalar is a real number that scales a vector or participates in vector operations as a magnitude factor.

How it is used
Scales vectors and point-vector models, while naming the numeric results of selected vector products.
How deep it goes
Defines scalar multiplication coordinate by coordinate and connects it to scaling, basis vectors, dot products, and orthogonality.
Examples
Uses half-scaling of (1.5, 2), basis expansion of (0.5, 1.5), model scaling, and a dot product yielding 56.
What you can do after
Evaluate/understand scalar multiplication as geometric scaling and recognize scalar outputs from dot and triple products.

Read how Geometry for Programmers explains scalar →

Pandas Workout: 200 exercises to make you a stronger data analyst

A scalar is a single numeric or other atomic value, as opposed to an array or labeled collection.

How it is used
Uses scalar values to broadcast calculations across Series and assign values to selected DataFrame elements.
How deep it goes
Explains scalar broadcasting, Boolean comparisons, aggregate-derived scalars, and shape-sensitive assignment, without developing scalar internals.
Examples
Demonstrates score adjustment with s + 10 and s + (80 - s.mean()), plus conditional DataFrame assignments through loc.
What you can do after
Apply it via pandas to broadcast values across Series and update matching DataFrame selections.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains scalar →

Deep Learning with PyTorch, Second Edition

A single numeric value, contrasted here with multi-dimensional feature representations.

How it is used
Uses scalars as PyTorch model parameters, broadcast operands, and reduced loss values.
How deep it goes
Explains zero-dimensional representation and broadcasting mechanics, while deferring additional broadcasting practice.
Examples
Demonstrates scalar addition, multiplication, model parameters, mean squared loss, and TensorBoard scalar plots.
What you can do after
Apply scalar parameters and operations in PyTorch models using broadcasting and tensor reduction.

Read how Deep Learning with PyTorch, Second Edition explains scalar →

Modern C

A scalar is a C value or type representing a single non-aggregate value rather than a collection of components.

How it is used
Uses scalar values to control if statements and initialize individual objects.
How deep it goes
Defines scalar categories and truth rules, then demonstrates initialization, while deferring the full set of condition primitives.
Examples
Demonstrates scalar conditions with loop indices, scalar declarations, formatted output, and the {0} initializer.
What you can do after
Apply scalar values in C conditions and initialize scalar objects with convertible expressions or {0}.

Read how Modern C explains scalar →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.