Help!
|
|
||||
---|---|---|---|---|---|
np.array() | show 🗑
|
||||
some_array.ndim | show 🗑
|
||||
ndmin=5 | show 🗑
|
||||
Numpy Data Types: i b u f c m M O S U V | show 🗑
|
||||
show | Returns the datatype and size of an ndarray
🗑
|
||||
dtype=‘S’ | show 🗑
|
||||
show | Creates a copy of some_array that is converted to integer type
🗑
|
||||
show | Makes a copy of some_array under the variable name “x”
Changes to some_array generally will not affect x
🗑
|
||||
show | Makes a view of some_array under the variable name “x”
Changes to some_array will affect x
🗑
|
||||
show | • If the array owns its own data then it returns None
• If it is a view or doesn’t own its data for some other reason then it returns the original array
🗑
|
||||
Output of this code: ———————————————— arr = np.array([[1, 2, 3], [5, 6, 7]]) print(arr.shape) | show 🗑
|
||||
show | (2, )
🗑
|
||||
Output of this code: ———————————————— arr = np.array([1, 2, 3], ndmin=5) print(arr.shape) | show 🗑
|
||||
show | Creates a 3d array that has 4 groups divided into 2 subgroups with an unknown number of elements.
(-1 tells numpy that you don’t know the number of groups an array can be divided into so it just finds the smallest number into which the elem
🗑
|
||||
show | Flattens the array to 1 dimesion
🗑
|
||||
for x in np.nditer(arr[:,::2], flags=[‘buffered’], op_types=[‘S’]): | show 🗑
|
||||
For idx, x in np.ndenumerate(arr): | show 🗑
|
||||
arr = np.concatenate((arr1, arr2), axis=1) | show 🗑
|
||||
show | Adds another dimension of pairs of the combined elements of arr1 and arr2 this is basically stacking along columns. The resulting number of columns equals the number of elements in each array.
Very similar to concatenate with axis=1
🗑
|
||||
arr = np.hstack((arr1, arr2)) | show 🗑
|
||||
show | Stacks along columns.
🗑
|
||||
newarr = np.array_split(arr, 3) | show 🗑
|
||||
np.hsplit() | show 🗑
|
||||
show | Oppotite of np.vstack()
🗑
|
||||
show | Opposite of np.dstack()
🗑
|
||||
np.dstack() | show 🗑
|
||||
np.where() | show 🗑
|
||||
show | Performs a binary search on a sorted array and returns the index of a specified value
🗑
|
||||
show | Sorts the array
🗑
|
||||
x = random.randint(100, size=3, 5) | show 🗑
|
||||
show | Creates an array of random floats that has 3 groups of 5 numbers.
🗑
|
||||
random.choice([1, 2, 3, 4], size=(3, 5)) | show 🗑
|
||||
random.shuffle(arr) | show 🗑
|
||||
show | Returns a random permutation of arr
🗑
|
||||
np.trunc([]) | show 🗑
|
||||
show | Returns the float rounded towards 0
🗑
|
||||
show | 3.17
🗑
|
||||
np.floor() | show 🗑
|
||||
np.ceil() | show 🗑
|
||||
np.arrange(1, 10) | show 🗑
|
||||
np.log2() | show 🗑
|
||||
np.log10() | show 🗑
|
||||
no.log() | show 🗑
|
||||
show | Returns sum of all elements in an array(s)
🗑
|
||||
np.cumsum() | show 🗑
|
||||
np.prod() | show 🗑
|
||||
np.cumprod() | show 🗑
|
||||
np.diff() | show 🗑
|
||||
show | Returns the lowest common multiple of every element in the array
🗑
|
||||
np.gmc.reduce() | show 🗑
|
||||
np.unique() | show 🗑
|
||||
show | Finds all unique values in two arrays
🗑
|
||||
show | Finds only values present in both arrays
🗑
|
||||
np.setdiff1d(arr1, arr2) | show 🗑
|
||||
show | Finds values that are in one array OR the other but NOT in both
🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
Dr..Koala
Popular Engineering sets