Numerical Basics and Data Fundamentals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

flashcard set

Earn XP

Description and Tags

Flashcards covering numerical basics, floating point representation, array layout, and tensor operations.

Last updated 8:29 PM on 5/2/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

Floating Point Numbers

A number in [1.0, 2.0) with a scaling/stretching factor (exponent, varies in steps of powers of 2).

2
New cards

Sign (Floating Point)

Single bit indicating positive or negative number.

3
New cards

Exponent (Floating Point)

Signed integer indicating how much to shift the mantissa.

4
New cards

Mantissa (Floating Point)

Unsigned integer representing the fractional part of the number, following the 1.

5
New cards

IEEE 754

Dominant standard for floating point numbers, specifying representation and operations.

6
New cards

float32

32 bits, or 4 bytes per number.

7
New cards

float64

64 bits, or 8 bytes per number.

8
New cards

Binary Representation of Floats

Fixed-length sequence of bits representing a float in memory, split into sign, exponent, and mantissa.

9
New cards

Zero (+0.0 and -0.0)

IEEE 754 has both positive and negative representations.

10
New cards

Infinity (+∞ and -∞)

All ones for the exponent, all zeros for the mantissa. Sign bit indicates positive or negative.

11
New cards

NaN (Not A Number)

Used to represent values that are invalid; result of 0.0 / 0.0.

12
New cards

Roundoff Error

Floating point operations introduce this, because operations quantize computation results. Precision is variable according to magnitude.

13
New cards

ulps (units in the last place)

Measure of the difference between successive floating point numbers.

14
New cards

np.nextafter

Next representable number in the direction of the second argument.

15
New cards

Relative Error

Absolute difference between a floating point number and its real counterpart, normalized by the magnitude of the real number.

16
New cards

ndarrays

An efficient data structure in memory and computational terms, having fixed size, rectangular shape, uniform type, and multidimensional elements.

17
New cards

Strides

Memory offset constants specifying how to index into the array, one per axis.

18
New cards

Dope Vector

Information about striding.

19
New cards

C Ordering (Row-Major)

The last index changes first; default in C-based languages.

20
New cards

Fortran Ordering (Column-Major)

First index changes fastest; sometimes used in older software.

21
New cards

Reshape

Rearranges array axes by writing a new set of strides. Requirements: element count unchanged and order preserved.

22
New cards

Rank-Preserving Operations

Number of dimensions is preserved (e.g. maps, slices, transpose).

23
New cards

Rank-Reducing Operations

Number of dimensions is reduced (e.g. indexing, reductions, ravel()).

24
New cards

Rank-Promoting Operations

Add new dimensions to an array (e.g. broadcasting, np.tile).

25
New cards

np.squeeze()

Removes all singleton dimensions in one go.

26
New cards

Elided Axes

Elides repeated : (“all” slices) in an indexing expression, using three dots.

27
New cards

np.swapaxes(a, axis1, axis2)

Swaps any pair of axes; rewrites the strides.

28
New cards

Einstein Summation Notation

Letter names for dimensions with dimension rearrangement as a string.