Class 5: numpy arrays

April 8, 2020

Downloads

Session log

Luis Perez
2020-04-08 08:59:07
**Class started**
Luis Perez
2020-04-08 09:18:59
**Entering breakout rooms**
Luis Perez
2020-04-08 09:19:35
Help! We need a TA!

Roz Carrier
2020-04-08 09:34:52
We need help. Greener guppy.
Polly Poll
2020-04-08 09:20:00
Poll by @Luis Perez
Roughly, numpy arrays are how many orders of magnitude faster than lists?
One⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
Two████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢8
Three█████████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢17
Four⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
Nicole Paterson
2020-04-08 09:22:10
TA?
👍1
Luis Perez
2020-04-08 09:31:10
Share one new thing you learned from the 06_numpy-arraysnotebook? (Reply in thread.)

Rachel Lutz
2020-04-08 09:37:03
numpy arrays are specialty functions that can work very quickly, but are less flexible than other functions
👍1

Andrew Holston
2020-04-08 09:37:53
I learned how to use numpy to perform matrix math operations.

Jessica Puente
2020-04-08 09:39:37
I learn about dimensions in shape.

Abbey Lasseigne
2020-04-08 09:40:16
You can index a row/dimension and also the position within that row/dimension.
👍1

Natanya Villegas
2020-04-08 09:40:39
I learned that numpy arrays can be assigned to variables and used in functions.

Ryan Swan
2020-04-08 09:41:22
The importance of defining the type of value that you will be using in the array (i.e integer, float etc.)

Acadia DiNardo
2020-04-08 09:50:06
I learned what np.zeros does
Luis Perez
2020-04-08 09:31:33
What should we discuss in the main session from the 06_numpy-arraysnotebook? (Reply in thread).

Zach Garrison
2020-04-08 09:32:35
1. What would we use a matrix for practically?
👍2

Zach Garrison
2020-04-08 09:33:07
2. What is a matrix determinant and what is a matrix inverse

Laura Desban
2020-04-08 09:34:54
Why is it necessary to specify the dtype when creating a new array with numpy?
👍3

Mike Harms
2020-04-08 09:35:50
I should have mentioned before going into class today--it was in a slack #general message--the linear algebra is an example of power, not something specific you’ll need to know for this class

Amber Rolland
2020-04-08 09:39:20
why int64 and not just int?
👍1

Luis Perez
2020-04-08 09:39:35
But just because you asked nicely @Zach Garrison you could use it to optimize equation systems, which is useful in finance and economics
😁1

Andrew Holston
2020-04-08 09:39:51
What does np.zeros actually do?

Natanya Villegas
2020-04-08 09:41:19
How to add values to lists and how this process is fundamentally different from adding to numpy arrays

Luis Perez
2020-04-08 10:03:07
@Andrew Holston from help(np.zeros)
Help on built-in function zeros in module numpy:

zeros(...)
    zeros(shape, dtype=float, order='C')
    
    Return a new array of given shape and type, filled with zeros.
😀1
Alice Barkan
2020-04-08 09:32:23
reshape
Jessica Puente
2020-04-08 09:33:52
TA?

Mike Harms
2020-04-08 09:34:08
What room?

Jessica Puente
2020-04-08 09:34:33
488-973–807

Mike Harms
2020-04-08 09:34:54
it’s risque_rat — should be at the top of zoom video window
Polly Poll
2020-04-08 09:34:22
Poll by @Luis Perez
I would rate my understanding of the material in the 06-numpy-arraynotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢8
🙂███████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢11
😄█████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢5
Nicole Paterson
2020-04-08 09:38:11
I learned from Michael how to use a for loop to add integers to a list
😎1
Luis Perez
2020-04-08 09:51:03
**Leaving breakout rooms** (about 10 min ago)
Luis Perez
2020-04-08 09:57:18
**Class ending**