Lecture 1 - Numpy Basics Flashcards
1
Q
Conventional import of numpy?
A
import numpy as np
2
Q
How to get the type of numpy array?
A
.dtype
3
Q
How to get the shape of a numpy array?
A
.shape
4
Q
Order of axes in numpy ndarrays?
A
rows then columns
5
Q
Are numpy ndarrays 0-indexed?
A
yes
6
Q
What is another name for the amount of dimensions an ndarray has?
A
its rank
7
Q
What are some common dtypes?
A
- float64
- float32
- int32
- uint8
8
Q
How to load data into program using numpy?
A
np.loadtxt(file , delimeter = ‘’)