1/36
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Creates array from list
np.array([1, 2, 3])Creates evenly spaced array
np.arrange(start, stop, step)Creates evenly spaced array
np.linspace(start, stop, number_of_elements)Creates array of 0s
np.zeros(number_of_0)Creates array of 1s
np.ones(number_of_1)Creates array of specific value
np.full(shape, fill_value)Creates identity matrix
np.eye(size)Creates uniform distribution [0, 1)
np.random.rand(number_of_terms)Creates random array
np.random.ranint(min, max, size=x)Addition
a + bSubtraction
a - bElement-wise multiplication
a * bMatrix multiplication
a % bDivision
a / bSquare root
np.sqrt(a)Scalar addition
a + 10Scalar multiplication
a * 2Scalar power
a ** 3Element comparisons
a > 2, a == 3, a <= 4Reshapes to n x m array
[array].reshape(n, m)Converts to 1D
[array].flatten()Reshapes to n rows
[array].reshape(n, -1)Transpose array
[array].TVertical concatenation
np.vstack([array1], [array2])Horizontal concatenation
np.hstack([array1], [array2])Sum
np.sum([array])Mean
np.mean([array])Median
np.median([array])Standard deviation
np.std([array])Variance (range)
np.var([array])Minimum value
np.min([array])Maximum value
np.max([array])Rows
axis=0Columns
axis=1Sorts array
np.sort([array])Keeps only unique values
np.unique([array])Searches for specific values
np.where([condition])