Module 7: Data Visualization and Presentation with NumPy and Matplotlib Flashcards

1
Q

Use ________ to write papers containing ___________ python code including figures, plots, animations, etc.

A

jupyter
executable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

NumPy is a _______ so must be _______ and is good practice to ________ it.

A

module
imported
rename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To import and rename a module use format __________________.

A

import module as name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

NumPy works with ________, and type is __________. Can be created from a list[float] using __________ function.

A

arrays
np.ndarray
np.array()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An np.ndarray _______ contain a mix of values.

A

can

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

np.ndarray values are _________ or ________.

A

componentwise
item by item

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cannot use range for NumPy, instead use function _________ with format __________.

A

np.linspace
linspace(start, stop, count)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

np.linspace by default ___________ endpoint. Can change this using flag endpoint=______

A

includes
False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

NumPy library has _________ of the _______ functions that work on arrays with format ________.

A

vectorized versions
math
ex. np.pi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If a function doesnt do only vector stuff use ___________ which takes a callable and returns a new callable that works well with np.ndarray

A

np.vectorize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Use _________ with a pair of equal sized iterables (lists or arrays) to plot lines or points.

A

plt.plot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Use ___________ to plot points with controllable sizes.

A

plt.scatter(x, y, s=sizes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Multiple plots can occur on the same figure by calling _________.

A

plt functions repeatedly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A new blank plot is started using ___________.

A

plt.figure()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

____________ means programmers can the mathematical operators can be redefined.

A

operator overloading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

in NumPy operators are rewritten to be __________ so an operation on arrays of equal size creates a new array of the same size where each item is the result of applying the operator to the corresponding values in the two arrays.

A

elementwise

16
Q

in np operations _______ be done between an array and a single number.

A

can

17
Q

Subtraction of lists is _________.

A

not defined

18
Q

Pyplot must be imported using _______________.

A

import mathplotlib.pyplot as plt