





































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of Numpy, a Python library for creating and manipulating arrays, including data types, properties, operations, and broadcasting. It also covers the use of Boolean masks and the dot product.
Typology: Study notes
1 / 77
This page cannot be seen from the preview
Don't miss anything!






































































MEMORY EFFICIENT
1
Data as rows & cols
Data as rows & cols
FAST
2
16
MATH
LIKE
3
Creation
Properties
Operations
np.array
Scalar
Vector
Matrix
Tensor
List of
elements
rows
cols
rows
cols
width
A^ X E M S E L P
Your age
list of ages of
(^) PyDS
(^) team
A pandas
DataFrame
A picture of the Great Astronomer!
25
Scalar
Vector
Matrix
Tensor
List of
elements
rows
cols
rows
cols
width
Your age
list of ages of
(^) PyDS
(^) team
A pandas
DataFrame
A picture of the Great Astronomer!
S E L P^ M A^ X E
In [
age_list
In [
np.array
age_list
Out[
27]) array([25, 22, 24,
In [
a =
np.array
In [
a =
np.array
In [
age =
In [
np.array
(age)
Out[
array(34)
List of
elements
rows
cols
rows
cols
channel
SHAPE
[
[
[
[
It is very easy to get confused with (n,) and (1,n) or (1,n). Remember,
that the main difference lies in the
DIMENSION.
row
cols
rows
cols
width
rows
3 x 4
(^) x (^3)
x 4
axis
In [
dimensional array
values =
np.array
In [
np.sum
values,axis
Out[
array([ 60,
60
80
100
120
In [
dimensional array
values =
np.array
np.sum
(values, axis=
Out[
array([100, 260])
260 100
axis