Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4.2 TrustPilot
logo-home
Resume

Data Processing Advanced (DPA) (880082-M-3) - Summary English

Note
-
Vendu
6
Pages
11
Publié le
01-02-2024
Écrit en
2023/2024

Data Processing Advanced (DPA) (880082-M-3) - Summary English. Quick and very readable overview of the needed theory for the questions on the exam. Very easy to print and to use during your exam preparations.

Établissement
Cours









Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

École, étude et sujet

Établissement
Cours
Cours

Infos sur le Document

Publié le
1 février 2024
Nombre de pages
11
Écrit en
2023/2024
Type
Resume

Sujets

Aperçu du contenu

Week 1: Numpy Arrays

CREATING ARRAYS
np.arange()
np.arange(1, 11.9, 2.1) à Starting point (1), End point (11.9) (Excluded) and the Steps taken (2.1)

np.linspace() à Array with an starting point, end point and amount of numbers. EQUALLY SPACED
np.linspace(0, 2, 9) à Starting point (0), End point (2) (Included) and the amount of numbers we
want (9)

np.zeros([])
np.zeros()
np.zeros(5) à Array with 5 zeros

np.ones() à Array with ones

np.random.random()
np.random.random(4) à 4 Random numbers between 0 and 1

np.random.randint()
np.random.randint(5, 10, 12) à Starting point (5), End point (10) (Excluded) and Number of Intergers
(12)

np.random.unifrom()
np.random.uniform(5, 10, 12) à Array with 12 random numbers with uniform distribution between 5 and
10

np.random.normal()
np.random.normal(5, 3, 10) à Array with 10 random numbers with normal distribution with mean 5 and
SD of 3

a = np.random.uniform(1, 100, 100000)

np.size() à Size of array in terms of numbers
np.size(a) = 100000

np.ndim() à Dimension of array
np.ndim(a) = 1

np.shape() à Shape of the array
np.shape(a) = (100000,)

CHECKING EQUIVALENCE
a = np.array([2, 4, 6, 8])
a = b

np.allclose() à Checks if two arrays are the same
np.allclose(a,b) = True


CHECK LOCATIONS OF TWO ARRAYS IN COMPUTER MEMORY
id() à Checks locations of arrays
id(a) == id(b) = True

, DATA TYPES IN ARRAYS
dtype() à Datatype of the array

The 6 basic data types of Numpy arrays are:
- float (float16, float32, or float64)
- integer (int8, int16, int32, or int64)
- unsigned integer: this number cannot be negative (uint8, uint16, uint32, or uint64)
- boolean (bool)
- complex (complex64 or complex128)
- string (for example <U3 or <U64, where the number indicates the maximum length of the strings)

X = np.array([1, 3, 5, 7])
x.dtype = int8

itemsize() à Checks how many items there are in the array
x.itemsize = 4

dtype=’ ‘ à Changing data type in the array
dtype=’float’ = [1. 3. 5. 7.]

INDEXING IN ARRAYS
a = np.arange(10)
a = [0 1 2 3 4 5 6 7 8 9]

print( a[0] ) = 0
print( a[3] ) = 3
print( a[9] ) = 9
print( a[-1] ) = 9

b = np.arange(1,11)
b = [1 2 3 4 5 6 7 8 9 10]

print( b[0] ) #First element of the list = 1
print( b[3] ) #Fourth element = 4
print( b[9] ) #Tenth element = 10
print( b[-1] ) #Last element. First of reversed order. = 10

print (b[1]) = 2
print( b[:] ) #All elements, from first to last = [1 2 3 4 5 6 7 8 9 10]
print( b[3:6] ) #Thrird element to fifth element (Excluded) = [4 5 6]
print( b[:4] ) #First to third = [1 2 3 4]
print( b[-4:] ) #Last four = [7 8 9 10]
€5,39
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
jurgenvermeulen Tilburg University
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
27
Membre depuis
2 année
Nombre de followers
2
Documents
2
Dernière vente
3 semaines de cela

0,0

0 revues

5
0
4
0
3
0
2
0
1
0

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions