Working with External Libraries Flashcards

1
Q

Math is a what?

A

Module

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

A collection of variables defined by someone else

A

Module

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

You can see all the names in math using the built in function what?

A

dir()

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

What does the math.log() function do?

A

Returns the natural logarithm of a number, or the logarithm of number to base

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

It is common convention to import numpy as what?

A

np

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

It is a common convention to import pandas as what?

A

pd

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

Name some popular libraries.

A

Pandas
Numpy
Tensorflow
Matplotlib

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

Only import specific things you’ll need from each module

A

from math import log, pi
from numpy import asarray

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

Name the graphing library

A

mathplotlib

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

What do pandas functions give you?

A

DataFrames & Series

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

Subplots, Figures, TickMarks and Annotations are from what library?

A

matplotlib

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

To find out ‘what is this thing?’ use what?

A

type()

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

To find out ‘what can I do with it?’ use what?

A

dir()

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

I want to turn the array into a list… what should I use?

A

“tolist”

rolls.tolist()

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

Can you add a number to each element of an array?

A

Yes

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

What Python library is popularly used for deep learning?

A

Tensorflow

17
Q

It is common convention to import tensorflow as what?

A

tf

18
Q

How would you make the y-axis begin at 0?

A

graph.set_ylim(bottom=0)

19
Q

How would you label the y-axis?

A

graph.set_ylabel(“Balance”)

20
Q

How would you set an array of the values displayed on the y-axis?

A

ticks = graph.get_yticks()

21
Q

How would you format those values into strings beginning with a dollar sign?

A

new_labels = [‘${}’. format(int(amt)) for amt in ticks]

22
Q

Sets the y-axis limits for the current axes or chart

A

ylim