BANA6620 Quiz 3 - Arrays + Indexing/Slicing

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

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:03 PM on 9/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

Bumpy array vs. Python list?

Bumpy array → elements use the same data type


Python list → can contain different data types

2
New cards

What does .shape tell you?

Array dimensions


Example: rows x columns

3
New cards

What does .size tell you?

Total number of elements

4
New cards

What does .ndim tell you?

Number of dimensions/ axes

5
New cards

In NumPy slicing, is STOP included?

NO.


Start

Stop 🛑

6
New cards

What does a negative index do?

Counts from the end.


-1 → last element

7
New cards

What does this do?


arr[::-1]

Reverses the array

8
New cards

What does this do?


are[::2]

Selects every second element

9
New cards

What does np.array([…]) do?


Creates a NumPy array from a list

10
New cards

What does np.ones((2,3)) create?

A 2×3 array


Filled with:

1.0

11
New cards

What does np.zeros((2,3)) create?

A 2×3 array


Filled with:

0.0

12
New cards

What does np.linspace(start, stop.num) do?

Creates num evenly spaced values


From start → stop.


STOP included by default