M5S1 Flashcards

1
Q

What is NumPy short for?

A

Numerical Python

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

What is NumPy?

A

A foundational package for numerical computing in Python.

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

Why NumPy?

A
  • Efficient calculations for large arrays of numbers.
  • Computations on entire arrays without for loops.
  • Array-oriented computing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To utilize the package, the initial step involves employing an import command:

A

import numpy as np

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

A generic multidimensional container for homogenous data.

A

ndarray

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

Index starts at 0 and increments by 1 in each succeeding position

A

Array

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

It takes a ________ as input and produces a NumPy array containing the passed data

A

Sequence

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

Every array has:

A
  • shape
  • dtype
  • ndim
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Tuple indicating size of each dimension

A

Shape

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

Data type of the array

A

dtype

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

Number of dimensions

A

ndim

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

More ways to create arrays

A

np.zeros()
np.ones()
np.arange()

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

T or F

NumPy has many functions
that can take arrays as input
argument.

A

True

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

T or F

The output is the
function evaluated for every
element of the input array.

A

True

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

In T attribute, what does T stand for?

A

Transpose

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

Array methods that compute some statistics.

A
  • min()
  • max()
  • mean()
  • sum()
16
Q

T or F

Python can index elements
of an array that satisfy a
logical expression.

A

True